How to rotate a 2d line a 3d plot

조회 수: 3 (최근 30일)
Pruthvi Acharya
Pruthvi Acharya 2019년 1월 25일
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개)

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by