フィルターのクリア

How can I plot functions on sphere?

1 回表示 (過去 30 日間)
Kavita Goyal
Kavita Goyal 2013 年 3 月 21 日
I have a set of N points on a unit sphere. The Cartesian coordinates of these N points are stored in X (a 3xN matrix). Further I know the value of a function f on these N points in the form of F (1xN vector).
I want to plot my function. I want a figure, like the one which we get using 'surf' function.
Any help?

回答 (1 件)

Wouter
Wouter 2013 年 3 月 21 日
編集済み: Wouter 2013 年 3 月 21 日
You should probably use convhull to get the connections between the points (vertices):
K = convhull(points);
You can then use patch to draw an image:
patch('vertices',points,'faces',K,'cdata',F); % draw it
axis equal tight vis3d % set axis
view(3) % set camera view to a 3D position
Use help patch to get more details on how to adapt the properties of the 3d plot

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by