Deliverable 05 - Fall 2023

SPECIAL DUE DATE: Due Sunday, Oct. 1, 2023 by 11:59PM


PREPARING YOUR HANDIN FOLDER...

FIRST: Create a folder or subdirectory in your 15-104 working area on your computer or in your Andrew private folder for handin-05. You will put all of your work inside this folder and then compress or zip it to create handin-05.zip to submit to Autolab.


Conceptual Questions

THERE ARE NO CONCEPTUAL QUESTIONS TO ANSWER FOR THIS DELIVERABLE DUE TO THE WRITTEN EXAM


Technical Assignment 05: Hexagons (3 points)

In this Assignment, you are asked to generate a regular hexagonal grid of hexagons. The purpose of this assignment is to use a simple geometric problem to reinforce your understanding of nested iteration. This Assignment is to be submitted through Autolab.

Photos of hexagons in nature: honeycombs, seastones\
Images of hexagonal grids in nature from Jose De La Torre.

For many purposes, hexagonal grids offer a far more economical (or even, optimal) use of material and energy. That’s why we observe hexagonal grids so frequently in nature — whether in structures like bees’ honeycombs or in the close-packed basalt column formations in the Giant’s Causeway in Northern Ireland.

You should be able to make a hexagonal grid, too. In this Assignment, your task is to write a p5.js program that generates a regular hexagonal grid. When you’re done, it should look something like the following:

Grid of nested color hexagons

The most important thing to remember about regular hexagonal grids is that, unlike square grids, the vertical spacing between elements is not the same as the horizontal spacing. This is because regular hexagonal grids are composed of equilateral triangles — and equilateral triangles are shorter than they are wide:

Equilateral triangle with side measurements

How much shorter? Well, given an equilateral triangle whose baseline is 1 unit wide, its height is roughly 87% of that — or, as Pythagoras would tell us, one-half of the square root of 3 as much, to be precise.

So a hexagon centered at (0,0) with side length s would be made up of six triangles with the following points:

outside points of a hexagon at the origin

Program requirements:

As per usual for all Assignments uploaded to Autolab:


Open-ended Project 05: Wallpaper (3 points)

In this Project, you’re asked to use iterative (looping) techniques to generate a repeating pattern, such as for wallpaper or fabric.

First example of wallpaper

Second example of wallpaper

Before you begin, take a moment to check out this mind-boggling archive of more than 6000 antique wallpapers, dating from the 18th and 19th centuries, all scanned at high resolution. (You can also learn more than you ever thought there was to know about the history of wallpaper in New England (scroll down page), as written by wallpaper expert, Richard Nylander.)

Incidentally, wallpaper can be interesting or conversation-starting as well as beautiful. For example, here’s some recent computational wallpaper by the Italian group ToDo: Spamghetto Wallpaper. (Examine it closely and you may see it’s full of text from junk mail.)

Wallpaper patterns made up of text from spam email

Program Requirements:


Handing in your work

Your handin folder handin-05 should have the two folders described above.

You will zip up the handin-05 folder and submit this to Autolab. Your overall folder organization should look something like this (indentation indicates subfolders):


  handin-05
    andrewID-05-assignment
      index.html
      sketch.js
    andrewID-05-project
      index.html
      sketch.js

Once you are ready to submit, zip (compress) the handin-05 folder (which will likely be named handin-05.zip) and hand in the ZIP FILE into the Deliverable 5 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.