CSE3313 - Computer Graphics
homework exercises

CSE3313
Computer Graphics

Homework Exercises #3: Clipping, Lines, Points, Vectors, Videos


These homework exercises are simple questions designed to test your understanding of the lecture material. You are strongly advised to complete these exercises. Some sample answers will be provided during the lectures.


Questions

1. What is the purpose of clipping in computer graphics?

2. "Play School" wishes to go hi-tech. It wants to produce graphics through a number of different windows. Play School's on-site programmer Betty Bitmap knows from her graphics notes how to clip against the rectangular window, but tomorrows segment calls for clipping against a circular window. Write an algorithm for Betty to clip line segments against a circular window of a given radius. Give consideration to efficiency. If you would like Betty's job then try to extend your circle clipping algorithm to clip against an elliptical window.

3. What is the parametric form of the following:

i) A line in 3D space.

ii) A circle.

iii) A curve in 2D space.

4. Generalise Bresenham's Algorithm for drawing straight lines on a raster device to drawing circles.

5. What is the difference between a point and a vector? How can we create a vector from two points?

6. What is the general formula for the angle between two vectors a and b?

7. If two vectors have a dot product equal to 0 (a . b = 0) what does this signify?

8. Roger Raytrace has two vectors a and b. Roger want to know what the projection of a is in the direction of b. Write down the projection for Roger.

9. Given two points A and B, what is the general equation for the normal to the line?

10. Extend your answer in Question 9 to describe the normal to a plane specified by three points in 3 space A, B, C.

11. If you have access to a video or DVD player watch one of the following movies and comment on the computer graphics with respect to technical quality, technique and appropriateness to the story line.

i) Tron (the first movie to make extensive use of computer animation)

ii) The Last Star Fighter (created on a Cray Y-MP supercomputer)

iii) The Last Halloween (live-action CGI character integration)

iv) Willow (the first film to use morphing)

v) Start Trek II: The Wrath of Khan (look out for the fractal mountains and particle systems)


This material is part of the CSE3313 Computer Graphics course.
Copyright © Jon McCormack, 2006.  All rights reserved.

Last Modified: February 14, 2006