필터 지우기
필터 지우기

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