필터 지우기
필터 지우기

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

조회 수: 5 (최근 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 CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by