Unreal convert vector to vector 2d5/7/2023 ![]() If v1 and v2 are already normalised then |v1||v2|=1 so, Page: cos(angle/2) = sqrt(0.5*(1 + cos (angle)))īecause |v1 x v2| = |v1||v2| sin(angle) we can normalise (v1 x v2) by dividingĪlso apply v1v2 = |v1||v2| cos(angle)so, Now substitute half angle trig formula on this Multiply x,y,z and w by 2* cos(angle/2) (this will de normalise the quaternion So substituting in quaternion formula gives: Page: sin(angle/2) = 0.5 sin(angle) / cos(angle/2) We can use this half angle trig formula on this The axis angle can be converted to a quaternion as follows, let x,y,z,w beĮlements of quaternion, these can be expressed in terms of axis angle as explained This is a bit messy to solve for q, I am therefore grateful to minorlogic for the following approach which converts the axis angle result to a quaternion:
0 Comments
Leave a Reply. |