how to plot ellipsoid?
67 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ellipsoid equation is x^2 +y^2 +2z^2 =10
0 comentarios
Respuestas (3)
SYED IMTIAZ ALI SHAH
el 13 de Jul. de 2019
Your question need more elaboration, however this might help
Star Strider
el 13 de Jul. de 2019
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:
2 comentarios
Matt J
el 11 de Abr. de 2021
Editada: Matt J
el 11 de Abr. de 2021
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
0 comentarios
Ver también
Categorías
Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!