When I was at ILM there was a cool tool that would calculate the
orientation of an object based on the volume
thanks to the eigenvector.
There they were using some old module called Linear Algebra to get the
eigenvector result from the arrays
of the object, but I know that Numpy has integrated the Linear Algebra
Module so I guess that is the same.
I haven't been able to find a good way to just get an object parsing
on the matrices of the individual vertex and then
feed a 4x4 matrix to Numpy so that would give me a matrix that applied
to a Locator would result to the right orientation of the object even
if the original pivot is completely in a different position like when
we freeze the transform on a rotated object in space.
Anyone got a clue of a reasonably simple way to do that ?
Thank you in advance.
--
http://groups.google.com/group/python_inside_maya
To unsubscribe from this group, send email to python_inside_maya+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
I hope my explanation was clear enough.
Thank you
On Mar 24, 12:04 pm, Ozgur Yılmaz <eoyil...@gmail.com> wrote:
> so you want to stick a locator on to an objects vertex ?
>
> E.Ozgur Yilmaz
> Lead Technical Directorwww.ozgurfx.com
>
numpy.somefunc( someval ) -> eigen_vector ??
once this is clear we can start figuring out how to gather your required inputs.
-chad
> To unsubscribe from this group, send email to python_inside_maya+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
--
i agree!
if anyone pulls this off, please contribute back.
-chad
great to hear form you.
I believe that the linear Algebra Class in Numpy can get that done as
long as you feed in the right matrix.
I guess I don;t know how to get a covariance matrix from a mesh.
It think it is something like gettinng the centroid of an object.
Those libraries are great is there an easy way to call them from
Python that you know ?
Ciao Bro
On Mar 25, 3:38 am, Matthew Chapman <chapman...@gmail.com> wrote:
> Hey Maurizio,
>
> I believe you are looking for the code defining an object oriented bounding
> box. This uses the eigen vectors of a covariance matrix. Alas I cannot
> provide any sample code.... but this site has been kind enough to give out c
> code. A port of this math lib would be a great addition to pymel.
>
> http://www.geometrictools.com/LibFoundation/Containment/Containment.html
>
> Good to hear from you Marurizio don't be a stranger to SF.
>
> Matt
>
the call form numpy is
numpy.linalg.eigh
so basically the clas linalg as a definition to calculate the
eigenvectors if you pass
a covariance matrix.
Not sure how to pass a covariance matrix though.
depends wheather you need to find the