2
$\begingroup$

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?

$\endgroup$

2 Answers 2

1
$\begingroup$

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]"] 

enter image description here

$\endgroup$
2
$\begingroup$

You have to write the parameters like this (see documentation):

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

enter image description here

Parameter 1: Center
Parameter 2: Radii
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}}]] 

enter image description here

I'm afraid you have to do some arithmetic to get {100, 200}, {1, 0.5} from {{-100, 200}, {100, -200}}

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.