FIRST: Create a folder or subdirectory in your 15-104 working area on your computer or in your Andrew private folder for handin-11. You will put all of your work inside this folder and then compress or zip it to create handin-11.zip to submit to Autolab.
In this part of the deliverable, you will download this Word file. Unlike prior Concepts assignments, you will use this Word file to write some initial high-level ideas about your final project that you will program in Weeks 12-14. The theme of the final project this year is The Adventures of Pixel, the p5 Penguin, Mascot of 15-104. (We will provide an image of Pixel for you soon!)
Any creative program that addresses the theme will be acceptable. You can create a game, an interactive story, a visual art piece, etc. After you've entered some initial thoughts of ideas, you will meet with a designated TA (see list below) to discuss your ideas and you will take notes about this meeting in the designated section. You will submit your initial idea list and your notes as part of this assignment. (For Week 12, based on the discussion with the TA, you will write your formal proposal for your project.)
Once you are finished with this part of the deliverable, print/save it as a PDF and store this PDF in your handin-11 folder with the name andrewID-11-concepts.pdf. For example, if your andrewID is acarnegie, then you would save the PDF under the name acarnegie-11-concepts.pdf.
In this Assignment, you will use Turtle Graphics to render a series of meanders. This assignment also demands the use of helper functions and loops to help create a complex image.
Background
Meanders motifs on Greek vases, 1st millenium B.C.E.
A meander or meandros (Greek: Μαίανδρος), also called a Greek fret or Greek key, is a decorative border constructed from a continuous line, shaped into a repeated motif. Meanders are common decorative elements in Greek and Roman art, used as running ornaments. On one hand, the name “meander” recalls the twisting and turning path of the Maeander River in Asia Minor, and on the other hand, as Karl Kerenyi has pointed out, “the meander is the figure of a labyrinth in linear form” [Wikipedia].
A meander, in pavement on the Greek island of Rhodes (source: Wikipedia)
The meander, we are reminded, is like the zig-zagging course traced by someone… someone, perhaps, like our Turtle.
Programming Instructions
For this technical assignment, you will use our p5.js Turtle Graphics API to render an image that simulates this ceramic tile that uses a meander pattern of very light gray on a blue background:
Source: https://www.zazzle.com/greek_key_design_tile-227688567016598070
Create a program which presents an ever-changing (generative) and imaginative “landscape”. Come up with a concept, and populate your landscape with features and objects that are suitable for your concept: perhaps trees, apartment buildings, huts, vehicles, animals, people, asteroids, sea anemones, food items, body parts, hairs, zombies, etc.
The landscape should move past the “camera”, but you can elect the way in which it does so; for example, it might appear to scroll by (as if you were looking out the window of a train or submarine); or approach from a first-person point of view (as if you were driving); or slide underneath (as if you were looking out of a glass-bottomed airplane). The camera might be viewing an outside environment, or viewing objects on a conveyor belt, etc.
Some possibilities to consider:
(Even the Simpsons had some fun with this! Watch here.)
Requirements:
Programming Hints:
Here are some code to help you understand how you could get started.
The following program generates a row of Building objects, which continually slip out of view. New buildings are randomly added from time to time (with a low probability). Buildings have a random number of floors. This is a starting point for your program, but it should be significantly more creative than this for full credit.
var buildings = []; function setup() { createCanvas(640, 240); // create an initial collection of buildings for (var i = 0; i < 10; i++){ var rx = random(width); buildings[i] = makeBuilding(rx); } frameRate(10); } function draw() { background(200); displayStatusString(); displayHorizon(); updateAndDisplayBuildings(); removeBuildingsThatHaveSlippedOutOfView(); addNewBuildingsWithSomeRandomProbability(); } function updateAndDisplayBuildings(){ // Update the building's positions, and display them. for (var i = 0; i < buildings.length; i++){ buildings[i].move(); buildings[i].display(); } } function removeBuildingsThatHaveSlippedOutOfView(){ // If a building has dropped off the left edge, // remove it from the array. This is quite tricky, but // we've seen something like this before with particles. // The easy part is scanning the array to find buildings // to remove. The tricky part is if we remove them // immediately, we'll alter the array, and our plan to // step through each item in the array might not work. // Our solution is to just copy all the buildings // we want to keep into a new array and then make that // the buildings array. var buildingsToKeep = []; for (var i = 0; i < buildings.length; i++){ if (buildings[i].x + buildings[i].breadth > 0) { buildingsToKeep.push(buildings[i]); } } buildings = buildingsToKeep; // remember the surviving buildings } function addNewBuildingsWithSomeRandomProbability() { // With a very tiny probability, add a new building to the end. var newBuildingLikelihood = 0.007; if (random(0,1) < newBuildingLikelihood) { buildings.push(makeBuilding(width)); } } // method to update position of building every frame function buildingMove() { this.x += this.speed; } // draw the building and some windows function buildingDisplay() { var floorHeight = 20; var bHeight = this.nFloors * floorHeight; fill(255); stroke(0); push(); translate(this.x, height - 40); rect(0, -bHeight, this.breadth, bHeight); stroke(200); for (var i = 0; i < this.nFloors; i++) { rect(5, -15 - (i * floorHeight), this.breadth - 10, 10); } pop(); } function makeBuilding(birthLocationX) { var bldg = {x: birthLocationX, breadth: 50, speed: -1.0, nFloors: round(random(2,8)), move: buildingMove, display: buildingDisplay} return bldg; } function displayHorizon(){ stroke(0); line (0,height-50, width, height-50); } function displayStatusString(){ noStroke(); fill(0); var statusString = "# Buildings = " + buildings.length; text(statusString, 5,20); }
Your handin folder handin-11 should have the two folders described above.
You will zip up the handin-11 folder and submit this to Autolab. Your overall folder organization should look something like this (indentation indicates subfolders):
handin-11 andrewID-11-assignment index.html sketch.js andrewID-11-concepts.pdf andrewID-11-project index.html sketch.js
Once you are ready to submit, zip (compress) the handin-11 folder (which will likely be named handin-11.zip) and hand in the ZIP FILE into the Deliverable 11 submission area on Autolab. Once you handin, check your handin history and click on the magnifying glass to look at what you submitted to make sure it looks right. IF YOU SUBMIT THE WRONG ZIP FILE, YOU RISK GETTTING A 0 ON THIS DELIVERABLE!
You may submit as many times as you’d like (in case you find inspiration and want to improve your work) up until the deadline. If you submit up to one day late, even if you submitted on time, you will be marked late. We only grade the final submission you upload to us via Autolab.