Exam: 7.II.2013, 10:15, room: 104
Exam (2nd date): 18.II.2013, 11:00, room: 104
On the second date there will be also 4 questions out of which
two will require some knowledge about transformations in homogenous
coordinate system and two questions requiring general knowledge about
algorithms and methods from the lecture. So more or less the same
as on first exam.
Basic literature in English:
Other (available in library):
J.D. Foley, A. van Dam, S.K. Feiner, J.F. Hughes, Computer Graphics - Principles
and Practice, 2nd edition, Addison-Wesley, Reading, Massachusetts
1992. (takze tych samych autorow ``Interactive Computer Graphics'',
``Introduction to Computer Graphics'').
P. Shirley, Fundamentals of Computer Graphics, A.K.Peters, Natick
A. Glassner, Principles of Digital Image Synthesis, Morgan Kaufmann Publ.,
San Francisco 1995.
A. Watt, 3D Computer Graphics, 2nd edition, Addison-Wesley, 1993.
D.F. Rogers, Procedural Elements for Computer Graphics, McGraw
Hill 1985 (przeklad rosyjski, Mir 1989).
D. Hearn, P. Baker, Computer Grphics, Prentice-Hall, Englewood Cliffs,
R. Salmon, M. Slater, Computer Graphics: system and concepts, Addison-Wesley,
A.S. Glassner, Graphics Gems, Academic Press, Boston 1990.
J. Arvo, Graphics Gems II, Academic Press, Boston 1991.
D. Kirk, Graphics Gems III, Academic Press, Boston 1992.
P.S. Heckbert, Graphics Gems IV, Academic Press, Boston 1994.
- XnView -
viewer and converter of graphic files and GFL-SDK library for reading and
writing multiple graphic formats.
- GIMP - Raster graphic editor
- Blender - 3D modelling program
for creating, editing, rendering of 3D scenes and animations.
- Wings3D - simple 3D modeller
- Older version OpenGL books google: OpenGL redbook bluebook
OpenGL Toolkits (window opening, keyboard and mouse handling,...) :
Lab: Task 1 (25.X.2012)
Compile example programs which use OpenGL and GLUT libraries
from GL directory:
To do it open command terminal and use the following ways:
Try to use SDL and GLFW libraries instead of GLUT:
Links to simple libraries with windows/menus/events_handling interface
to use with OpenGL:
- Command line GCC compiler: "gcc -lglut cube.c -o cube.glut"
(you can also look at script ccglut)
- Using make: "make cube.glut"
- Code::Blocks IDE environment: start new GLUT project.
Try to understand coordinates of objects. How the program reacts on window
scaling and why? Can you change this ?
Lab: Task 2 (22-29.XI.2012) (late deadline: 6.XII.2012)
Using simple example with animation:
tcube.c (idle function moves the ball)
implement simple arkanoid game (ping-pong against the wall, see:
wikipedia) for one player.
Play field is ractangular and the player can move rectangular racket along
bottom of the window using some keys. We keep position of the ball
(can be drawn as a rectangle but smaller than in an example) and check if
its y coord is not to small : than we have to check where is the racket.
The ball has constant speed and bounces from the walls in
the natural mirror way.
Excersises (moved to 6.XII.2012)
Excercises during lecture: solve 3 problems
Declare during lecture which problems you have solved.
Lab: Take 3: "A Train"
Implement in OpenGL+GLUT a program which displays 3 dimensional
scene with proper colors:
The scene should consists of rectangular plane in green color on which
there are railway tracks (can be drawn as glBegin(GL_LINES); ... glEnd();).
There is a number
of trees along the track (drawn e.g. as a sphere (glutSolidSphere() on top
of scaled cube glutSolidCube() ).
The train consists of 3 boxes drawn as wireframe (glutWireCube()) with
some wheels (spheres). you can also add a person (drawn
approximately using e.g. 2-4 boxes) walking inside one carriage forwards
and backwards with constant speed with respect to the train.
After pressing the space key ' ' the train should start moving with
constant acceleration (can be described by 3 vectors: position, speed
and constant acceleration). The railway track and train movement can
be along x axis.
Display scene using two views changable by keypress if you can. One view
should be static observer and the other one with position at the beginning of
the train and view direction forward as a driver view.
Make only one function to display the scene and use it twice with different
views/viewports in display function.