07-05-2012 04:43 PM
Solved! Go to Solution.
07-05-2012 04:49 PM - edited 07-05-2012 04:50 PM
You can interpolate the three vectors as a function of index, then reconstruct the higher resolution 3D trace.
For linear interpolation, you can use "interpolate array". For more complex interpolations, look in the interpolation palette.
07-05-2012 05:04 PM - edited 07-05-2012 05:11 PM
Here's what I had in mind. Modify as needed. (LabVIEW 2011)
07-05-2012 05:25 PM
Actually, I probably misunderstood. It seems you want someting like bilinear interpolation, just in 3D.
Basically, you want trilinear interpolation. Seems easy to implement. 😄
07-05-2012 07:29 PM - edited 07-05-2012 07:31 PM
OK, I quickly wrote a trilinear interpolation from scratch. See if this works for you. (attached VI is LabVIEW 8.2)
(Make sure you are not indexing outside the volume. There are probably a few more tweaks and checks needed, this is just a rough draft.)
The definition of the fractional indices is similar to index array, except that fractional value are allowed Similar to my old bilinear demo, see also here)
07-06-2012 02:02 AM
Hello alterbach !
Thank you very much for your answers and this first draft of an trilinear interpolation.
I'm studying your example, I keep you in touch
Thanks,
07-06-2012 06:35 PM
Please let me know if it works for you and if you find any bugs.
In the meantime I have added an idea for "interpolate array" to accept higher dimension arrays (link below).
Please vote for it if you think it would be useful. Thanks!
Idea: Interpolate array for higher dimensions (bilinear, trilinear)
07-09-2012 09:08 AM
Thank you altenbach, your code is good working ! I've made some modifications in order to accept 3D arrays as input. It's nothing.
It can be improved by checking if interpolated point are outside the initial volume but It's not an important point for me...
Many thanks !
Best regards,
07-09-2012 09:37 AM
@Rufnek wrote:
I've made some modifications in order to accept 3D arrays as input. It's nothing.
3D arrays where? The volume is already a 3D array in my code.
@Rufnek wrote:
It can be improved by checking if interpolated point are outside the initial volume but It's not an important point for me...
Yes, I was only interested in the math. A robust implementation definitely needs more work.
07-09-2012 09:41 AM
xi, yi, and zi (coordinates points) are vectors. I prefer manipulate 3d arrays so, the function accept coordinates in 3d arrays. This arrays are converted into vectors and then your code is used. That's nothing.