how can I plot a 3-D helical trajectory

ı need to plot a trajectory like pitcure above but ı could not. Can u help me. the known parameters are that diameter=4 [m], pith (gape) = 2 [m], height = 18 [m]. Also the simulation time is 50 second.

Réponses (1)

Matt J
Matt J le 15 Fév 2024
Modifié(e) : Matt J le 15 Fév 2024
t=linspace(0,18*pi, 3000);
plot3(2*cos(t), 2*sin(t), t/pi)

6 commentaires

baris
baris le 15 Fév 2024
why did u product the height (18) with pi.
Matt J
Matt J le 15 Fév 2024
Modifié(e) : Matt J le 15 Fév 2024
If the pitch=2, then you need 9 revolutions (2*pi*9=18*pi) to reach a height of 18.
baris
baris le 15 Fév 2024
but there are more spirals than the pitcure ı attached. What is the reason of that?
Matt J
Matt J le 15 Fév 2024
Modifié(e) : Matt J le 15 Fév 2024
Because the helix in your plot is not to spec. You said you wanted a pitch of 2, but plotted a helix with a pitch of about 5.
baris
baris le 15 Fév 2024
it is my bad, sir. I thought the pitch is the distance between spirals. I apologize. The known parameters are that if we look over, the helix diameter is 4, the gap beetwen spirals is 2, the heights is 18 and the simulation time is 50 seconds. I also need to get trajectory like down bellow
Matt J
Matt J le 15 Fév 2024
Modifié(e) : Matt J le 15 Fév 2024
OK. But what's the problem? Just increase the pitch.
t=linspace(0,4.5*2*pi, 3000);
T=t(end);
s=t(end)/50; %rescale to duration 50
t=t/s;
x=@(t) 2*cos(s*t); y=@(t) 2*sin(s*t); z=@(t)s*18*t/T;
plot3(x(t),y(t),z(t))
figure;
subplot(3,1,1); plot(t,x(t))
subplot(3,1,2); plot(t,y(t))
subplot(3,1,3); plot(t,z(t))

Connectez-vous pour commenter.

Catégories

En savoir plus sur Polar Plots dans Centre d'aide et File Exchange

Question posée :

le 15 Fév 2024

Modifié(e) :

le 15 Fév 2024

Community Treasure Hunt

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

Start Hunting!

Translated by