How to draw a generic cylinder with arbitrary orientation

6 ビュー (過去 30 日間)
Mohammad Reza
Mohammad Reza 2023 年 12 月 4 日
編集済み: Mohammad Reza 2023 年 12 月 24 日
Hi,
How to draw a generic cylinder, we have its radius, length, position of center of mass ( or bottom face center) and its orientation (using a unit vector, for example 0,0,1 for z-axis ). Any help would be appreciated.
Regards
Reza
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2023 年 12 月 4 日
How does COM matter in making a graphical cylinder?
Check out cylinder and experiment with it.

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

採用された回答

Matt J
Matt J 2023 年 12 月 4 日
編集済み: Matt J 2023 年 12 月 4 日
See this File Exchange download,
[cCenter,cRadius,cHeight,cYawPitch]=...
deal([0 0 0], 2, 10, [45 -30]); %Cylinder parameters
gtCyl=cylindricalFit.groundtruth([],cCenter,cRadius,cHeight,cYawPitch); %Data-less ground truth objects
plot(gtCyl)
  1 件のコメント
Mohammad Reza
Mohammad Reza 2023 年 12 月 24 日
編集済み: Mohammad Reza 2023 年 12 月 24 日
Thanks.
This is what I learned, in case somebody needs it as well:
Z_axis oriented cylinder: cYawPitch= [0 90]
Y_axis oriented cylinder: cYawPitch= [90 0]
X_axis oriented cylinder: cYawPitch= [0 0]

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Report Generator についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by