interpolation

Actionscript 3.0 Color Interpolation Question

In Actionscript 3.0, the Color class has a method called interpolateColor. It seems strange to me, but the method takes two unsigned integers for the colors as opposed to two instances of Color. Additionally, it returns an unsigned integer for the resultant color. Anyhow, I don't see anything in the API for converting a Color to an un...

Interpolation on excel

Hi to all I've a source data like this: 35 40 -15 15.0 15.1 -10 17.2 17.4 -5 19.7 19.8 and I need to find the value in (-16, 37). I've tried with linear interpolation but I can solve only with (x,y) couple of values. Could you help me? thanks a lot, Andrea ...

Color Interpolation

Okay, so I'm looking at a typical color chooser and it looks something like this: If we deal with only highly saturated colors, the blending pattern behaves like this: R 255 G 0 B 0 R 255 G 0 -> 255 B 0 R 255 G 255 B 0 R 255 -> 0 G 255 B 0 R 0 G 255 B 0 R 0 G 255 B 0 -> 255 R 0 G 255 B 255 R 0 G 255 -> 0 B 255 ...

HSL Interpolation

If the hue component of my HSL color is in degrees, how can I correctly interpolate between two hues? Using (h1 + h2) / 2 does not seem to produce desirable results in all cases. Here are two examples that illustrate why: Let: red = 0° yellow = 60° blue = 240° (red + yellow) / 2 = 30° (orange) (yellow + blue) / 2 = 150° (blue gree...

Interpolation advice (linear, cubic?)

I need to find good approximations of the points where an undefined function intersect a threshold value. I'm stepping through my space and whenever I find that two subsequent steps are on different sides of the threshold, I add a point somewhere in between: My first approach was to just pick the mid-point, but this is obviously a ter...

rescaling ranges

hi, for example i have two ranges (1) 0 to 3 (2) 10 to 15 in range (1) i have numbers between 0 and 3, where 0 is minimum and 3 is maximum value...(it has also values 1 and 2)... now i wanted to rescale both ranges (1) and (2) to range 0 to 1. Can you show me how to do it or at least poi...

SQL Interpolation: Cubic / Quartic

Hi, Can anyone point me in the direction of an SQL cubic or quartic interpolation function? I'm trying to save the time of a developer at work coding a Crystal Report and I'm keen for him not to have to write something from scratch. A smooth curve interpolation is needed because we're interpolating interest rates. Regards, Andrew ...

Nearest-neighbor interpolation algorithm in MATLAB

I am trying to write my own function for scaling up an input image by using the Nearest-neighbor interpolation algorithm. The bad part is I am able to see how it works but cannot find the algorithm itself. I will be grateful for any help. Here's what I tried for scaling up the input image by a factor of 2: function output = nearest(inp...

OpenGL ES on Iphone: simple 2D animation (interpolation/tween)

Hi everyone, I'm working on an app that basically revolves around 2D shapes (mostly simple polygons) being dynamically drawn and animated. I'm looking for a way to easily time my animations. It's basically just moving a vertex to a specified point in a specified time, so just interpolating floats, with all the usual easing parameters. ...

Javascript function for trilinear interpolation

All, I THINK that I'm looking for a function for Trilinear interpolation. Here's the details: I have a three dimensional dataset: Dimension 1 varies from 0 to 100 in increments of 5 Dimension 2 varies from 0 to 100 in increments of 5 Dimension 3 varies from 0 to 1 in increments of 0.1 So, I have 4851 total values (21 x 21 x 11). ...

How Do I Generate a 3-D Surface From Isolines?

I have a set of isoline points (or contour points) such as this: Each point on an isoline has its own respective X, Y, and Z coordinate. Since they are isolines, that means that each point will have a unique X-Y pair, but points on the same line will have the same Z coordinate. Now, is there any algorithm or any software packages (ei...

How to use linear interpolation estimate current position between two Geo Coordinates?

I have the following available: last reported lat,lon w/timestamp target lat,lon estimated time to target heading How can I interpolate an estimated position over time? I know that's enough to calculate the required average velocity for the remainder of the trip. Given a straight-line distance, it's pretty trivial. I know it has to ...

Are there any drawbacks to interpolation in Perl?

I'm just starting out with Perl (literally today) and I'm reading the free online version of Beginning Perl. Early on, the book mentioned that double quoted strings will be interpolated. However, in every example using the print function (so far... I'm around page 66), the author is passing scalar variables as a list parameter. Maybe I'm...

How do I generate a contour graph?

How do I generate a contour graph like this: It's easy enough if the points are on a regular grid, but what if they aren't, like in my example? Is there a fairly simple algorithm to determine the color for each pixel? ...

What type of Pixel Interpolation is used by OpenGL?

Hello, I would like to know what type of Pixel Interpolation is used by OpenGL. Does it use one of the Standard Pixel Interpolation techniques like Nearest Neighbor, Bilinear or Bicubic? ...

resampling, interpolating matrix

I'm trying to interpolate some data for the purpose of plotting. For instance, given N data points, I'd like to be able to generate a "smooth" plot, made up of 10*N or so interpolated data points. My approach is to generate an N-by-10*N matrix and compute the inner product the original vector and the matrix I generated, yielding a 1-by-...

Pygame sprite transformation with interpolation

Im currently working on a Python/Pygame module to wrap some basic sprite animation. Animation in the sense that the image itself is static but I apply rotation and scale with start and end values with a sine wave interpolation. That is, sprite transformation like the ones that could be made in Flash. I hope you understand, otherwise feel...

jquery match() variable interpolation - complex regexes

I've already looked at this, which was helpful to a point. Here's the problem. I have a list of users propagated into an element via user click; something like this: <div id="box"> joe-user page-joe-user someone-else page-someone-else </div> On click, I want to make sure that the user has not already been clicked into...

Interpolating a scalar field in a 3D space

I have a 3D space (x, y, z) with an additional parameter at each point (energy), giving 4 dimensions of data in total. I would like to find a set of x, y, z points which correspond to an iso-energy surface found by interpolating between the known points. The spacial mesh has constant spacing and surrounds the iso-energy surface entirel...

Matlab's griddata3 for numpy?

Hi, I realize that there is a griddata for numpy via matplotlib, but is there a griddata3 (same has griddata, but for higher dimensions). In other words, I have (x,y,z,d(x,y,z)) where (x,y,z) form an irregular grid and d(x,y,z) is a scalar function of three variables. I need to generate d(xi,yi,zi) for a new set of (xi,yi,zi) points u...