Assignment 05 Pointillism


Rate this product

COMP 1405 A/B/C − “Introduction to Computer Science I”
Specification for Assignment 05
Pointillism is the name of a painting technique where patterns
of coloured dots are used to form the coloured regions of an
image. For this assignment, you will practice with looping
control structures to create a program that can read in a source
image and create a larger ‘new’ version of that image (i.e.,
scaled up by an integer value) using a pointillist style. Your
program will visit each pixel in the source image and then draw
several coloured points on the larger image at corresponding
(but slightly randomized) positions.
In order to complete this task, you will need to:
• read about the pointillism painting technique online
• decide on a scaling factor between 4 and 8 that you will use to find the ‘new’ image dimensions
• decide whether to use circles, squares, or rectangles as the ‘points’
Your submission for this assignment:
• must be a source code file with filename ‘’
• must NOT import anything other than the pygame, random, and sys libraries
• must get the name of the source image as a command-line argument
• must use nested loops to visit each pixel of the source image and get its colour value
• must use one or more loops to draw an appropriate1 number of ‘points’ in your ‘new’ image
• must randomly alter the position of the drawn ‘points’ in your ‘new’ image2
• must NOT use colours for drawing ‘points’ other than red, green, blue and (if you wish) black
• can assume that the user will always provide the name of a valid image when prompted
1 For source pixel coloured (200, 100, 50), you might want to draw 4 red, 2 green, and 1 blue ‘points’ on the ‘new’ image
2 For source pixel at x = 10, y = 5 and scaling factor 10, you might position ‘points’ with 100 ≤ x ≤ 109 and 50 ≤ y ≤ 59


There are no reviews yet.

Be the first to review “Assignment 05 Pointillism”

Your email address will not be published. Required fields are marked *

Scroll to Top