# Solving tri-linear interpolation parameters

1. Oct 28, 2012

I'm trying to find the tri-linear interpolation parameters of a point C within a hexahedron of 3d vectors (C000, C100, C010, C011 etc)

You could call this "inverse tri-linear interpolation"

Ive used the same variable names as this wikipedia article: http://en.wikipedia.org/wiki/Trilinear_interpolation

if Xd, Yd & Zd are the 0..1 trilinear parameters for x,y & z respectively, how can I solve the equations for these parameters? The interpolated point C is known.

Many thanks

Last edited: Oct 28, 2012
2. Oct 29, 2012

to break this down further, this is the tri-linear equation.

R = ((1-Yd) * (p000 * (1-Xd) + p100 * Xd ) + (p010 * (1-Xd) + p110 * Xd ) * Yd) * (1-Zd) +
((1-Yd) * (p001 * (1-Xd) + p101 * Xd ) + (p011 * (1-Xd) + p111 * Xd ) * Yd) * Zd;

where R is tri-linear interpolated result,
P000-P111 are the 8 points of a hexahedron that define the 3D interpolation space
R and P can be either scalar or vector

Xd, Yd, and Zd are scalars and are the tri-lin parameters Im trying to find

Known:
When Xd,Yd & Zd = 0, R = p000 and when Xd,Yd & Zd = 1, R = p111 etc

Clearly there are some degenerate cases here, but my maths is a little rusty and Im finding tricky to solve for R... any ideas? Thanks!

3. Oct 29, 2012