- #1

- 2

- 0

## Main Question or Discussion Point

Hi,

I have been referencing this (https://www.physicsforums.com/threads/radius-of-ellipsoid.251321/) previous post to calculate the radius of a Triaxial Ellipsoid (a>b>c), but I'm running into some issues.

Let

0 ≤ ϕ ≤ π

0 ≤ θ ≤ 2π

and

x=r * cos(θ) * sin(ϕ)

y=r * sin(θ) * sin(ϕ)

z=r * cos(ϕ)

sub into

Ellipse: (x/a)2+(y/b)2+(z/c)2=1

and solve for r

##r=\sqrt{\frac{a^2}{{cos^2\theta}{sin^2\phi}}+\frac{b^2}{{sin^2\theta}{sin^2\phi}}+\frac{c^2}{cos^2\phi}}##

The issue is that the products squares of the cosines and sines drive a division by zero.

For instance

if a = 100, θ = 0, ϕ = 0

the first part of eqn (5) is

##\frac{a^2}{{cos^2\theta}{sin^2\phi}} = \frac{10000}{cos(0) * cos(0) * sin(0) * sin(0)} = \frac{100^2}{1 * 1 * 0 * 0}=\frac{10000}{0} = DIV / 0##

I'm missing something obvious I'm sure, what is it?

Thanks, Paul.

I have been referencing this (https://www.physicsforums.com/threads/radius-of-ellipsoid.251321/) previous post to calculate the radius of a Triaxial Ellipsoid (a>b>c), but I'm running into some issues.

Let

0 ≤ ϕ ≤ π

0 ≤ θ ≤ 2π

and

x=r * cos(θ) * sin(ϕ)

**(1)**y=r * sin(θ) * sin(ϕ)

**(2)**z=r * cos(ϕ)

**(3)**sub into

Ellipse: (x/a)2+(y/b)2+(z/c)2=1

**(4)**and solve for r

##r=\sqrt{\frac{a^2}{{cos^2\theta}{sin^2\phi}}+\frac{b^2}{{sin^2\theta}{sin^2\phi}}+\frac{c^2}{cos^2\phi}}##

**(5)**The issue is that the products squares of the cosines and sines drive a division by zero.

For instance

if a = 100, θ = 0, ϕ = 0

the first part of eqn (5) is

##\frac{a^2}{{cos^2\theta}{sin^2\phi}} = \frac{10000}{cos(0) * cos(0) * sin(0) * sin(0)} = \frac{100^2}{1 * 1 * 0 * 0}=\frac{10000}{0} = DIV / 0##

I'm missing something obvious I'm sure, what is it?

Thanks, Paul.