VEX: Point Pitch, Yaw, Roll

June 17, 2020

matrix3 m = maketransform(@N,@up);@orient = quaternion(m); vector4 pitch = quaternion({1,0,0}ch(‘pitch’)); vector4 yaw = quaternion({0,1,0}ch(‘yaw’));vector4 roll = quaternion({0,0,1}*ch(‘roll’)); @orient = qmultiply(@orient, pitch);@orient = qmultiply(@orient, yaw);@orient = qmultiply(@orient, roll);

VEX: Rotation Around Axis

May 19, 2020

float angle = chf(“angle”); vector4 rot = quaternion(radians(angle), {1,0,0}); @N=qrotate(rot, @N);

VEX: SOP Rotation

May 24, 2017

f@speed = fit01(rand(@ptnum), ch('minSpeed'), ch('maxSpeed')); float angle = (ch('angle')+@ptnum)*@speed; vector axis = sample_direction_uniform(rand(@ptnum*ch('seed'))); @orient = quaternion(angle, axis);