How to rotate a 2d line a 3d plot
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!