Plotting an ellipsoid

279 Views Asked by At

I need to draw an ellipsoid with an equation on this form: $$ (Kx+y+z)x + (Ky+x+z)y + (Kz+x+y)z = 1 $$ where K is a constant.

Here is an example of wolfram drawing it for $K=8$: http://goo.gl/Ds5WWe

The program i'm using accepts ellipsoid in this form: $$ {x^2 \over a^2}+{y^2 \over b^2}+{z^2 \over c^2}=1 $$

How does K relate to a, b and c?

I have tried using high school algebra and come up with this:

$$ K x^2+K y^2+K z^2+2 x y+2 x z+2 y z = 1 $$

2

There are 2 best solutions below

0
On BEST ANSWER

As noted in the comments your ellipsoid is rotated in such a way that its coordinate axes are no longer given by the standard basis. So it can not be written in your form.

But it is possible to describe exactly in which way the coordinate axes are tilted.

I assume $K>2$. Then there exists $c>0$ such that $K=c^2+\frac{1}{c^2}$. Then

$$\left(cx+\frac{1}{c}y\right)^2+\left(cy+\frac{1}{c}z\right)^2+\left(cz+\frac{1}{c}x\right)^2=Kx^2+Ky^2+Kz^2+2xy+2yz+2xz$$

That is, your ellipsoid is the preimage of the standard sphere $x^2+y^2+z^2=1$ under the invertible linear transformation

$$T\pmatrix{x\\y\\z}=\pmatrix{cx+c^{-1}y\\cy+c^{-1}z\\cz+c^{-1}x}$$

which can be written in matrix form as

$$T=\pmatrix{c & c^{-1} & 0\\0 & c & c^{-1}\\ c^{-1} & 0 & c}$$

This matrix (or rather, its inverse) describes the way in which you have to stretch and rotate the standard sphere to obtain your ellipsoid.

0
On

I assume $K>1$. If you only want to know $a, b, c$, you can diagonalize the matrix

$$A=\pmatrix{K & 1 & 1\\1 & K & 1\\ 1 & 1 & K}$$

the eigenvalues are $K-1, K-1$ and $K+2$. So $a, b, c$ would be

$$\frac{1}{\sqrt{K-1}}, \frac{1}{\sqrt{K-1}}, \frac{1}{\sqrt{K+2}}$$