How to rotate a 2d line a 3d plot
3 views (last 30 days)
Show older comments
So I have a 2d line in the xz plane, whose function I don't know, I want to rotate that line about the z axis. For example, if i have a straight line in the xz plane and i rotate it about the z axis I will get a cone.
I know I am suppose to use the rotation matrix;
R_z = (cos(theta),-sin(theta),0;sin(theta),cos(theta),0;0,0,1);
but my issuse is how do I display that rotated line as a surface plot.
Or would it be easier to transfer the 2d line into spherical coordinates, but I don't know how to plot spherical coordinates in Matlab.
Thanks
0 Comments
Answers (0)
See Also
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!