Interpolate Helix in 3d

3 次查看(过去 30 天)
Robert Wu
Robert Wu 2017-3-14
评论: Robert Wu 2017-3-16
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!

回答(1 个)

John D'Errico
John D'Errico 2017-3-14
编辑:John D'Errico 2017-3-15
If you want to interpolate the helices smoothly, download interparc from the file exchange.
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 个评论
John D'Errico
John D'Errico 2017-3-16
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.
Robert Wu
Robert Wu 2017-3-16
Thanks for the info! That row of numbers in the previous comment is the data points that winds down a cylinder in a helical fashion. I want to make something like this 2D plot, but on 3D cylinder:
This is a cross-section view of the cylinder. The 3 sine waves are the helices in 2D. The dots on the wave is where the data points are. The area is interpolated by what the value of the dots are.
What I am having trouble with is representing this in 3D.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Graphics Object Properties 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by