MatLab code for generating a surface as shown in the attached figure: an ellipse in the X-Y plane is twisted by 90deg as it progresses along Z-axis.

 Accepted Answer

As an approximation:
[TH,R] = ndgrid(linspace(0,pi/2,200),linspace(10,22,200));
Z = sin(50*TH);
[X,Y,ZZ] = pol2cart(TH,R,Z);
surf(X,Y,ZZ,'edgecolor','none')
axis equal
view(-35,66)

3 Comments

sir, i have re attached the image, thank you for pointing it out :D
That is not the original image. The original image was much flatter than that, and the inner edge was symmetric, reaching close to 10 on the vertical and horizontal axes, the same on each, not 14 on one and 10 on the other.

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!