CSE385: Homework #1 Assigned: March 14, 2003 Due: March 21, 2003 You should hand in this homework at the start of class on Friday, March 21. Remember to write clearly and legibly. Unreadable answers will receive 0 credit. For the purposes of this homework, you should assume that we are using a right-handed coordinate system. 1. Let a vector v = [5 3 7]. (a) Compute v , the vector length of v. (b) Compute the angle v which makes with the x-axis [1 0 0]. Express your answer in radians. (c) Show that the vector u = [1 - 4 1] is orthogonal to v. 2. Let p1 , p2 , p3 , and p4 R3 be four points in 3D Euclidean space. They make two triangles t1 (p1 , p2 , p3 ), and t2 (p3 , p2 , p4 ). (a) Give an expression for the normal vector n of the triangle t1 involving p1 = (x1 , y1 , z1 ), p2 = (x2 , y2 , z2 ), and p3 = (x3 , y3 , z3 ).
(b) Give an expression for the dihedral angle a between two triangles t1 and t2 involving p1 , p2 , p3 , and p4 . (Dihedral angle is the angle between two planes.) 3. Consider the three vectors: [1 0 0], [1 1 0], and [1 1 1] R3 . Show that
they are linearly independent. Derive an orthonormal basis from these vectors, starting with [1 0 0]. 4. Show that the multiplication and division of two complex numbers z1 = r1 (cos 1 + i sin 1 ) and z2 = r2 (cos 2 + i sin ) are z1 z2 = r1 r2 (cos( 1 + 2 ) + i sin( 1 + 2 )) and z1 /z2 = r1 /r2 (cos( 1 - 2 ) + i sin( 1 - 2 )). 5. Show that the multiplication of two quaternions q1 = (s1 , v1 ) and q2 = (s2 , v2 ) is q1 q2 = (s1 s2 - v1 · v2 , s1 v2 + s2 v1 + v1 × v2 ).
6. An ellipsoid with center at the coordinate origin couble be de ned in an implicit expression as x2 a2 + y2 b2 + z2c2 = 1.
Give its parametric form with parameter u, v (0 = u, v = 1). 1
For real part,
= = = 0, becuase v × p is orthogonal to v. For imaginary part,
Figure 1: 3D Rotation of a vector p by the angle with the axis n.
= = = 7. Fill in the blanks (Equations (5), (6), and (8), and the expressions between = Equations (6) and (7).= Don’t pay to +the number (s2 - v · v)pattentaion + 2(v · p)v 2s(v × p). of ’=’. If you need, you can increase its number.) First of all, let’s look into the angular displacement. We can calculate a vector Rp when a vector p is rotated by the angle with the axis n.
Therefore, n = (p · n)n qp¯ q = (0, (s2 - v · v)p + 2(v · p)v + 2s(v × p)). (7)
(1)
p =p-n
p -ˆ(p · n)n Now we substitue s = cos and v ==sin n.
(2)
A vector p is orthogonal to vectors n and p at the same time.
qp¯q =
p = n × p = n ×=p
A vector p will become Rp = Rp - n after it is = rotated. Rp the = cos p + sinpart p of Equation (8) shows Compared with Equation (5), imaginary the result of rotating p by angle 2 about the axis ˆ n.
(3) (8) (4)
Therefore, we can derive Rp as followings: Rp = n + Rp
= = =
(5)
Equation (5) is the angular displacement, which is the formula for rotating a vector p by angle with the axis n. Now let an unit quaternion q = (s, v). Because q is an unit quaternion, |q|2 = q¯ q = s2 + v2 = 1. Since cos2 + sin2 = 1, we can express
q = (cos , sin ˆ n), where ˆ n is an unit vector (|ˆ n| = 1). As we studied in q, where p is a quaternion p = (0, p).
last class, Rp = qp¯
qp¯q = (s, v)(0, p)(s, -v) = ( , )( , ) =(,) 32
(6)