Solving tri-linear interpolation parameters

Click For Summary
SUMMARY

This discussion focuses on solving tri-linear interpolation parameters for a point C within a hexahedron defined by 3D vectors (C000, C100, C010, C011, etc.). The user seeks to determine the parameters Xd, Yd, and Zd, which represent the interpolation weights for the x, y, and z dimensions, respectively. The tri-linear interpolation equation provided is 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. The user notes that Wolfram Alpha can only solve for simpler cases, indicating a need for a more robust method to combine the equations for X, Y, and Z.

PREREQUISITES
  • Understanding of tri-linear interpolation concepts
  • Familiarity with 3D vector mathematics
  • Basic knowledge of solving systems of equations
  • Experience with mathematical software like Wolfram Alpha
NEXT STEPS
  • Research methods for solving non-linear equations in multiple variables
  • Learn about numerical methods for interpolation, such as Newton's method
  • Explore symbolic computation tools for solving complex equations
  • Investigate the properties of hexahedra in 3D space and their applications in computer graphics
USEFUL FOR

Mathematicians, computer graphics developers, and anyone involved in 3D modeling or simulations requiring interpolation techniques.

aadster
Messages
3
Reaction score
0
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:
Physics news on Phys.org
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 I am 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 I am finding tricky to solve for R... any ideas? Thanks!
 
I'll add to this as I progress, but interestingly Wolfram Alpha could only solve this for the simplest factor Z: (only 2 occurances)

Z = (a X Y+a (-X)-a Y+a-b X Y+b X-c X Y+c Y+d X Y-R)/(a X Y+a (-X)-a Y+a-b X Y+b X-c X Y+c Y+d X Y-e X Y+e X+e Y-e+f X Y-f X+g X Y-g Y-h X Y)

Since factors a-h form a cube of values, I can swap them around to create two other equations in the exact form above wrt X and Y.

Assuming I have all 3 equations, what is the safest way to combine all 3 equations to calculate X, Y & Z?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 25 ·
Replies
25
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 21 ·
Replies
21
Views
4K
  • · Replies 13 ·
Replies
13
Views
4K
Replies
3
Views
2K