isosurface in cylindrical coordinates

34 ビュー (過去 30 日間)
Marcel Lacroix
Marcel Lacroix 2021 年 2 月 3 日
コメント済み: Marcel Lacroix 2021 年 2 月 11 日
Hi.
How can I plot a 3D surface of the function F(r, theta,z) with 'isosurface'? The cylindrical coordinates are r, theta and z (r is the radius, theta is the angle and z is the axial coordinate)?
A million thanks for your help

採用された回答

darova
darova 2021 年 2 月 4 日
編集済み: darova 2021 年 2 月 4 日
Use isosurface normally
[f,v] = isosurface(R,THETA,Z,F,isovalue); % returns faces and vertices
Convert cylindrical coordinates into cartesian
x = v(:,1).*cos(v(:,2));
y = v(:,1).*sin(v(:,2));
z = v(:,3);
Use patch to plot
patch('Faces',f,'Vertices',[x y z])
  1 件のコメント
Marcel Lacroix
Marcel Lacroix 2021 年 2 月 11 日
It works. Many many thanks for your help.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeScalar Volume Data についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by