Math 1321 Week 4 Lab Worksheet Due Thursday 02/07

advertisement
Math 1321
Week 4 Lab Worksheet
Due Thursday 02/07
1. Find an equation of the plane that passes through the point (6, 3, 3) and is perpendicular
to the vector h−2, 1, 5i.
Solution: Denote x0 = (6, 3, 3) and x = (x, y, z). The equation of a plane satisfies
n̂ · (x − x0 ) = 0, that is the normal vector of the plane is orthogonal to every line
inside of the plane. For this particular example, we want the plane to be orthogonal
to h−2, 1, 5i, and thus the normal vector of the plane should be parallel to this vector.
Using this argument we compute h−2, 1, 5i · (x − x0 ) = 0 to find, h−2, 1, 5i · (x −
6, y − 3, z − 3) = 0 ⇐⇒ −2x + y + 5z − 6 = 0.
2. Plane Geometry Consider the vectors a = h−5, 3, 7i and b = h6, −8, 2i.
(i ) Find a vector which is perpendicular to both a and b.
(ii ) Find a plane which is perperndicular to your answer from part(i), and passes
through the point (1, 2, 3). Hint: Use your answer from part(i) as the normal
vector for the plane.
(iii ) At what point does the line parameterized by x(t) = 1 + 2t, y(t) = 2 − t, z(t) = 3 + t
intersect the plane you found in part(ii )?
Solution:
(i ) The vector c = a × b will be perpendicular to both of the vectors. Upon
computing the cross product we find a × b = i(3(2) − (−8)(7)) − j((−5)(2) −
(6)(7)) + k((−5)(−8) − (6)(3)) = h62, 52, 22i.
(ii ) Using h62, 52, 22i as the normal vector to the plane, we know this vector needs to
be perpendicular to every line lying in the plane (or equivalently perpendicular
to every vector aligned in the direction of the plane). An arbitrary vector aligned
in the direction of the plane can be described as hx − 1, y − 2, z − 3i. Finally,
computing h62, 52, 22i · hx − 1, y − 2, z − 3i = 0, we find the equation of the
plane to be 62x + 52y + 22z = 232.
(iii ) To find the point of intersection of the parameterized line, and the plane constructed in part(ii ), we need to plug in the x, y, z values for the line into the
equation for the plane and solve for t. In doing so we find 62(1 + 2t) + 52(2 −
t) + 22(3 + t) = 232 ⇐⇒ 94t = 0 ⇐⇒ t = 0. Thus when t = 0, the line and
the plane intersect. Plugging t = 0 back in to the parameterized line to find the
(x, y, z) values, we find the intersection occurs at the point (1, 2, 3).
3. Putting 3D in Perspective Computer graphics programmers face the same challenge
as the great painters of the past: how to represent a three-dimensional scene as a flat
image on a two-dimensional plane (a screen or a canvas). To create the illusion of perspective, in which closer objects appear larger than those farther away, three-dimensional
objects in the computer’s memory are projected onto a rectangular screen window from
a viewpoint where the eye, or camera, is located. The viewing volume- the portion of
space that will be visible- is the region contained by the four planes that pass through
the viewpoint and an edge of the screen window. If objects in the scene extend beyond
these four planes, they must be truncated before pixel data are sent to the screen. These
planes are therefore called clipping planes.
Suppose the screen is represented by a rectangle in the yz−plane with vertices (0, ±400, 0)
and (0, ±400, 600), and the camera is placed at (1000, 0, 0). A line L in the scene passes
through the points (230, −285, 102) and (860, 105, 264). At what point should L be
clipped by the left clipping plane?
Solution: If we view the screen from the camera’s location, the vertical clipping
plane on the left passes through the points (1000, 0, 0), (0, −400, 0), and (0, −400, 600).
A vector from the first point to the second point is v1 = h−1000, −400, 0i and a vector from the first point to the third is v2 = h−1000, −400, 600i. Thus a normal vector
to the left clipping plane is found by computing n̂ = v1 × v2 = −240, 000i + 600, 000j
or −2i + 5j, and an equation for the left clipping plane is
−2(x − 1000) + 5(y − 0) + 0(z − 0) = 0
found from computing n̂ · (x − x0 ) for x = hx, y, zi and x0 = h1000, 0, 0i. In a similar
fashion the right clipping plane can be computed and we arrive at the equations
describing the left and right clipping planes respectively
left :
right :
2x − 5y = 2000
2x + 5y = 2000
The lower clipping plane is given by z = 0. Finally we must find the upper clipping
plane. The upper clipping plane passes through the points (1000, 0, 0),(0, −400, 600),and
(0, 400, 600). Vectors from the first point to the second and third points are given
by v1 = h−1000, −400, 600i and v2 = h−1000, 400, 600i, and a normal vector to the
upper clipping plane is n̂ = v1 × v2 = −480, 000i − 800, 000k or 3i + 5k. Finally an
equation for the upper clipping plane is found to be
3x + 5z = 3000
The line L can be described parameterically by x = 230 + 630t, y = −285 + 390t,
and z = 102 + 162t. Plugging these values into each of the clipping planes, we find
the value of t for which the line and the plane intersect. We must then determine (by
plugging that value of t back in to the parametric equations) if those points are inside
of the viewing area or not. If they are not, then the clipping must occur upon the
intersection of a different clipping plane. For example, we find the line L intersects the
. The
left clipping plane by solving 2(230+630t)−5(−285+290t) = 2000 =⇒ t = −1
6
corresponding point is then given by the parametric equations to be (125, −350, 75).
This is inside of the viewing volume, so one of the clipping points of the line L occurs
here. In a similar fashion we check the remaining planes to find the only other point
which is also inside of the viewing volume in the upper clipping plane at the point
(650, −25, 210). See attached figures for sketch of geometry.
rst
Ci
-ci
-J
2
c:.
N
cL
tI
C
C
0
Ii
c—
J-
i—
1-
c
-
Download