0

# N-Dimensional Ellipsoid in 3D Space

Anonymous 6 years ago
This discussion was imported from CodePlex

CMC wrote at 2013-02-20 00:22:

I have a challenge. I would like to represent multiple axes in a 3D ellipsoid. Let's say I have 5 unit axes, so that it's non-trivial, all originating from the same point (origin) and all pointing equal angles from each other. If the current values for each axis is 0.5 (equal) then the 3D shape is a sphere. If one axis is valued at 0.75 and the rest 0.5 then the ellipsoid bulges in that direction. "Bulges" suggests that the surface is interpolated spherically between axis values. The number of axes can vary from case to case.

Does anyone know how to do this? I've searched the web fruitlessly.

Added Bonus challenge: The bulge is colored in a gradient on the ellipsoid as a function of the degree of "bulging".

Thanks.

objo wrote at 2013-02-20 11:34:

I would suggest to map the unit axes to spherical coordinates. Then interpolate the values (radii) on a 2D array (in phi/theta space), and map back to XYZ coordinates. This should be the positions of your mesh. Create the triangle indices the same way as done in the `MeshBuilder.AddSphere` method.
To get the color gradient, you should use texture coordinates. Normalize the values to [0,1] and use a material with a gradient brush.

CMC wrote at 2013-02-21 02:37:

Thank you for your guidance. Perhaps I will start first by trying to draw the N-Dimensional axes, with gradient colors from blue to red (cold to hot) radiating outward,, like spines (Sea Urchin diagram) :)