How can you use coneplot to plot a single cone in a specific direction?
조회 수: 8 (최근 30일)
이전 댓글 표시
I am having trouble understanding the syntax of coneplot, I would like to use it to plot a single cone, in a specific direction.
For example i'd like be to place cone pointing in the direction of [-1,1,0] at [1,1,1].
Very much appreciate any help!
댓글 수: 0
채택된 답변
Star Strider
2015년 6월 2일
The coneplot function is a velocity plot.
If you want to plot a single cone, this will get you started:
N = 10;
r = linspace(0, 1, N);
[X,Y,Z] = cylinder(r, N);
figure(1)
h = surf(X, Y, Z);
axis square
rotate(h, [-1 1 0], 90);
I don’t know exactly what you want to do, so you will have to experiment with this. Other functions to consider are cart2sph and sph2cart to produce the rotation you want.
댓글 수: 4
추가 답변 (1개)
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!