Rael Delcon
Registered User
Join date: 23 Nov 2006
Posts: 86
|
05-10-2009 13:51
Hi there. Let's say I have a plane (a box 10x10x0.01) that has no rotation (<0,0,0,1>  and that I've determined three points in the space (say A,B and C). I would like to calculate the rotations need to make the plane complanar to the (ideal) plane deternined by the three points. My line of reasoning is that I will first move the box so that its center is in A, then I can rotate it along the axis x (or y) until it will touch B. Finally I'll rotate around the line A-B until it will touch C. Of course this is just the idea, I'll need to work out the equations that correspond to this reasoning. Has anyone already solved this? It seems hard enough for me, I might take ages to come out with a solution (if I can find one!). RD
|
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
|
05-10-2009 14:56
There are several threads in the Scripting Tips forum that might help. Do a search there or the keywords "plane + points," for example. There's also a nice library of matrix functions, referenced in  , that you may find helpful.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask....  Look for my work in XStreetSL at 
|
hurly Burleigh
Registered User
Join date: 19 Sep 2005
Posts: 167
|
05-11-2009 02:53
there is a freebie tool called vertix or something simliar that allos tou to place three small spheres then touch them and prodice a triangular prim that has its corners at the spheres. IM me inworld and i will send you a copy
|
Gaia Clary
mesh weaver
Join date: 30 May 2007
Posts: 884
|
05-11-2009 03:00
Isn't this just determining the normal vector of the triangle ? I think, this text gives you all math you need to calculate the vector: http://www.kev.pulo.com.au/sv3/sv3_1999_assignment2/node22.htmlThen you should be able to apply a rotation ...
|
Rael Delcon
Registered User
Join date: 23 Nov 2006
Posts: 86
|
05-12-2009 05:57
Thanks for the pointers! I will dig more into those. I hope I won't have to use the full matrix operations package for what I have in mind.
RD
|