Draw 3D elliptic cylinder with given parameters

7 ビュー (過去 30 日間)
Lucy
Lucy 2015 年 3 月 18 日
コメント済み: Katherine Zheng 2022 年 5 月 17 日
I want to plot an elliptic cylinder in 3D space. I have the following parameters that I wish to use:
ellipse a-axis: 4.5368 ellipse b-axis: 5.6885 centre of ellipse: [0.5351, -5.2359] Rotation of ellipse: -0.3031 Length of cylinder: 21.98
How do I generate the xyz coordinates necessary to plot the elliptic cylinder?
  1 件のコメント
Katherine Zheng
Katherine Zheng 2022 年 5 月 17 日
Did you luckly figure this out? I need to do similar thing but had no clue. Can anyone please kindly help?

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

回答 (1 件)

KSSV
KSSV 2022 年 5 月 17 日
You may proceed like this:
a = 4.5368 ;
b = 5.6885 ;
C = [0.5351, -5.2359] ;
L = 21.98 ;
u = linspace(0,2*pi) ;
v = linspace(0,L) ;
[U,V] = meshgrid(u,v) ;
X = a*cos(U)+C(1) ;
Y = b*sin(U)+C(2) ;
Z = V ;
surf(X,Y,Z,Z)
axis equal
  4 件のコメント
KSSV
KSSV 2022 年 5 月 17 日
You can rotate the obtained coordinates to your required inclination.
Katherine Zheng
Katherine Zheng 2022 年 5 月 17 日
Thanks a lot!

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

カテゴリ

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