HW1 – Rasterizer




5/5 - (3 votes)

COSC4370 HW1 – Rasterizer

1 Introduction
In this assignment, we are going to derive and implement a similar algorithm
for rasterizing circles. In particular, we will rasterize the half of the circle
2 + y
2 = R2 where x ≥ 0 and positive integer R = 100 and the half of the
circle x
2 + y
2 = R2 where y ≥ 0 and positive integer R = 150.
We suggest you to read “Computer Graphics Principles and Practice – Foley
et. al” section 3.2 “Scan Converting Lines” and section 3.3 “Scan Converting
Circles”. It should be included in the handout as reading.pdf.
2 Setup
Linux \OS X
Compile main.cpp using the following command: g++ main.cpp
Create a new solution as an empty project, then add existing file – main.cpp
3 Note
The code for your rasterizer is in one file – hw1.cpp . Do NOT add source files
because the entire assignment is self-contained to this one file. Also, use integer
arithmetic in your code as opposed to doubles or others!
4 Deliverables
Submit all deliverables to your Github project.
• Source code contained in a single file: hw1.cpp
• circle.ppm – an image file generated from hw1.cpp