MATLAB Answers

How to draw a helix knowing the pith, diameter and height ?

19 views (last 30 days)
farzad
farzad on 8 May 2020
Edited: Ameer Hamza on 8 May 2020
Hi all
the following code creates a helix, but not in the range I want. Is there a function that gets the dia, pitch and height and make the helix ?
syms t
xt = sin(t);
yt = cos(t);
zt = t;
fplot3(xt,yt,zt)

  0 Comments

Sign in to comment.

Accepted Answer

Ameer Hamza
Ameer Hamza on 8 May 2020
Edited: Ameer Hamza on 8 May 2020
You can create it using these formulas.
dia = 2;
pitch = 0.1;
height = 1;
syms t
radius = dia/2;
x = radius*sin(t);
y = radius*cos(t);
z = t/(2*pi)*pitch;
tmax = 2*pi*height/pitch;
fplot3(x, y, z, [0 tmax], 'LineWidth', 2)

  0 Comments

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by