Assignment 2 - Using Bresenham's Algorithm

CS4961 - Computer Graphics

Due February 7, 2001, 10:45 AM


Overview

This project gives you some practice using Bresenham's algorithm to draw lines and circles.

Project Requirements

The following are requirements for the project. Your grade will be based on whether you completed all of them.
Your program must:
GL and GLUT both contain functions that will draw lines and/or circles. YOU MAY NOT USE THEM. In all cases, drawing to the screen must be accomplished by specifying each pixel to draw. The purpose of the assignment is not to draw a line and circle; it is to use Bresenham's algorithm to draw a line and a circle.

In addition to the above requirements, you must also provide:

Turn in all your code and documentation using submit (on CS machines) or handin on CADE machines. Your code will be tested using whatever environment you turn it in on (CS or CADE). Your code should be written in C/C++ and compile using gcc/g++. The project folder for submit and handin is named bresenham. (submit cs4961 bresenham file1 file2...)

You do not need to worry about antialiasing, varying the line intensity with the slope, or the endpoint order. You are not required to display more than one object at a time.

Resources

You can use the template and Makefile from the sketchpad assignment to serve as the base of your program. It contains all the GL code you need - just fill in the canvas structure to draw points. Alternatively, you may write something yourself; just make sure you draw the line pixel by pixel.

Final Notes

This section contains any final notes regarding this project ether due to questions raised by students or discoveries of my own. I will send messages to the class mailing list announcing any notes or clarifications, but this will contain a digest of all such info. These notes will never change what is required in the project, but may clarify some formerly ambiguous points and so should be checked semi-regularly.