how can I creat a circle in 2 dim and 3 dim?
1 回表示 (過去 30 日間)
古いコメントを表示
how can I creat a circle in 2 dim and 3 dim like this:
I need to write a function that gets 2 radious and back those plot.
回答 (1 件)
DGM
2022 年 1 月 8 日
編集済み: DGM
2022 年 1 月 8 日
You can always try this:
These are convenient tools with syntax similar to ellipsoid() or sphere(). The output is a set of matrices that can be fed directly to surf() or mesh(). These are fully generalized and support independent axis orders. For a simple circular toroid with circular section:
center = [0 0 0];
radius = [1 1 1 3];
order = [2 2];
npoints = 100;
[x y z] = supertoroid(center,radius,order,npoints);
surf(x,y,z)
shading flat
axis equal
colormap(parula)
view(-16,27)
camlight
or for a toroid with superelliptic profile and section:
radius = [1 1 2 3];
order = [5 3];
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Lighting, Transparency, and Shading についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!