How to Draw an ellipsoid between two 3d coordinates
3 views (last 30 days)
Hi, I want to draw a 3d ellipsoid between two 3d coordinates x1,y1,z1 and x2,y2,z2. The ellipsoid need to be rotated so its top and buttom touch the coordinates. It should have height of r derived from square root and thickness of r/10.Any help please.so far I manage to draw the ellipsoid using ellipsoid() and draw it using surf in the center of axis. I dont know how to calculate and add the required angles to rotate it and the offset.Thanks.
Matt J on 26 Jul 2021
Edited: Matt J on 26 Jul 2021
Another way would be to use the ellipsoidalFit.groundTruth method in this File Exchange submission.
ABC=[r, r/10 , r/10];
plot( ellipsoidalFit.groundtruth(,center,ABC,[az,-el,0]*180/pi) );