Assignment Specification COMP 1405 A/B/C (Fall 2021) − "Introduction to Computer Science I" Specification for Assignment 05 Your submission for this assignment must include your full name and your...

1 answer below »
The assignment is to write a python source code and follow the requirements provided in the attached file.


Assignment Specification COMP 1405 A/B/C (Fall 2021) − "Introduction to Computer Science I" Specification for Assignment 05 Your submission for this assignment must include your full name and your nine-digit student number as a comment at the top of the source file you submit. All source code files must be written using the Python 3 programming language and must run on the course's official virtual machine. Submissions that crash (i.e., terminate with an error) on execution will receive a mark of 0. Officially, the Due Date for this Assignment is: Friday, October 22nd, 2021, at 11:59pm EST. Late Submissions are Accepted Without Penalty Until Sunday, October 24th, by 11:59pm EST. Submissions received after that will not be accepted and will receive a mark of 0. 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 'comp1405_f21_#########_assignment_05.py' • 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
Answered 1 days AfterOct 22, 2021

Answer To: Assignment Specification COMP 1405 A/B/C (Fall 2021) − "Introduction to Computer Science I"...

Sathishkumar answered on Oct 24 2021
107 Votes
solutions/1.jpg
solutions/pointlist.py
from PIL import Image
import random
image_file=input('Ple
ase enter image file name with its format:')
img= Image.open(image_file)
imgWidth, imgHeight = img.size
img = img.convert("RGB")
img = img.resize((300,450))
# Shows the image in image...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here