How to draw a prolate spheroid?

20 visualizaciones (últimos 30 días)
Pritesh
Pritesh el 30 de Mayo de 2018
Editada: Pritesh el 31 de Mayo de 2018
I have two points A(x1, y1, z1), B(x2, y2, z2), minor axis length(a) and major axis length(b). I need to draw a prolate spheroid with A and B as their focii points. This is what I have done till now.
C = (A + B )/2;
[x, y, z] = ellipsoid(C(1),C(2),C(3),b,a,a);
figure
surf(x, y, z)
I need help with rotating this ellipsoid such that the major-axis of the spheroid aligns with the line segment ACB. I am struggling with the angles of rotation and the order or rotation(which axis to rotate first).
Thank you.

Respuestas (0)

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by