float angle = @Time; vector axis = rand(@ptnum); matrix3 m = ident(); rotate(m, angle, axis); @orient = quaternion(m);
e.g.2)
float angle = @Time; vector axis = rand(@ptnum); @orient = quaternion(angle, axis);
float angle = chf("angle"); vector4 rot = quaternion(radian(angle), {0, 1, 0}); @N = qrotate(rot, @N);http://www.sidefx.com/docs/houdini/vex/snippets.html
https://www.sidefx.com/docs/houdini/dopparticles/attributes.html
vector4 quaternion(matrix3 rotations)
Creates a vector4 representing a quaternion from a 3×3 rotational matrix.
vector4 quaternion(float angle, vector axis)
Creates a vector4 representing a quaternion from an angle and axis. The angle is specified in radians.
vector4 quaternion(vector angleaxis)
Thanks for sharing knowledge!
http://www.tokeru.com/cgwiki/index.php?title=HoudiniVex
https://www.sidefx.com/forum/topic/34836/
No comments:
Post a Comment