CS 447/547: Computer Graphics Homework 1 solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (2 votes)

Question 1: Vectors are very important to computer graphics and they are used to represent both locations in space (points) and directions. Assume you have three points in 2D space, represented by a=[𝑎𝑥,𝑎𝑦], b=[𝑏𝑥,𝑏𝑦], and c=[𝑐𝑥,𝑐𝑦].

a. How do you find the direction vector v that points from a toward b?
b. How is the length,‖𝐯‖, of v computed?
c. A unit vector,𝐯̂, in the direction v is a vector in the same direction as v but with length 1. How do you compute 𝐯̂? Computing 𝐯̂ is also referred to as normalizing v.

Question 2: Consider two vectors in 3D, a and b.

a. How is the dot product 𝐚∙𝐛 computed?
b. What is the relationship between 𝐚∙𝐛 and the angle between a and b?
c. How is the cross product vector 𝐜=𝐚×𝐛 computed?
d. What is the geometric relationship between a, b and c?
e. What is the geometric relationship between 𝐚×𝐛 and 𝐛×𝐚?
f. What is the relationship between 𝐚×𝐛 and the angle between a and b?

Question 3: What is the solution to the following quadratic equation?
𝑥2+3𝑥+2=0

Question 4: What is the distance from a 2D point 𝐩=[𝑝𝑥,𝑝𝑦] to a line 𝑎𝑥+𝑏𝑦+𝑐=0?

Question 5: This question concerns the definition of a 3D parametric line.

a. What is the minimum number of points needed to define a unique line in 3D that passes through all the points? What other conditions must the points satisfy for the line to be unique?
b. Given more than the minimum number of points, is it in general possible to find one line that passes through all of them?
c. A 3D parametric line is usually defined as 𝐩=𝐨+𝑡𝐝. Label your points p1, p2, etc. Find two vectors o and d in terms of the points.

Question 6: What is the result of the following matrix multiplication of a vector? [12541123115][213]