Hi,
I am trying to average a set of vectors using slerp, but I couldn't figure out the algorithm for it.
I tried using 4 vectors obtained from each side of a pyramid where base is a perfect square. So my vectors in this case is:
{[0,-0.946941,0.321407], [0.946941,0,0.321407], [0,0.946941,0.321407], [-0.946941,0,0.321407]}
and the angles between them:
{35.6355, 35.6355, 35.6355, 35.6355}
I tried using this: http://en.wikipedia.org/wiki/Slerp
How can I combine these 4 vectors so I get the value [0,0,1]?
The reason is, I want to implement a weighted averaging method. So if I want, I could pass the area of polygons as weights to determine the final averaged normal, instead of add them all and divide by the number.
Thanks for the help!
2007-08-01
06:29:56
·
2 answers
·
asked by
Léon
1