Interpolate Helix in 3d
3 views (last 30 days)
Show older comments
I have three helices with 39 data points for each helix:
t=linspace(0,8.6*pi,39);
plot3(35*cos(t)+35,35*sin(t)+35,t,'LineWidth',3);
hold on;
plot3(25*cos(t)+35,25*sin(t)+35,t,'LineWidth',3);
plot3(15*cos(t)+35,15*sin(t)+35,t,'LineWidth',3);
hold off;
I am wondering how I could interpolate the area between the helices in the x,y,z direction? Thanks!
0 Comments
Answers (1)
John D'Errico
on 14 Mar 2017
Edited: John D'Errico
on 15 Mar 2017
t=linspace(0,8.6*pi,39);
x = 35*cos(t)+35;
y = 35*sin(t)+35;
xyzi = interparc(1000,x,y,t,'spline');
plot3(x,y,t,'ro')
hold on
plot3(xyzi(:,1),xyzi(:,2),xyzi(:,3),'-b')
box on
grid on
But re-reading your question, you asked to interpolate the area BETWEEN the helices.
Are you asking how to make the three curves into a plottable surface, connecting them together? This is quite doable, but I won't do so without affirmation from you as to my guess.
6 Comments
John D'Errico
on 16 Mar 2017
I don't know what you have shown me there. You need to be careful in what variables you treat as the dependent and independent variables. Perhaps you might attach the actual data that you have.
The -pi/pi boundary will be an issue here, as gridfit would need to be modified to solve your problem. It would almost be easier to write a hacked (and very simple version) that did have periodic boundary conditions in one variable.
Anyway, there are other solutions one might look at. For example, given all three curves, generate a 3-d delaunay tessellation. Of course, that will include the volume internal to the central helix. Now, delete any tetrahedra that cross that internal region. The result will be a tessellation of the annular volume in question. The only issue would be how to delete the stuff in the middle. That would be doable though, and it completely eliminates the periodic boundary problem.
See Also
Categories
Find more on Graphics Object Properties 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!