How to rotate a 2d line a 3d plot
조회 수: 3 (최근 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!