[SOLVED] COEN290- Assignment 1

25.99 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

Rate this product

In this assignment, you are going to draw circle. there are 3 parts of this assignments.

  1. Use the circle rasterization algorithm introduced in lecture to draw a circle like this:

you define Radius  yourself. and color yourself

  1. Fill the circle with color, like this:
  2. 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 don’t 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 don’t know Python, google the basic grammar, you don’t 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 assignme

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.