comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Fitting an ellipsoid with MPFITEXPR
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Fitting an ellipsoid with MPFITEXPR [message #74264] Mon, 10 January 2011 04:54 Go to previous message
johan[1] is currently offline  johan[1]
Messages: 11
Registered: December 2010
Junior Member
On Jan 9, 1:27 am, "Phillip M. Bitzer" <phillipbit...@gmail.com>
wrote:
> Ronn Kling has a routine that may be of some help. See:
>
> http://www.kilvarock.com/cool-stuff.htm

On Jan 9, 1:27 am, "Phillip M. Bitzer" <phillipbit...@gmail.com>
wrote:
> Ronn Kling has a routine that may be of some help. See:
>
> http://www.kilvarock.com/cool-stuff.htm

Thanks for both replies. I used the routines from Ronn Kling for some
time but I do have a problem with it. The values for both the size of
the axis and the angles do not seems to be right but if I use the
calculated second moment values, P, together with k=2 as follow:

theta: 0deg -> 360deg
psi: -90deg -> 90deg
u = [sin(theta)*cos(psi), cos(theta)*cos(psi), sin(psi)]
r = k/sqrt((u # invert(P) # u))

I was able to get the right size and shape of the ellispsoid but still
needed the angles.

The routine mpfitellipse.pro is unfortunately only for 2-D. I did try
to extend it to 3D. Again, the size of the axes are incorrect in my
implementation but in this case the angles are correct!

When I created a "combined" routine by calculating the second moments
and using the angles from the 3D implementation of mpfitellipse.pro I
am able to get the desired result.

This will work for me but I feel uncomfortable with the fact that I do
not get all the correct parameters from either Ron Kling's
krEllipsoidFit or the 3D implementation of mpfitellipse, feeling
something must be wrong and my implementation will not stand the test
of time!
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Read large ascii file quickly
Next Topic: Re: FINDFILE problems IDL 8 LINUX

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 07:27:06 PDT 2025

Total time taken to generate the page: 1.36091 seconds