Computer Graphics I

4003-570-01 / 4005-761-01 (Fall 2007)

Extra Credit: 2D Drawing Algorithms



Date posted: November 5, 2007
Date due: November 14, 2007


Purpose

This extra credit assignment will allow you some additional experience with 2D line drawing algorithms.   

Task

You are to implement the midpoint circle drawing algorithm.   Your implementation cannot make use of any OpenGL routines.  Instead, you should make use of the method setPixel (x, y) which will be provided for you.  (See auxiliary code section below)

Function Description
void drawCircle(int x0, int y0, int r) Draw a circle with center  (x0,y0) and radius  r.

Auxiliary Code:

Below is a list of links to code that will help you in completing this assignment:

File Description
drawCircle.c Default implementations of the functions that you need to implement.  
setPixel.c Implementation of setPixel().  Recall that you must use this function in your implementation.  No OpenGL calls allowed!
header.mak If you plan on using makemake or gmakemake on the Suns.

NOTES:

What to submit

You will be submitting the following files:

Filename Description
drawCircle.c Contains implementations of the routines that need to be written.  Feel free to use the supplied drawCircle.c as a template, replacing the original code with your implementation
aux files Any additional files that  might be needed for your implementation (optional)
README Indicate on what platform you tested your implementation and provide additional info I may need to know (e.g. auxillary libraries used) in order to build and run your assignment.

All submission should be made using mycourses.   Look for the folder named "Extra Credit" in the dropbox area.

All source must be submitted by Nov 14th at midnight (the final exam date).  No further extensions will be given.

Assessment

Your grade will be based on your reimplementation of the required routine.  Special emphasis will be placed on how well the function is documented.   The assignment will be worth 10 points, which will be applied to your midterm grade.  (Thus, in essesence, this is an additional midterm question).  Note that even with this extra credit, your score on your midterm cannot exceed 100%.


last updated 11/04/07