POV-Ray : Newsgroups : povray.binaries.images : tricubic grid interpolation : Re: tricubic grid interpolation Server Time
8 Aug 2024 22:15:29 EDT (-0400)
  Re: tricubic grid interpolation  
From: andrel
Date: 28 Apr 2005 11:51:22
Message: <427105F2.20904@hotmail.com>
triple_r wrote:
> andrel <a_l### [at] hotmailcom> wrote:
> 
>>I am not sure if I understand your question.
> 
> 
>      Entirely my fault.  I feel kind of stoopid for asking such a
> poorly-phrased question.  Sorry you had to do all that typing.
>      I neglected to state that the points fall on a regular cartesian grid
> and I'm interpolating inside a voxel.  Regardless of where the points are
> defined (center, face, corner) simiple translation can put all points at a
> corner, i.e. <0,0,0>, <1,0,0>, <2,0,0>, <3,0,0>, <0,1,0>,etc... (multiplied
> by the grid spacing) for sixty-four points.  It forms a local 4x4x4 point
> box as pictured, then it's a matter of figuring out the value of some point
> inside.  It's for a fluid simulation as outlined in the Visual Simulation
> of Smoke paper, so it is important for stability that the values (of
> something like temperature or velocity) interpolated at some point in the
> domain do not fall outside of the range of the values actually defined in
> that domain.  The paper goes into little detail about how they use tricubic
> interpolation other than to define a condition for 1-D cubic interpolation
> that does not overshoot the data.
What paper are you referring to?
>      Now enters my question whether this is what they had in mind for an
> extension to 3-D.  My guess (pictured above) is that you can reduce a 3-D
> problem to 16 1-D problems which form a 2-D problem.  That 2-D problem is 4
> 1-D problems which reduce the answer to a 1-D problem.  
Yes you can, but why would you? To find the coordinates of a point you
simply multiply with a 4 by 4 by 4 matrix or a vector of 64, depending
on your representation.
> If they just
> clipped the data to the range in the volume, they wouldn't have gone to the
> trouble of defining the 1-D criteria, but I'm not sure my guess is exactly
> what they had in mind either.  It seems rather anisotropic to favor one
> direction over the rest.  
That only seems so. You interpolate in one direction and use the results
in the next step. In the end every point except the gridpoints at the
faces depend on all 64 points. Also, the result does not depend on the
order you apply the interpolations in.
> It's also requires a whole lot of function calls.
>  This isn't a problem until you do it thousands of times; then you post a
> question to a newsgroup asking if there's a better way.  
It is only 64 multiplications and some additions, straight from the
linear algebra section of any library.
> I hope that better
> defines the question, although I have to wonder if anyone is still reading
> this way down here...
Well,... I am :)


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.