Revolving a curve about the y-axis to generate a 3D surface
Show older comments
I'm aware that the cylinder() functiond does this for revolutions about the x-axis. But is there a way to do this about the y-axis?
Accepted Answer
More Answers (1)
Or, interchange the data when you plot, e.g.,
t = 0:pi/10:2*pi;
r = 2 + cos(t);
[X,Z,Y] = cylinder(r);
surf(X,Y,Z);
xlabel X; ylabel Y; zlabel Z;
1 Comment
Researcher
on 13 Jun 2022
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



