Lab 1: Points and vectors
3D Computer Graphics
Exercise 1
Given are two vectors u = (2, 1, 1) and v = (1, 3, 2) and two points P = (2, 1, 5) and Q = (1, 3, 4). a) Compute 2u + 3v. b) Compute the length of u. c) Reverse u. d) Normalize v. e) Compute the dot product of u and v. f) Compute the cross product of u and v. g) Compute the vector w from point P to point Q.
Denition
Two vectors u and v are perpendicular if the angle between them is 90 .
Denition
A unit vector is a vector with length = 1.
Exercise 2
a) What is the dot product of two perpendicular vectors a and b? b) What is the length of the cross product of two perpendicular unit vectors u and v?
Exercise 3
Assume three points P = (2, 1, 5), Q = (1, 3, 4) and R = (1, 4, 3). There is a unique plane in 3D space which contains these three points. a) Find a unit vector u which is perpendicular to this plane.
b) Can you nd an easy way to determine whether a vector v points to the same side of this plane as u?
Exercise 4
Given a vector u = (ux , uy , uz ) and a positive real number c. Show that the length of the vector obtained by the scalar multiplication of u and c is equal to the length of u times c. |cu| = c|u|
Exercise 5
Assume two vectors u = (1, 0, 0) and v = (0, 1, 0). a) Draw these two vectors in a 3D coordinate system. b) Use the property of the cross product to determine u v. c) Verify your answer to b) by explicitly calculating the cross product of u and v.
Exercise 6
Is the following statement true or false? For any two 3D vectors u and v holds the property that u v = v u.