Project #2 - Form Generator

Objective

Build a simple generator that makes multiple variations of the same form.

Submission

Reflection

For this assignment, I decided to make a generative cake slice as a gift for my older brother's 28th birthday. that changes angles and form as the viewer presses any of the following keys: left arrow, right arrow, up arrow, down arrow. As the arrow keys are pressed (using the keyPressed fuction), the angle that the cake slice is being viewed changes proportionate to the arrow key. Alongside this perspective change, the cake also changes in color using values generated from the random() function. A candle sits on top of the cake, its position relative to the average of positions of the cake's icing top so that it's always in the middle. The width and height of the candle is relative to the width of the cake's crust and the viewing angle, so that it looks thinner when the cake is at a more acute angle and doesn't get cut off the top of the sketch. Like the cake, the color of the candle changes randomly, as well as its polka dot decor: a nested for loop of dots that are positioned and sized relative to the candle's width and height. A moving flame follows the As the form of the cake changes, the background also changes. An array of values producing random placements of the number "28" is populated with each key press. The color of the set of "28"s is the same as the polka dots on the candle.

To create this project, I started with 5 second loose sketching of cake slices. I liked iterating upon different angles of the cake and decided to use that as the main form variation.

I sketched more in illustrator, with a goal to think more mathematically and systematically about translating my sketches into code.

A lot of the variables in this sketch live in relation to each other, and are often dependent on each other. Rather than hard defining every single variable, only a few variables are hard coded and remain constant, while the rest are computed in relation to its neighbors. I like thinking of each line of code living in symbiotic and harmony; as one variable shifts X pixels upwards, two variables shift X pixels downwards. In this way, I am as much of a conductor as I am a coder.