Write a matlab code to plot the 3D image of the helix below:

23 visualizaciones (últimos 30 días)
mujtaba Ali
mujtaba Ali el 4 de Abr. de 2021
Comentada: Muhammad Taimoor Adil el 15 de Abr. de 2021
Use the following parameters and equations that define the axes in 3D:
p=0.199; Pitch distance
a=0.02999500; Radius of the helis wire
b=0.191; Radius of the helix
n = 5, is the number of turns.
δ =atan(p/(2*pi*b));
x= b + a cos(Ө)
y= -a sin(Ө) sin(δ)
x =xsin(ф)+ycos(ф);
y =-xcos(ф)+ysin(ф);
z =p*ф/(2*pi)+a*sin(Ө)*cos(δ);
  9 comentarios
Image Analyst
Image Analyst el 8 de Abr. de 2021
UMER! Like I said, read the last sentence of DGM's last two comments. Now, what do they say? And why do you refuse to do it even after he and I explicitly asked? So all we can assume is that you don't want to share your code and want to fix it yourself, which is fine - it's your homework after all, not ours.
Muhammad Taimoor Adil
Muhammad Taimoor Adil el 15 de Abr. de 2021
Umer. You need to create meshgrid from the two parameters (theta and phi). In order to define theta and phi see answer below by Image Analyst. In the 3d paramteric equations, put the output from the meshgrid command. This will hopefully solve your problem.

Iniciar sesión para comentar.

Respuestas (1)

Image Analyst
Image Analyst el 4 de Abr. de 2021
No thank you. It was not on my agenda for today and you're probably not allowed to turn in my work as your own anyway. So read this first:
and here's a hint for you in the meantime
numPoints = 1000;
theta = linspace(0, n*2*pi, numPoints);
xPrime = b + a .* cos(theta);

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by