Roll, Pitch and Yaw: 3-D rotation matrices
• Right handed coordinate systems• Follow development in Wolovich chpt 2• Start with common origin for 2 frames • Rotate w.r.t. each axis• Three 3x3 rotation matrices• Limitation of single origin• Matlab: Modelling Rhino waist, shoulder• 3D 4x4 Homogeneous matrices for translation • First Rhino Lab specs & protocols
Remember remember the dot of the vectors
Right-handed coordinate system
Two coordinates systems rotated at the origin
http://personal.uncc.edu/jamiller/coordinates/rotate.gif
Expressing one coordinate system Point in terms of another coordinate system Point
i0
i1
j0
j1
θ
θ
Looking down at rotation ofθ around the z axis, in termsof unit vectors.
Rotate θ around the z-axis
• We’ve already done that, for the 2-D x-y rotation matrix
Rotate φ around the y-axis
Rotate ζ around the x-axis
3-D rotation matrix multiplication not commutative
Rx*Ry*Rz*Po ≠ Rz*Ry*Rx*Po
http://www.lightandmatter.com/html_books/0sn/ch04/figs/book.png
Roll, Pitch and Yaw•Roll around the x-axis•Pitch around the y-axis•Yaw around the z-axis
http://ultimatepointer.com/images/YawPitchRoll.jpg
An eensy weensy problem for Rhino
• Basic concatenating of 3D rotation matrices to find where a point ends up assumes the rolling, pitching and yawing all take place around a single origin of one cartesian coordinate system.
• Example of 3D rotation: human shoulder socket
• But Rhino shoulder and elbow can have their coordinates systems moved w.r.t. waist
http://www.hopkinsortho.org/orthopedicsurgery/images/instfig1.gif
Matlab demo of rotation matrix sequence order
• exerRot3.m• lines 11, 16, 15• P_orig = [0 1 0]’• After rotZ of 45º then rotX of 45º correct P_dest = [ .5 .5 .707]’
rot_ang_seq = [ [3*ones(4,1) (pi/16)*ones(4,1)]; [1*ones(4,1) (pi/16)*ones(4,1)] ];% shoulder "extend" rotation around x, then waist to "left" 4 clicks. % start at y = 1; 4 steps around x ; 4 steps around z % looking rot_ang_seq = [3*ones(4,1) (pi/16)*ones(4,1)] ;% rot_ang_seq = [ [1*ones(4,1) (pi/16)*ones(4,1)]; [3*ones(4,1) (pi/16)*ones(4,1)] ];% wrong: z rot first, losing arm coordinate system P_orig = [ 0; 1; 0] % [ .707; .707; 0] ; %[ 0 1 0 ]' % [ 0.70711; 0.70711; 1 ] ; % [P_dest, seq_stp] = Th3D_Rot_Seq(P_orig, rot_ang_seq); disp(P_dest) row_sze = size(seq_stp, 2);plot3(seq_stp(1, :), seq_stp(2, :), seq_stp(3, :), 'r*-')
Homogeneous matrix to represent translation by multiplication
scaling rotation translation
example, from http://www.riemers.net/eng/ExtraReading/homogenous_matrices.php
4x4 matrix idea:
• translate elbow joint location to [0 0 0]’
• rotate elbow points (and distal) as required
• translate rotated elbow element back to correct joint location.
• run exerRot4.m for demo of X-axis rotation mimicking Rhino forearm rotation
Grading: Princeton: NYT 1/31/10“Type-A-Plus Students Chafe at Grade Deflation”
by LISA W. FODERARO
• When Princeton University set out six years ago to corral galloping grade inflation by putting a lid on A’s, many in academia lauded it for taking a stand on a national problem and predicted that others would follow.
• But the idea never took hold beyond Princeton’s walls, and so its bold vision is now running into fierce resistance from the school’s Type-A-plus student body.
• With the job market not what it once was, even for Ivy Leaguers, Princetonians are complaining that the campaign against bulked-up G.P.A.’s may be coming at their expense.
• First Rhino Lab, “Limits”
• on engin1930z.pbworks.com
Rhino Lab 1: Limits of rotation• Waist, Shoulder, Elbow and Wrist Flex all
have limits of movement.
• Waist can rotate about 340º independent of other joints.
• Shoulder, Elbow and Wrist have inter-related angles at the limits of rotation: too far back, too far down.
• Your challenge: keep track of clicks for each joint and stop movement near limits.