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
in
Science & Mathematics
➔ Mathematics
Thanks. But this is non-weighted averaging, which is the same as:
Normalize ((a+b+c+d)/4)
What I need is to assign weights to the vectors, so for this instance, all weights are the same, but for other geometries, I could use weights like face area or angle between 2 edges.
2007-08-01
07:02:50 ·
update #1