Question: Specification ( Much of this assignment inspired by Ben Stephenson's 2 0 1 8 Nifty Assignment. ) Background In recent years, algorithmic art has become

Specification
(Much of this assignment inspired by Ben Stephenson's 2018 Nifty Assignment.)
Background
In recent years, algorithmic art has become more commonplace, ranging from very simple, largely randomly generated pieces to sophisticated works created by artificial intelligence programs such as DALL-E. The artwork created by these systems can be quite impressive, but the process is not without criticism-- in particular, many worry that the increase in computer-generated art, especially for commercial purposes (such as logos, advertisements, cover art, etc.) may have a significant impact on the livelihood of professional artists.
In this assignment, we will attempt to programmatically create images that evoke the style of 20th century Dutch abstract artist Piet Mondrian, specifically pieces such as Tableau I and Composition A. While our program will not be particularly intelligent, it will follow certain rules that attempt to emulate some of the techniques Mondrian used.
Important note: In this assignment, we are in no way intending to claim we can recreate, or even approximate, the work of artists like Mondrian, nor are we claiming that the images we will create comparable to Mondrian's works. Rather, the images we will create are simply meant to evoke the style of a subset of Mondrian's work by focusing on certain elements and techniques.
Learning Objectives
By completing this assignment, students will demonstrate their ability to:
Define a solution to a given problem using a recursive approach
Write functionally correct recursive methods
Produce clear and effective documentation to improve comprehension and maintainability of a class
Write a class that is readable and maintainable, and that conforms to provided guidelines for style, and implementation
Assignment Details
Program Overview:
You will implement a program to generate random artwork in the style of Mondrian. Your program will:
Start with a blank canvas of specified dimensions
Recursively divide the canvas into smaller regions until they reach a minimum size (specified below)
Color the regions randomly to mimic Mondrian's style.
The specifics of this algorithm should be as follows:
If the region being considered is at least one-fourth the height of the full canvas and at least one-fourth the width of the full canvas, split it into four smaller regions by choosing one vertical and one horizontal dividing line at random.
If the region being considered is at least one-fourth the height of the full canvas, split it into two smaller regions by choosing a horizontal dividing line at random.
If the region being considered is at least one-fourth the width of the full canvas, split it into two smaller regions by choosing a vertical dividing line at random.
If the region being considered is smaller than one-fourth the height of the full canvas and smaller than one-fourth the width of the full canvas, do not split the region.
Any time a region is split, the dividing line(s) should be chosen at random to be within the bounds of the region. You should ensure that dividing lines are chosen such that each resulting subregion is at least 10 pixels by 10 pixels. In other words, dividing lines should not be chosen too close to the boundaries of a region.
Once a region is below a certain size, it should be filled in with a color chosen randomly from red, yellow, cyan, and white. When filling a region, leave a one-pixel border around the edge uncolored -- this will give the appearance of black lines separating the colored regions.
Accessibility Note
We acknowledge that the assignment may not be accessible to those who are visually impaired or colorblind. If this is a concern, please reach out for additional support by emailing the instructors or making a private post on the Ed board and we will make alternative arrangements for you.
Example Images
Here are a few examples of the images your program might generate:
It may not be clear from these images, but there is also a black border around the entire canvas. You should not limit the border to interior edges.
Expand
Extensions
To earn a grade of E on this assignment, you must implement one of the following extensions:
Random Number of Splits
Expand
Color Related to Location
Expand
Random Fill Shape
Expand
Custom Extension
If you would like, you may propose a different extension of your choice. Your proposed extension must be roughly similar in complexity to the above options and must materially change the resulting art. If you would like to propose a custom extension, you must post it in this Ed thread and receive approval.
Implementation Requirements
Required Methods
You must implement the following two methods in the provided Mondrian class in your assignment:
public void paintBasicMondrian(Color[][] pixels)
Fill pixels with Color objects (using the java.awt.Color class) according to the basic algorithm specified above.
public void paintComplexMondrian(Color[][] pixels)
Fil

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!