linear-interpolation

obj-c linear interpolation between two numbers

Just wondering if there are methods already implemented for handling linear interpolation between two numbers in foundation/something else that comes with Xcode? It's hardly an advanced thing to implement yourself, but I usually find myself reimplementing things that have already been implemented, and it's nice to use functionality that ...

How to calculate the slope of a point on a terrain data (e.g. Digital Elevation Matrix)

I want to implement a 3D car racing game and I need to approximate the magnitude and the direction of the slope of any arbitrary point on a terrain. Terrain Data Format: - heights[ ][ ]: 2D array of floats (representing heights in meters) - unit: horizontal unit distance between (i, j) - (i, j+1) and between (i, j) - (i+1, j) in meters ...

implementation of interp1 function of MATLAB in J2ME

Hi, i am looking to implement the interp1, 1-D data interpolation (table lookup), function available in MATLAB in J2ME or JAVA. here is the link http://www.mathworks.com/access/helpdesk/help/techdoc/ref/interp1.html Is there any library available in J2ME or JAVA which has already implemented the same function ? If not can anybody help...

How to Create a Duotone Interpolation Color in GDI+ (.NET)?

I have two colors that I need to linearly interpolate to create a duotone color based of another color's luminance value. Dim clr1 = Color.Black Dim clr2 = Color.FromArgb(224, 255, 165) Dim lum = Color.FromArgb(226, 189, 136).GetBrightness 'lum = 0.71 I know the result of this should be R=171, G=192, B=125, but I can't figure out how ...

SQL Server Interpolate Missing rows

I have the following table which records a value per day. The problem is that sometimes days are missing. I want to write a SQL query that will: Return the missing days Calculate the missing value using linear interpolation So from the following source table: Date Value -------------------- 2010/01/10 10 2010/01/11 ...

How to perform a linear interpolation between to images

I'm reading a paper that talks about using a lerp function in image synthesis. What exactly is a lerp and how would you synthesize an image using one if you are given two images as inputs? ...

c# n-linear interpolation

Hello, Wondering if I'm barking up the wrong tree. I'd like a recursive function to give me the results of an n-linear interpolation, for example: I'm applying discounts to vehicle prices. I have two types of discount: Volume and Age, such that A. Volume = 10, Age = 10, discount = 100; Volume = 10, Age = 20, discount = 200; B. Volu...

Linear interpolation in direct digital synthesis

I'm working on a microcontroller DDS project in C and am having some trouble figuring out how to compute a linear interpolation to smooth the output values. The program as it stands now uses the top 8 bits of a 24 bit accumulator as an index to an array of 8 bit output values. I need to come up with a function that will take the middle...