#### Archived

This topic is now archived and is closed to further replies.

# Matrix Bones

This topic is 5494 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''d read somewhere that bones are represent by matrix.. but now, if i have start and end point of a bone, how can i represent it like a matrix ?? I want to moltiply the bone matrix to a vector vertex to move this vertex in the space.. how can i do it ?

##### Share on other sites
Is there, per chance, any mention of matrix stacks in the article that you have read?

##### Share on other sites
No, i have read nothing about matrix stack..

##### Share on other sites
Ok, sorry, matrix stacks aren't required at all for what you want (though they are related).

You want a matrix transformation such that the "bone" at the position (0,0,0) - (0,1,0) (for instance), is moved to the position (startpoint) - (endpoint). Once you have such a transformation, you can apply it to any point, and it will be transformed to the "bone space".

The transformation that you are looking for is simply a composition of a scaling transformation, a rotation transformation, and a translation transformation. Depending on the graphic package that you are using, building the matrices to do these transformation might be very easy.

- The scaling factor is simply the length of the vector (endpoint - startpoint)
- The rotation angle is the angle between the vector (endpoint - startpoint) and the vector (0,1,0). The axis is the crossproduct of these two vectors.
- The translation vector is simply (startpoint)

I hope that this is clear...

Cédric

[edited by - cedricl on July 6, 2003 11:38:11 AM]

##### Share on other sites
If you don''t know enough about matrices, ask python_regious about his tutorial

##### Share on other sites
Where can i find python_regious tutorial ??? Anyway.. tnx for all !

##### Share on other sites
In the articles & resources section. Alternately, you could make a member search for python_regious and look at his "Contributions" section.

1. 1
2. 2
Rutin
24
3. 3
4. 4
JoeJ
19
5. 5

• 14
• 26
• 11
• 11
• 9
• ### Forum Statistics

• Total Topics
631771
• Total Posts
3002252
×