Deliverable 02 - Fall 2024

Due Saturday, Sept. 7, 2024 by 11:59PM


Reading: Cramer’s Concepts, Notations, Software, Art

Please read the essay, Concepts, Notations, Software, Art by Florian Cramer, a German/Dutch cultural theorist of new media who has written extensively on software art since the late 1990s.

Cramer prompts us to contemplate the relationship between the outer form of a generated/interactive artwork (3D print, digital image, computer animation, computer music peformance, etc.) and the inner form of the code and algorithms which produce it.


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-02. You will put all of your work inside this folder and then compress or zip it to create handin-02.zip to submit to Autolab.


Conceptual Questions (2 points)

In this part of the deliverable, you will download this Word file that contains questions about concepts taught in class. You may download it anywhere on your computer. You should fill in your answers in the spaces provided, and include your name, andrewID and section letter at the top of page 1.

Once you are finished with this part of the deliverable, print/save it as a PDF and store this PDF in your handin-02 folder with the name andrewID-02-concepts.pdf. For example, if your andrewID is acarnegie, then you would save the PDF under the name acarnegie-02-concepts.pdf.

SPECIAL NOTE 1: Although you can use a computer to try to help you solve these problems, you should try to solve these using your mind alone, using the computer to check your solution if you wish. These problems will mimic the style of questions you might see on the written exams, and you won't have a computer to help you for these exams!

SPECIAL NOTE 2: Do not use any generative AI tools on these questions, in particular the question about the reading you are to do above. We want YOUR answers, not a computer's answers.


Technical Assignment 02: Visual Harmonies (3 points)

This programming Assignment (to be written using p5.js, and uploaded to Autolab) is intended to sharpening your skills using variables.

Study the following 400 X 400 canvas. You will notice that there are a number of “visual harmonies” (for example, there are two rectangles whose top edges are coincident).

Visual Harmonies example with adjacent shapes

Below is a p5.js program which produces the above diagram (with some crucial pieces hidden). Of course, the harmonies are the result of numbers which articulate relationships of size and position.

    
var x = 25;
var y = 25;
var w = 25;
var h = 25;

function setup() {
    createCanvas(400, 400);
}

function draw() {
    background(200);
    noStroke();
    fill(255,0,0);
    // rect(??, ??, ??, ??);
    fill(0,255,0);
    // ellipse(??, ??, ??, ??);
    fill(0,0,255);
    // triangle(??, ??, ??, ??, ??, ??);
    fill(255,0,255);
    // rect(??, ??, ??, ??);
    fill(255,255,0);
    // rect(??, ??, ??, ??);
    fill(0,255,255);
    // ellipse(??, ??, ??, ??);
    fill(255,255,255);
    // rect(??, ??, ??, ??);
}
  

Your task is to complete the program, using the variables x, y, w and h as shown, to complete these visual harmonies and recreate the picture. Note that these objects are “attached” to each other so we can use the variables to move the collection around as a unit or stretch the collection horizontally or vertically.

To better understand the harmonies, study the version below that has an embedded grid so you can see the positions and relationships of the objects to each other and the canvas (but you won’t draw the grid):

Same shapes with a grid overlaid

The top left of the red rectangle (and the entire collection) is (x, y). The width of each grid cell is w and the height of each grid cell is h. NOTE: in the picture above, these are all set to 25, but they could be different. Here is a picture where x = 100, y = 60, w = 30, and h = 40:

Same picture with different values for x,y,w,h

The requirements are:


Project 02: Variable Faces; Face Variables (3 points)

In this Project, you will create a face which has at least three aspects of variability. The face can resemble yourself, another person or an abstract person.

“Chernoff Faces” are an example of generative faces, which are widely used in information visualization:

[From Wikipedia] “Chernoff Faces” are an information visualization technique, invented by Herman Chernoff in the early 1970’s, which represents multivariate data in the shape of a human face. The individual parts, such as eyes, ears, mouth and nose represent values of the variables by their shape, size, placement and orientation. The idea behind using faces is that humans easily recognize faces and notice small changes without difficulty. Chernoff used 18 variables (such as eyebrow height, jaw size, etc.) to describe a face.

Chernoff faces for judges - image

Paul Ekman’s Facial Action Coding System, by comparison, uses 46 variables to describe a facial expression. Each of these dimensions corresponds to the action of some muscle in the face.

For another example of generative face art, consider this lovely work by the young German new-media artist, Moka, in which he wrote an algorithm to imitate his own hand-drawings:

Grid of many facial expressions

For your Project-02, create a generative face which has at least three aspects of variability, but preferably more. For example, you might have variables that specify the size, position, color, or other visual characteristics of the eyes, nose, and mouth. These could modify the face’s expression (happy, sad, etc.), and/or the face’s identity (John, Mary, etc.), and/or the face’s species (cat, monkey, etc.). The face may resemble your own, another person, or an abstract person (or cartoon character).

Nose chart showing various profiles

The requirements are:

SIMPLE EXAMPLE:

Here’s a very simple example you can use to get started. Notice how the variables are re-assigned (randomly) whenever the mouse is pressed:

// Simple beginning template for variable face.
var eyeSize = 20;
var faceWidth = 100;
var faceHeight = 150;

function setup() {
    createCanvas(300, 300);
}

function draw() {
    background(180);
    ellipse(width / 2, height / 2, faceWidth,  faceHeight);
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    ellipse(eyeLX, height / 2, eyeSize, eyeSize);
    ellipse(eyeRX, height / 2, eyeSize, eyeSize);
}

function mousePressed() {
    // when the user clicks, these variables are reassigned
    // to random values within specified ranges. For example,
    // 'faceWidth' gets a random value between 75 and 150.
    faceWidth = random(75, 150);
    faceHeight = random(100, 200);
    eyeSize = random(10, 30);
}
  

Here’s what that template looks like, when you run it and click a few times:

Animations of simple facial expressions

This template presents the minimally viable solution. We expect you to do something much more creative than this in order to earn a 2 or 3.

HELPFUL HINT: Let’s say one of your facial features is a random expression (happy, sad, angry, etc.). You can do this by setting up a variable (e.g. mouth) that has a random value of 1, 2, 3, etc. (one for each expression). Then you can use if-else in your draw function to test the current value to draw the expression:

if (mouth == 1) {
// draw a happy mouth
} else if (mouth == 2) {
// draw a sad mouth
} else if (mouth == 3) {
// draw an angry mouth
} else {
// draw an expressionless mouth
}


Handing in your work

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


  handin-02
    andrewID-02-assignment
      index.html
      sketch.js
    andrewID-02-concepts.pdf
    andrewID-02-project
      index.html
      sketch.js

Once you are ready to submit, zip (compress) the handin-02 folder (which will likely be named handin-02.zip) and hand in the ZIP FILE into the Deliverable 02 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. Reference Lab 01 for a reminder on how to work with the p5js template, organize your files and compress your work. You may submit as many times as you’d like (in case you find inspiration and want to improve your work) up until the Saturday deadline. If you submit on Sunday (late), even if you submitted on time, you will be marked late. We only grade the final submission you upload to us via Autolab.