Orientation of ellipsoid

37 ビュー (過去 30 日間)
Sakshi
Sakshi 2011 年 6 月 13 日
コメント済み: Amin Ataei 2020 年 12 月 18 日
Hello, I am using ellipsoid function to represent an ellipsoid graphically. The input list requires me to enter the coordinates of the centre of ellipsoid and its semi-axes. There is no input for the orientation of the axis of the ellipsoid with respect to the coordinate system. Is there any way, this can be incorporated if my ellipsoids are at angle with respect to x, y and z axis.

採用された回答

Matt Fig
Matt Fig 2011 年 6 月 13 日
See the help for the ROTATE function.
For example:
[x, y, z] = ellipsoid(0,0,0,5.9,3.25,3.25,30);
S = surfl(x, y, z);
colormap copper
axis equal
xlabel('X')
ylabel('Y')
zlabel('Z')
pause % Push return to see the rotation take place.
rotate(S,[0 0 1],45)
  11 件のコメント
Sakshi
Sakshi 2011 年 6 月 15 日
Thank you for your time and patience.
Amin Ataei
Amin Ataei 2020 年 12 月 18 日
after rotation the ellipsoid , how can we check if a given point with its coordinante(x,y,z) is inside of ellipsoid.
If ellipsoid is oriented in main axes we can use the equation from ellipse also :
(x/a)2 + (y/b)2 + (z/c)2 < 1 point is inside ellipsoid
(x/a)2 + (y/b)2 + (z/c)2 > 1 point is not inside ellipsoid
but how can we check the point when ellipsoid is rotated? in this case are all point of ellipsoid rotated and we can not use upper equation anymore , right?

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

その他の回答 (1 件)

Harsha Vardhan Rao  Avunoori
Harsha Vardhan Rao Avunoori 2011 年 6 月 13 日
You can generate an ellipsoid with the ellipsoid function and while plotting you can use the rotate() suggest by Matt.It should help you.

カテゴリ

Help Center および File ExchangeLighting, Transparency, and Shading についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by