# Funny behavior of Ellipsoid function

From its description I thought that the normalizations of the directions d_i of the semi-axes did not matter when using the Ellipsoid function. Indeed, the following two commands give the same output:

Needs["MultivariateStatistics"];
Graphics[Ellipsoid[{0, 0}, {1, 1}, {{0, 1}, {1, 0}}], Axes -> True]
Graphics[Ellipsoid[{0, 0}, {1, 1}, {{0, 100}, {100, 0}}], Axes -> True]


However, if the normalization of the two directions is different, I get a funny behavior. Basically, the radii are multiplied by the normalization of the first direction vector. Use for example:

Graphics[Ellipsoid[{0, 0}, {1, 1}, {{0, 100}, {1, 0}}], Axes -> True]


Does anyone know what is going on?

You can find the details of how the third argument of Ellipsoid is processed by inspecting the code which is available in the package MultiDescriptiveStatistics.m.

nb = NotebookOpen[ToFileName[{\$InstallationDirectory, "AddOns", "Packages",
"MultivariateStatistics"}, "MultiDescriptiveStatistics.m"]];
NotebookFind[nb, "Ellipsoid[mu_?VectorQ, r_?VectorQ, dir_?MatrixQ]"] You have to write the parameters like this (see documentation):

Graphics[Ellipsoid[{0, 0}, {100, 200}, {0, 1}], Axes -> True] Parameter 1: Center
Parameter 3: Direction

EDIT

If you work with vectors, please consider:

Show[Graphics[Ellipsoid[{0, 0}, {100, 200}, {1, 0.5}], Axes -> True],
Graphics@Arrow[{{-100, 200}, {100, -200}}]] I'm afraid you have to do some arithmetic to get {100, 200}, {1, 0.5} from {{-100, 200}, {100, -200}}`

• thanks, but i need to use vectors as directions (which may not be aligned with the axes) – Valerio Jun 26 '14 at 14:12
• Did you find this syntax in the documentation? Where? Also, how do you generalize this syntax to three dimensions? – Valerio Jun 26 '14 at 16:57
• @Valerio link – eldo Jun 26 '14 at 18:19