Course Material for 159-235 - Graphics & Graphical Programming

This page provides material for paper 159.235 for Semester 2 2008. More material will appear here during the semester.

Course Outline: PDF | DOC (Word).

A brief synopsis: Programming graphical-user-interfaces using an event-driven model; Drawing and transformation of graphical objects; Programming in 3D; Animation techniques; Java and other graphics systems.


Lectures

There will be three lectures a week: 1pm Mondays (AT3), 10am Tuesdays (AT6) and 10am Wednesdays (AT3).
Slides (pdf and powerpoint) appear here. Lecture slides will appear here usually the day before the lecture if not before. The lecture plan for 2008 is as shown below:

[Lecture 0 Administrative Details] PPT | PDF

  1. [Lecture 1 Overview] PPT | PDF
  2. [Lecture 2 Graphics Fundamentals] PPT | PDF
  3. [Lecture 3 Drawing Primitives] PPT | PDF
  4. [Lecture 4 Java programming Introduction] PPT | PDF
  5. [Lecture 5 Java Expressions, Flow Control and Exceptions] PPT | PDF
  6. [Lecture 6 Java Arrays] PPT | PDF
  7. [Lecture 7 Java Language Classes and Objects] PPT | PDF
    [Lecture 7A Polymorphism] PPT | PDF
  8. [Lecture 8 Java Language I/O] PPT | PDF
  9. [[Lecture 9 Java Utilities] PPT | PDF
    [Lecture 9A Java Generics] PPT | PDF
  10. [Lecture 10 Data Models and Simulations] PPT | PDF
  11. [Lecture 11 Rasters] PPT | PDF
  12. [Lecture 12 Aliasing] PPT | PDF
  13. [Lecture 13 Introduction to Images] PPT | PDF
  14. [Lecture 14 Lines and Circles] PPT | PDF
  15. [Lecture 15 Introduction to Graphical user Interfaces - Menus and File Dialogues] PPT | PDF
  16. [Lecture 16 More on Graphical user Interfaces - Multiple Panels, Buttons and Widgets] PPT | PDF
  17. [Lecture 17 Printing and I/O and Raw Keyboard Events] PPT | PDF
  18. [Lecture 18 Introduction to Threads for Graphical Programs] PPT | PDF
  19. [Lecture 19 Introduction to 3D Graphics] PPT | PDF
  20. [Lecture 20 Use of Polygons in 3D Graphics] PPT | PDF
  21. [Lecture 21 Transforms in 3D - Part 1 - Introducing Homogeneous Coordinates] PPT | PDF
  22. [Lecture 22 Transforms in 3D - Part 2 - 3D Rotations] PPT | PDF
  23. [Lecture 23 Viewing and Clipping in 3D - Outcodes] PPT | PDF
  24. [Lecture 24 Projections - Part 1 - Viewing Angles and Vector Notation] PPT | PDF
  25. [Lecture 25 Projections - Part 2 - Parallel and Perspective Projections] PPT | PDF
  26. [Lecture 26 Visible Surfaces - Back Face Culling and Visible Surface Determination] PPT | PDF
  27. [Lecture 27 Curves and Surfaces - Part 1 - Bezier and Hermite Curves] PPT | PDF
  28. [Lecture 28 Curves and Surfaces - Part 2 - SPLINES] PPT | PDF
  29. [Lecture 29 Colour and Light - Part 1 - Intro to Colour Physics] PPT | PDF
  30. [Lecture 30 Colour and Light - Part 2 - Intro to Lighting Physics and Models] PPT | PDF
  31. [Lecture 31 Lighting and Illumination - Part 1 - Phong Shading and Texture Maps] PPT | PDF
  32. [Lecture 32 Lighting and Illumination - Part 2] PPT | PDF
  33. [Lecture 33 Lighting and Illumination - Part 3] PPT | PDF

  34. [Lecture 34 Mark-Up Language] PPT | PDF

  35. [Lecture 35 Review Lecture] PPT | PDF

  36. [Lecture 36 - Where next - A look at Java 3D, OpenGL and Animation and where to find more info on Graphics. PPT | PDF

Tutorials

Two Tutorial Sessions currently offered - Wednesday 11am in SC2 AND 2pm in AT6. The second will be a repeat performance of the same material presented at the first so just go to one of them.

Assignments

There will be two assignments - each worth 20% of your total for this paper. They will involve programming some graphics applications (in Java), and are to be submitted electronically.

Assignment 1 was handed out at the 1pm Lecture on Monday 4th August 2008.

Assignment 1 : Build a Drawing program. Handin deadline is 5pm on Monday 8th September 2007, just after the Mid-Semester break. DOC | PDF
Electronic Handin form for assignment1.
Comments on this assignment from last year: The assignment was well done - lots of you had fun with the various GUI features. Generally those who got full marks implemented all the features, made it "look good", and commented their code. One or two people had difficulties understanding what the architecture needed to do. To draw a collection of shapes, your program needs to keep some sort of container (a list or vector or array) and to redraw all shapes every call to paintComponent. It would not be a very useful drawing program if it can only show one single shape at a time.


Assignment 2 was handed out at the 1pm Lecture on Monday 18th August 2008.

Assignment 2 : Build a Rendering program. Handin deadline is 5pm on Moday 20th October 2007 (the dinosaur.dat data file is available from the MyProg examples page - see MyProg18-22, 25, 29 and 30)
DOC | PDF
Electronic Handin form for assignment2.


Other Material

Other web links or documents for the paper will appear here.

This paper was new in 2004. The style of questions and structure of the 2008 exam will be similar to that of previous years. You may therefore find it useful to test yourselves against these questions. The 2004 exam script is available: DOC (word) | PDF


There is no particular recommended textbook for this paper, although three useful books are:

The classic graphics text, now in 2nd edition is: Computer Graphics Principles and Practice, James Foley, Andries van Dam, Steven Feiner and John Hughes, Addison-Wesley, Second Edition (in C with SRGP and SPHIGS) 1997, ISBN 0-201-84840-6.
You may find it gives a more detailed explanation of many of the algorithms we have discussed during this paper. The algorthms and "maths" in the book is excellent although the graphical systems they use a little old fashioned. Remember the pace at which computer science is moving forwards - "old -fashioned" only means they are just 2-3 years out dated :-)

Another excellent book for studying algorithms and the maths behind the ideas, is: Computer Graphics with OpenGL Donald Hearn and M. Pauline Baker, Third Edition, Prentice Hall 2004, ISBN 0-13-015390-7.
This book maps well to some of the slides. Many of the ideas covered in Java3D are taken from OpenGL and so this book is relevant.

You may find Java 2D Graphics by Johnathan Knudsen, Published by O'Reilly, ISBN 1-56592-484-3, of use in understanding some of the more advanced features of the Java 2D Graphics API. It covers the Swing GUI library fairly lightly. There are plenty of "brightly coloured" books in the library or in your bookshop on Swing. Unfortunately such books tend to have a short life time. You may find the online Swing tutorials at the Sun web site more valuable as they will be up to date with the software.

Another good book on OpenGL is Interactive Computer Graphics - A Top Down approach with OpenGLby Edward S. Angela. It comes with good online support material - ie programs - at this link.

A valuable online resource is also the Sun Java Tutorial which will help with general Java programming questions as well as the Swing Graphics library specifics.

Another useful link is the Java API.

An eclectic mixture of links into useful graphics/graphics systems/graphics programming resources on the Web is available.