フィルターのクリア

How can you use coneplot to plot a single cone in a specific direction?

12 ビュー (過去 30 日間)
Laurence hutton-smith
Laurence hutton-smith 2015 年 6 月 2 日
回答済み: Nuno 2015 年 6 月 5 日
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!

採用された回答

Star Strider
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 件のコメント
Laurence hutton-smith
Laurence hutton-smith 2015 年 6 月 2 日
Hey! Sorry about that, I was very unclear, however I did get it working! :D I just had to force the origin into place.
Star Strider
Star Strider 2015 年 6 月 2 日
No worries! I’m glad you got it working.

サインインしてコメントする。

その他の回答 (1 件)

Nuno
Nuno 2015 年 6 月 5 日
Hello! How you change the direction?

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by