Back to Main
Me at College
Computer Graphics
SIAK-FE
Sports Club Information System
Human-Computer Interaction System
Back to the Main Page
Search this site
Computer Graphics

Recently in my fourth semester, I took the course IKI30500 Computer Graphics. The course was rather different from most other courses; it consists of mostly programming assignments, without a final test — only one midterm test.

The course was rather hard — not too difficult, but it consumed quite a lot of my time, a lot more than most other 3-credits course (even then I had to turn down a project because I was trying to meet a deadline — but that's another story). But it was worth the effort; not only I learn about computer graphics, but I got to practice my coding skills up to the limit; the assignments made me write thousands of lines of Java code in only several weeks — the largest programs I ever wrote in such a short amount of time.

The first two assignments was about 2D graphics. In assigment one I implemented graphics primitive functions by only using a draw-pixel primitive. Assigment two extends the program with shape-transformation functions.

Assigments 3-5 was to implement 3D graphics renderings. The programs takes input as a series of shapes defined by polygon meshes and renders them to the screen. Assignment three implements basic 3D wireframe rendering, assigment four implements flat (constant-color) rendering and finally assigment five implements Gouraud and Phong rendering.

Two books were used during this course:

  • Computer Graphics: Principles and Practice 2nd ed. Foley, et al. 1990. Addison-Wesley Publishing Company. ISBN 0-201-12110-7.
  • Computer Graphics: C Version 2nd ed. Hearn, Donald; Baker, Pauline M. 1997. Prentice-Hall, Inc. ISBN 0-13-578634-7.

Here you can find all of my work, assignments 1-5, with full source code.

The programs are implemented as Java applets. These applets requires the Java 2 plugin installed and configured on your browser. If you don't have the plugin, you can download it from the Java website. Since not everyone has (or willing to install) the Java 2 plugin, only the images of the applets are given here; click the image to run the applet. Also, since many of the classes has the same name, you will need to have the "JAR cache enabled" option turned off on your Java plugin, or it will load the wrong classes if you clicked on assignments 3-5.

Assignment One

Applet Screenshot

Implements 2D graphic primitives:

  • line (with clipping)
  • circle (with fill)
  • ellipse (with fill)
  • polygon (with clipping and fill)

Download source (88K).


Assignment Two

Applet Screenshot

Just like assignment one, but with added 2D shapes transformations:

  • translation
  • rotation
  • scale
  • shear (skew)
  • reflection (x-axis, y-axis, and arbitrary line)

Download source (116K).


Assignment Three

Applet Screenshot

Implements 3D wireframe rendering.

Download source (138K).


Assignment Four

Applet Screenshot

Implements 3D flat (constant-illumination) rendering.

Download source (195K).


Assignment Five

Applet Screenshot

Implements Gouraud and Phong rendering.

Download source (107K).



Copyright © Sasmito Adibowo, 1997-2001.
Last update on July 21, 2001.