CS 418: Homework #3 Solutions, Assignments of Computer Graphics

The solutions to homework #3 for cs 418, due on april 25, 2006. It includes questions on rgb colors, parametric surfaces, implicit equations for surfaces, and projective geometry.

Typology: Assignments

Pre 2010

Uploaded on 03/10/2009

koofers-user-wcs-2
koofers-user-wcs-2 ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 418: Homework #3
Assigned: April 17, 2006
Due: in class April 25, 2006
Please be organized when writing your answers to these questions. Make sure that all solutions are clearly indicated
and labelled with the question they are answering. Remember to write clearly and legibly. Unreadable answers will
receive 0 credit.
Hint: For questions that ask you to derive equations, work through the solution using matrix/vector equations.
Only expand vector equations in terms of individual coefficients if you want to do a lot of extra tedious work.
1. (20 points) You are given three RGB colors with corresponding alpha values:
๎˜€๎˜‚๎˜๎˜„๎˜ƒ๎˜†๎˜…๎˜ˆ๎˜‡๎˜Š๎˜‰๎˜Œ๎˜‹๎˜๎˜…๎˜ˆ๎˜‡ ๎˜Ž๎˜๎˜‹๎˜๎˜…๎˜๎˜‡ ๎˜๎˜’๎˜‘
,
๎˜“
๎˜๎˜„๎˜ƒ๎˜•๎˜”๎˜–๎˜‹๎˜—๎˜”๎˜–๎˜‹๎˜˜๎˜…๎˜’๎˜‘
,
and
๎˜™
๎˜๎˜š๎˜ƒ๎˜†๎˜…๎˜ˆ๎˜‹๎˜๎˜…๎˜ˆ๎˜‹๎˜›๎˜”๎˜œ๎˜‘
with alpha values
๎˜๎˜Ÿ๎˜ž
๎˜ ๎˜…๎˜๎˜‡๎˜Š๎˜Ž๎˜Œ๎˜‹
๎˜"!
๎˜ ๎˜…๎˜ˆ๎˜‡ #
, and
๎˜%$
๎˜&๎˜…๎˜๎˜‡'๎˜‰
.
(a) Compute the color and alpha value for (
๎˜€
over
๎˜“
over
๎˜™
).
(b) Compute the color and alpha value for (
๎˜™
over
๎˜“
over
๎˜€
).
2. (20 points) Consider the (uncapped) unit cone whose apex is the origin and whose radius and height are both 1.
y
z
{
{
radius๎˜ƒ
r = 1
height๎˜ƒ
h = 1
x
(a) What is the parametric form of this surface? Make sure to indicate what your parameter values mean and
what their ranges are.
(b) Briefly describe how to generate this object as a generalized cylinder.
(c) What is the implicit form of this cone? You can assume that the coordinates will always be restricted to the
range
๎˜…)(+*,๎˜‹๎˜-.๎˜‹๎˜˜/0(1๎˜”
.
3. (20 points) Suppose we want to construct a model of an ellipsoid centered at the origin, whose axes are the
*,๎˜‹๎˜-2๎˜‹๎˜/
coordinate axes and whose radii are
3
๎˜‹546๎˜‹๎˜7
, respectively.
(a) Write an implicit equation for this ellipsoid.
(b) Convert this equation into the standard quadratic form
8:92;<8
๎˜ ๎˜…
.
(c) Show how to derive this matrix
;
via a transformation of the quadratic form for the unit sphere.
4. (20 points) Suppose that you are given a point
=
๎˜>๎˜ƒ?*@๎˜‹A-2๎˜‹๎˜/B๎˜‘
and a plane
C:DFE<GIH
๎˜&๎˜…
where
J๎˜›CKJ
๎˜L๎˜”
.
(a) Let
M
be the perpendicular projection of
=
onto the plane. Derive an expression of the location
M
in terms of
=
,
C
, and
H
.
pf2

Partial preview of the text

Download CS 418: Homework #3 Solutions and more Assignments Computer Graphics in PDF only on Docsity!

CS 418: Homework # Assigned : April 17, 2006 Due : in class April 25, 2006 Please be organized when writing your answers to these questions. Make sure that all solutions are clearly indicated and labelled with the question they are answering. Remember to write clearly and legibly. Unreadable answers will receive 0 credit. Hint: For questions that ask you to derive equations, work through the solution using matrix/vector equations. Only expand vector equations in terms of individual coefficients if you want to do a lot of extra tedious work.

  1. (20 points) You are given three RGB colors with corresponding alpha values:

, and 

with alpha values 

, and %$

. (a) Compute the color and alpha value for (

over  over  ). (b) Compute the color and alpha value for ( over  over

).

  1. (20 points) Consider the (uncapped) unit cone whose apex is the origin and whose radius and height are both 1. y z

radius r = 1 height h = 1 x (a) What is the parametric form of this surface? Make sure to indicate what your parameter values mean and what their ranges are. (b) Briefly describe how to generate this object as a generalized cylinder. (c) What is the implicit form of this cone? You can assume that the coordinates will always be restricted to the range

.

  1. (20 points) Suppose we want to construct a model of an ellipsoid centered at the origin, whose axes are the

coordinate axes and whose radii are 3

, respectively. (a) Write an implicit equation for this ellipsoid. (b) Convert this equation into the standard quadratic form 8 :92;<

. (c) Show how to derive this matrix ; via a transformation of the quadratic form for the unit sphere.

  1. (20 points) Suppose that you are given a point =

>?*@ A-2 /B

and a plane C:DFE<GIH

where JCKJ

L

. (a) Let M be the perpendicular projection of = onto the plane. Derive an expression of the location M in terms of = , C , and H.

(b) Derive the equation for the location of the point = projected onto the plane through the origin

as pictured in the figure below. p origin plane (c) Suppose that we now want to write some code to do projective shadows as discussed in class. Using the equation you derived in the previous part, detail how you would support projection onto a plane through any arbitrary point (not just the origin).

  1. (20 points) A quadric surface is described by the implicit equation E:9.;<E

where E is the homogeneous column vector

* A* * 

and ; is a symmetric    matrix. Suppose you are given a ray = G with J  J

L

. (a) Derive the equation for the value(s) of at which the ray will intersect this surface. (b) A given ray may intersect a quadric at 0, 1, or 2 spots. Derive an expression which can be used to test whether the ray intersects the surface or whether it misses it entirely. Page 2