In this assignment, you are going to draw circle. there are 3 parts of this assignments.
- Use the circle rasterization algorithm introduced in lecture to draw a circle like this:
you define Radius yourself. and color yourself
- Fill the circle with color, like this:
- add anti-aliasing
you can come up with your own idea of creating anti-aliasing effect.
You will be using Python to implement this. You dont need to write rendering part.
You are provided with a rendering code in Python. This code will draw a single pixel on screen. All you need to do, is to add the algorithm to produce all the (x, y) coordinates for rendering function
This is a the pixel rendering code.
from PIL import Image img = Image.new(RGB, (320, 240)) pixels = img.load() pixels[100,100] = (255,0,0) img.show
Save this code into a .py file. Then add your algorithm code to this code.
(if you dont know Python, google the basic grammar, you dont need to use complicated Python features)
Write comment in your code to explain your algorithm.
Zip your source code. and 3 result images. name your zip file
with your name and assignment number
Reviews
There are no reviews yet.