How to interpolate 3D curve using Normal information

4 views (last 30 days)
Hy , I want to ask about curve interpolation in 3D using the Plane 'Normal' information. The information I have includes the Curve point at the start and end of the section (This is an open curve, representing the vessel centreline as shown in figure below). Moreover, I have the plane information (Normal , roll, pitch and yaw). For visual illustration, the image is attached. The Green is initial guess centreline constructed using 3D contours, whereas the RED shows the TRUE centreline. I want to update the Green CURVE in the region of interest using the available points (BLUE) and the plane information (from black -coplanar points) so that the GREE CURVE aligns itself with the TRUE (RED) centreline. A possible code or Matlab prototype will be greatly helpful.
I have tried all possible combinations from linear to cubic spline interpolation, but unfortunatly they interpolate the intermediate points in terms of a straight line between 2 blue points, whereas the interpolated points should take care of all three dimensions. Further, I have seen an interesting example where Matlab csape function is used to interpolate under boundary conditions, but again that s very simple code for 2D and I am strugglig to expand it for 3D, any I cannot see any example of csape for 3D interpolation. Example is 2D Curve Interpolation using Csape
Thanks in advance, Regards.
  2 Comments
Jordan Ross
Jordan Ross on 10 Jan 2017
Hello Muhammad,
Have your considered using the function "interp3"? You can find more about this method on The following documentation page: http://www.mathworks.com/help/matlab/ref/interp3.html
Additionally, the "scatteredInterpolant" class might help. You can find out more and some examples using this in the following two documentation pages: http://www.mathworks.com/help/matlab/ref/scatteredinterpolant-class.html
John D'Errico
John D'Errico on 10 Jan 2017
Edited: John D'Errico on 10 Jan 2017
interp3 is NOT appropriate for this case. Sorry. It will just give an error, since you do not have data in the proper form.
scatteredInterpolant is also NOT appropriate. It will not be able to use information like a normal planes, nor is it a good choice for interpolating a path through space. And worse, even when it does not overtly fail, you will be terribly unhappy with the result.

Sign in to comment.

Answers (2)

John D'Errico
John D'Errico on 10 Jan 2017
Edited: John D'Errico on 10 Jan 2017
As I said in my comment, the standard things suggested by Jordan are simply wrong for this problem. They are designed to solve very different problems.
No, csape is not appropriate here either. Sorry.
Could you write what is effectively a spline code in multiple dimensions, that uses both the two points, plus the normal to the curve information? Yes, I see no reason why you could not do so in theory. No, I won't write the code for you, nor will it be trivial to write. It simply will not be one of those simple 3 liners.
Finally, it is not at all obvious to me that an interpolant will do better than what came from the green (mid-contour) line, at least not without a fair amount of effort that you will need to invest. Remember that there will ALWAYS be some degree of error from any interpolation. It is not at all obvious that the normals shown would give better information, since I'll bet there are other factors that are just as important. Wind for example, engine speed, slippage, etc. A plane will not always go in the direction it is pointed.

Dang Le Van
Dang Le Van on 8 Jan 2020
For who're still interested. With only information of the two poles and normal vector at these poles, I knew there are two methods to approximate the original curve. It explains very clear in https://www.sciencedirect.com/science/article/abs/pii/S016783960500021X
and
Best,

Categories

Find more on Interpolation in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!