Example code - CSG140 Computer Graphics - Spring 2004

Professor Futrelle, Northeastern University, CCIS

Version of 20 January 2004

This page includes pointers to source code, to directories containing sources and executables and to sites that have sample graphics code. In particular, here is a link to a number of directories and files.

If you want to ftp to the directory where the files are in order to transfer them that way, you'll want to move to this directory: /home/futrelle/.www/teaching/csg140sp2004/examps/examps/

You are welcome to adapt any of the code you find here for your projects. You may also want to adapt code you find elsewhere. But it's very important that you write most of the code yourself. It's also important that you carefully describe the origin of any code that you adapt. I'm quick to notice code that is not code you wrote yourself, believe me. Using others' code and pretending it's yours is plagiarism and a violation of the university's code of conduct.

A Sun site has many Java 2D examples.

Notes on selected examples

When all the examples from the Sun site I've included are added up, there are too many to comment on individually. But below are comments on selected ones of mine and a few from the Sun site. See also my comments on timers, which can be useful for animation.


Go to CSG140 homepage. or RPF's Teaching Gateway or homepage