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

Home » Public Forums » archive » Least squares fit of a model to a skeleton consisting out of 3D points.
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: Least squares fit of a model to a skeleton consisting out of 3D points. [message #63982 is a reply to message #63934] Wed, 26 November 2008 00:40 Go to previous messageGo to previous message
Johan is currently offline  Johan
Messages: 5
Registered: November 2008
Junior Member
On Nov 24, 4:35 pm, Wox <s...@nomail.com> wrote:
> On Mon, 24 Nov 2008 17:22:53 +0100, Wox <s...@nomail.com> wrote:
>> X=[X,Y,Z] ; (you need to extract the seperate X, Y and Z in your user
>> routine)
>> Y=replicate(1,n_elements(X))
>
> Woops, redefined X :-). I mean Y=replicate(1,n3Dpoints).

Thank you, it seems that krellipsoidfit.pro works rather well. I do
have another question regarding this and will appreciate if can advise
me.

I need to get the 3 angles and axis lengths and use the following code
to get it from the given eigenvalues (evals) and eigenvectors (evec):

semia = sqrt(evals[0]) * 2.0
semib = sqrt(evals[1]) * 2.0
semic = sqrt(evals[2]) * 2.0

a = semia * 2.0
b = semib * 2.0
c = semic * 2.0
semiAxes = [semia, semib, semic]
axes = [a, b, c]

eigenvector = evec[*,0]
eigenvector2 = evec[*,1]
eigenvector3 = evec[*,2]

orientation1 = atan(eigenvector1[1], eigenvector1[0])*!RADEG
orientation2 = atan(eigenvector2[1], eigenvector2[0])*!RADEG
orientation3 = atan(eigenvector3[1], eigenvector3[0])*!RADEG
angles = [orientation1, orientation2, orientation3]

Is this correct or do I need made some adjustments, especially to the
orientation?

Thanks
Johan Marais
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: date conversion
Next Topic: Re: areas with 'hatching' in plots?

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

Current Time: Fri Oct 10 23:52:30 PDT 2025

Total time taken to generate the page: 0.24270 seconds