Fitting a ellipsoid into a group of spheres (In 2D: fitting an ellipse into set of points)
I am new in using maxscript language and this is my post to this forum. I have the following task to solve, which involves a little bit of maths:
Given a group that consists of a set of spheres
$Group01 = ($Sphere01, ..., $Sphere)
How can I find the best fit ellipsoid/voxel (3D ellipse) that maximally covered all spheres. The final aim is to draw the ellipsoid/voxel on top of the group with see through materials.
Looking it in 2D, the problem can be posed as fitting an ellipse into a set of points. In 2D, we need to compute major and minor axes, center, and orientation.
I would greatly appreciate for any assistance.