how to plot ellipsoid?

조회 수: 41 (최근 30일)
TheRealTonyStark
TheRealTonyStark 2019년 7월 13일
댓글: Star Strider 2021년 4월 11일
ellipsoid equation is x^2 +y^2 +2z^2 =10

답변 (3개)

SYED IMTIAZ ALI SHAH
SYED IMTIAZ ALI SHAH 2019년 7월 13일
Your question need more elaboration, however this might help
  댓글 수: 1
TheRealTonyStark
TheRealTonyStark 2019년 7월 13일
Thankyou I got my answer.

댓글을 달려면 로그인하십시오.


Star Strider
Star Strider 2019년 7월 13일
Try this (partially copied from the documentation page Connecting Equal Values with Isosurfaces):
x = linspace(-10, 10, 50);
[X,Y,Z] = meshgrid(x);
V = (X.^2 + Y.^2 + 2*Z.^2);
figure
hp = patch(isosurface(X,Y,Z,V,10))
isonormals(X,Y,Z,V,hp)
hp.FaceColor = 'r';
hp.EdgeColor = 'none';
camlight left;
lighting gouraud
grid on
view(-20,30)
producing:
how to plot ellipsoid - 2019 07 13.png
Also see the documentation on the isosurface function.
  댓글 수: 2
qilin guo
qilin guo 2021년 4월 11일
Very good! It helps me! Thank you very much!
Star Strider
Star Strider 2021년 4월 11일
My pleasure!

댓글을 달려면 로그인하십시오.


Matt J
Matt J 2021년 4월 11일
편집: Matt J 2021년 4월 11일
You can also use,
which has the convenience of letting you specify yaw/pitch/roll angles for the ellipsoid.
[Center,ABC,YPR]=deal([0 2 1] , [6 2 1], [60 40 0]); %center, radii, yaw/pitch/roll
obj=ellipsoidalFit.groundtruth([],Center,ABC,YPR);
plot(obj, {'FaceColor', 'm'});
xlabel X; ylabel Y; zlabel Z

카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by