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

10 ビュー (過去 30 日間)
farzad
farzad 2020 年 5 月 8 日
コメント済み: baris 2024 年 2 月 15 日
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)

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 8 日
編集済み: Ameer Hamza 2020 年 5 月 8 日
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)
  1 件のコメント
baris
baris 2024 年 2 月 15 日
what is the purpose of syms and and why did u divede the t with 2*pi at z

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by