HW#1 --- last modified March 02 2019 21:14:44..
Solution set.
Due date: Feb 14
Files to be submitted:
cassini.cpp
spline.cpp
Purpose: To become familiar with quadric surfaces and polyhedra.
To work with splines
Specification:
For this first homework you will write two short programs in C++ using OpenGL.
The first program should be contained in the file cassini.cpp . When compiled
and executed it should open a window and render a scene of a rocketship orbiting
around Saturn. I want you to use as many of the GLUT/GLU polyhedra and quadric functions
as possible in this scene. (Use at least four different kind of functions.)
The second program should be submitted in the file spline.cpp . When compiled you
can run it from the command line with a line like:
spline 5 1 1 2 3 4 5 5 6 7 7
It should then open a window and display a cardinal spline with t=1/2
going through the five points:
(1 1), (2 3), (4 5), (5 6), (7 7). Your program should of course work if a different number
and choice of points were used.
Point Breakdown
Departmental coding guidelines for C++ followed |
1pt
|
cassini opens a window with a scene of a rocketship orbiting Saturn |
1pt
|
GLUT/GLU primitives used in drawing (1pt for each different kind up to 4 pts) | 4pts
|
spline compiles and reads from command line as described | 1pt
|
spline opens a window with something drawn in it | 1pt
|
The desired spline curve is drawn by spline | 2pts
|
Total | 10pts |
|