The Catholic University of America
School of Engineering
Department of Electrical Engineering and Computer Science
CSC
513:
Fundamentals
of
Computer
Graphics
Assignment
1
1)
Write
the
parametric
form
of
a
ray
with
source
p
and
direction
d.
2)
Assuming
d
in
the
above
ray
is
a
unit
vector,
write
an
algorithm
that,
for
an
arbitrary
non-‐negative
integer
n,
generates
n
evenly
spaced
points
along
the
ray
at
1
unit
intervals.
3)
Write
the
parametric
form
of
the
unit
circle.
4)
Given
an
arbitrary
positive
integer
n,
write
an
algorithm
that
generates
n
evenly
spaced
points
that
are
sampled
along
the
unit
circle.
5)
Suppose
you
have
access
to
the
functions
scale(sx,
sy),
translate(tx,
ty),
and
rotate(α)
which
generate
the
corresponding
2D
homogeneous
transformation
matrices.
Using
these
functions,
write
the
expression
of
a
transformation
T
such
that
if
p
lies
on
the
unit
circle,
Tp
will
lie
on
an
ellipse
centered
at
c,
with
a
major
radius
r1,
minor
radius
r2
and
rotated
at
an
angle
of
α.
You
do
not
have
to
compute
the
full
matrix.
You
may
leave
it
expressed
using
the
above
functions.
Hint:
remember
that
order
is
important
and
that
operations
associate
from
the
"inside
out".
6)
Write
the
implicit
form
of
the
unit
sphere.
7)
Given
an
arbitrary
point
p,
write
a
test
to
determine
if
p
is
inside
the
unit
sphere.
8)
Suppose
you
are
given
an
affine
transformation
T
that
maps
the
unit
sphere
to
some
arbitrarily
located
and
oriented
ellipsoid.
Give
an
expression
which,
given
an
arbitrary
point
p,
determines
if
p
is
inside
said
ellipsoid.
Hint:
use
the
result
from
the
previous
exercise.
9)
You
are
given
the
vertices
of
a
convex
polygon
in
the
2D
plane
in
counter-‐clockwise
order
as
(p1,
...,
pn).
The
coordinates
of
vertex
pi
are
(xi,
yi).
9a)
(3
marks)
Give
an
expression
for
the
coordinates
of
the
outward-‐facing
normal
ni
of
the
edge
connecting
pi
and
pi+1.
9b)
(3
marks)
Let
q
=
(xq,
yq)
be
an
arbitrary
point
on
the
plane
containing
the
gi ...
The Catholic University of America School of Engineering .docx
1. The Catholic University of America
School of Engineering
Department of Electrical Engineering and Computer Science
CSC
513:
Fundamentals
of
Computer
Graphics
Assignment
1
1)
Write
the
parametric
form
of
a
ray
with
source
p
and
direction