Homework3

SUN YAT-SEN UNIVERSITY

Homework 3: Draw a Circle

Computer Graphics
2017-03-14

1. Introduction

The goal of this assignment is to use the Bresenham’s Algorithm to draw a circle. To help you with this task, you can use OpenGL and freeGLUT/GLFW. Bresenham’s Algorithm is one of the most important algorithms in the Computer Graphics. If you want to draw a line or draw a circle, Bresenham’s Algorithm is your first choice. The core of this algorithm is using integer results to estimate the position of points. In class, we focused on line drawing. And now, we extend this topic to draw a circle!

Warning: All codes and documents should be written and submitted individually, without copying existed answers (Neither from other student nor from the Internet). Plagiarism = Fail. Besides, there may be at least 30% penalty for late homework.

2. Tasks

2.1 Pre-requirement

2.2 Draw a Line

Implement your line rasterization algorithm in OpenGL. You can only use integer arithmetic in your code.

2.3 Draw a Circle

Implement your circle rasterization algorithm in OpenGL. You can only use integer arithmetic in your code.

3. Submitting Format

Please submit your homework to sysucg2017@163.com. You subject of the email should be as same as your attachment(aka. your .zip file)

Only a .zip file should be submitted. Under the .zip file, the content should look like this:

classTpye_studentID_Name_hw?_version?/
  |— src/
  |— doc/
  |— bin/

For example, a student in required class want to submit homework2 for the second time, his .zip file should be:

  R_16214382_艾伦麦席森图灵_hw2_version1.zip
    |—R_16214382_艾伦麦席森图灵_hw2_version1/
       |—src/        ——放整个工程
       |—doc/        ——放report.pdf
       |—bin/        ——放可执行文件和readme