![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/173305/image.jpeg)
Interpolate Helix in 3d
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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!
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161702/image.jpeg)
0 commentaires
Réponses (1)
John D'Errico
le 14 Mar 2017
Modifié(e) : John D'Errico
le 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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/173305/image.jpeg)
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 commentaires
John D'Errico
le 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.
Voir également
Catégories
En savoir plus sur Graphics Object Properties dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!