Capitalism is Killing the Planet

sketch

Hey! My idea for this project was to make a few digital climate action “posters”. I had a lot of fun with these and ended up making three that shuffle as you click the mouse:

Make Polluters Pay:

This poster generates smoke objects with random size and transparency from chimnies (that also represent bar graphs to show increasing global temperatures). The smoke obscures the message that shows who is responsible for polluting the earth, while leaving a greenwashed corporate message still visible.

Capitalism is Killing the Planet:

The second poster is supposed to show advanced capitalism’s ability to mask crises behind the veil of economic stability. As you move the mouse towards the top right-hand corner one of the triangles becomes more chaotic while the second one in front remains still. I included a Joseph Schumpeter line that captures this pretty well.

California Wildfires:

The last poster reads from a csv file of the 2020 CA wildfires. Each location is mapped to the canvas and then randomly generated circles flash around it to create the fires.

I hope you enjoy!!

var numPosters = 3;
var poster = 0;
var firstClick;

//smoke vars
var smoke = [];

var dx = 5;
var dy = 7;

var impact;

//fire vars
    //data variables
var fires;
var numRows;

var bgx = []; //background coordinates
var bgy = [];

    //rectangle in center
var margin;
var rectX;
var rectY;

    //canvas
var marginT;
var marginS;

    //colors
var tanColor;
var textRed;

//capitalism vars
var triangleRand;

var barcode
var barcodeWidth = 100;

var bottomTextCA;
var mainTextCA;
var topTextCA;

var bottomBottomTextCap;
var topTextCap;

var smokeBG;

function preload() {
    //uncomment for local
    //used fonts in original file, replaced with images for wordpress bcs of file issues
    /*
    dosis = loadFont('fonts/Dosis-ExtraBold.ttf');
    dosisL = loadFont('fonts/Dosis-Light.ttf');
    gothic = loadFont('fonts/LetterGothicStd.otf');
    akkordeon = loadFont('fonts/Akkordeon.otf');
    impact = loadFont('fonts/impact.ttf');
    

    fires = loadTable('data/2021cafires2.csv', 'header');

    bottomTextCAImg = loadImage('img/CAfiresBottomText.png');
    mainTextCAImg = loadImage('img/CAfiresMainText.png');
    topTextCAImg = loadImage('img/CAfiresTopText.png');

    bottomMainTextCapImg = loadImage('img/CapBotttomMainText.png');
    topTextCapImg = loadImage('img/capTopText.png');

    smokeBG = loadImage('img/smokeBG.png');
    */
    //uncomment for WP

    fires = loadTable('https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/12/2021cafires2.csv', 'header');
    barcode = loadImage('https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/12/barcode.png');
    bottomTextCAImg = loadImage('https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/12/CAfiresBottomText.png');
    mainTextCAImg = loadImage('https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/12/CAfiresMainText.png');
    topTextCAImg = loadImage('https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/12/CAfiresTopText.png');

    bottomMainTextCapImg = loadImage('https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/12/CapBotttomMainText.png');
    topTextCapImg = loadImage('https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/12/capTopText.png');

    smokeBG = loadImage('https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/12/smokeBG.png');

}

function setup() {
    firstClick = true;

    //smoke
    createCanvas(400,600);
    background(220);

    //fires
    noStroke();
    numRows = fires.getRowCount();
    background('black');
    //frameRate(16);

    marginS = 15;
    marginT = 1.5*marginS;
    rectX = width-2*marginS;
    rectY = 500;

    tanColor = color(230, 226, 220);
    textRed = color(255,50,0);

    //storeBackground();
}

function draw() {
    switch (poster) {
        case 0:
            push();
            smokePoster();
            pop();
            break;
        case 1:
            push();
            capitalismPoster();
            pop();
            break;
        case 2:
            push();
            cafiresPoster();
            pop();
            break;
    }

    if (firstClick) {
        push();
        fill(0, 0, 0, 200);
        rectMode(CENTER);
        rect(width/2, height-10, width, 30);
        fill(textRed);
        textSize(22);
        textAlign(CENTER, CENTER)
        text('click to browse through the posters', width/2, height-10);
        pop();
    } else {
        return;
    }
}

function mousePressed() {
    poster += 1;
    if (poster == numPosters) {
        poster = 0;
    }
    firstClick = false;
    print(firstClick.toString());
}

//smoke functions untill line 112
function drawBars() {
    fill('black');
    var w = 60;
    var h;
    for (var i = 0; i < 5; i++) {
        h = map(exp(i), 0, exp(4), 0, height*0.8);
        rect(22+75*i, height - h, w, h);
    }
}

function writeText() {
    var textRed = color(138, 76, 76);
    var textGreen = color(128, 194, 129);

    image(smokeBG, 0, 0);

    /*
    push();
    //translate(0, 0.3*height);
    textSize(64);
    fill(textRed);
    //textFont(impact);
    text('CORPORATIONS', 10, 60);
    text('WARM OUR', 10, 120);  fill(textGreen); text('WE ARE', 300, 120);      fill(textRed);
    text('PLANET!', 10, 180);   fill(textGreen); text('ARE PURSUING', 220, 180);fill(textRed);
    text('MAKE', 10, 240);      fill(textGreen); text('ACTIVELY', 170, 240);    fill(textRed);
    text('POLLUTERS', 10, 300); fill(textGreen); text('WORKING', 300, 300);     fill(textRed);
    text('PAY!', 10, 360);      fill(textGreen); text('TO REDUCE', 140, 360);
    text('OUR CARBON FOOTPRINT', 10, 420);
    text('FOOTPRINT BY EXPLORING', 10, 480);
    text('EXPLORING FREE', 10, 540);
    text('MARKET SOLUTIONS', 10, 600);

    //textSize(30);
    //text('CARBON DIVIDEND NOW', 10, 240)
    pop();
    */
}

function makeSmoke(birthX, birthY) {
    var smoke = {x: birthX,
                y: birthY,
                r: 5,
                t: random(0, 70),
                speedX: random(1,3),
                speedY: random(3,5),
                move: smokeMove,
                display: smokeDisplay}
    return smoke;
}

function smokeDisplay() {
    push();
    translate(this.x, this.y);
    noStroke();
    fill(100, 100, 100, this.t);
    ellipse(0, 0, this.r);
    pop();
}

function smokeMove() {
    this.x -= this.speedX;
    this.y -= this.speedY;
    this.r += random(this.speedX, this.speedY)-1;
}

function newSmoke(colX, colY) {
    var prob = 0.3;
    if (random(0,1) < prob) {
        smoke.push(makeSmoke(random(colX, colX+60), colY+10));
    }
}

function removeSmoke(){
    var smokeToKeep = [];
    for (var i = 0; i < smoke.length; i++){
        if (smoke[i].x > -100) {
            smokeToKeep.push(smoke[i]);
        }
    }
    smoke = smokeToKeep;
}

function updateAndDisplaySmoke(){
    for (var i = 0; i < smoke.length; i++){
        smoke[i].move();
        smoke[i].display();
    }
}

function smokePoster() {
    background(220);

    writeText();

    updateAndDisplaySmoke();
    removeSmoke();
    for (var i = 2; i < 5; i++) {
        h = map(exp(i), 0, exp(4), 0, height*0.8);
        newSmoke(25+75*i, height - h);
    }

    drawBars();
}

//CA fires functions
function drawCircles(lat, long, size) {
    for (var j = 0; j < 2; j++) {
        fill(255, random(0, 140), 0);
        ellipse(lat + random(-3, 3),
                long - random(0, 7),
                random(0, 12));
    }
    //filter(BLUR,5);
    //fill('red');
    //ellipse(lat, long, size);
}

function topText() {
    image(topTextCAImg, 0, 0);

    /*
    //textFont('dosis');
    textSize(10);
    fill(255,50,0);

    textAlign(LEFT, CENTER);    text('2020', marginS, marginT/2);
    textAlign(CENTER, CENTER);  text('CALIFORNIA WILDFIRES', width/2, marginT/2)
    textAlign(RIGHT, CENTER);   text('WFIGS', width-marginS, marginT/2);
    */
}

function mainText() {
    image(mainTextCAImg, marginS, marginT + rectY - mainTextCAImg.height);
    /*
    textSize(60);
    //textFont('akkordeon');
    textStyle(NORMAL);
    fill(tanColor);
    textAlign(LEFT, BOTTOM);

    push();

    translate(marginS, marginT+rectY);

    var offset = 0;

    text("WHOSE", 10, -3*45);
    text("LAND", 10, -2*45);
    text("ARE WE", 10, -45);
    text("BURNING?", 10, 0);

    pop();
    */
}

//not used
function movingText() {
    push();
    //rotate(radians(90));

    textSize(30);
    textFont('impact');
    fill('red');
    text("thoughts and prayers", xText1, 40);
    text("thoughts and prayers", xText2, 40);
    xText1 -= 1;
    xText2 -= 1;

    if (xText1 < -265) {
        xText1 = width;
    } //if (xText2 < -265) {
//        xText2 = width;
//    }

    pop();
}

function drawFlag(x, y, s) {

    push();
    translate(x, y);
    scale(s);
    rectMode(CORNER);
    fill(textRed);

    rect(0, 130, 250, 20);
    drawStar(50, 40, 2);

    noFill();
    stroke(textRed);
    strokeWeight(10*s);
    rect(0, 0, 250, 150);
    noStroke();

    pop();

}

function drawStar(x, y, s) {
    var rOut = 10;
    var rIn = 5;

    push();
    translate(x,y);
    scale(s);
    rotate(radians(180));

    beginShape();
    for (var i = 0; i < 5; i++) {
        vertex( rOut*cos((2*PI*i/5)+(PI/2)),
                rOut*sin((2*PI*i/5)+(PI/2)));
        vertex( rIn*cos((2*PI*i/5)+(PI/2)+(2*PI/10)),
                rIn*sin((2*PI*i/5)+(PI/2)+(2*PI/10)));
    }
    endShape(CLOSE);

    pop();
}

function bottomText() {
    image(bottomTextCAImg, width - bottomTextCAImg.width, height - bottomTextCAImg.height);
    /*
    var lines = "NO BAILOUT\nDEMOCRATIZE POWER\nPEOPLE OVER PROFITS";

    noStroke();
    textStyle(ITALIC);
    textAlign(RIGHT, TOP);
    fill(textRed);
    textSize(14); //14
    textLeading(18);
    //textFont('dosis');

    text(lines, marginS+rectX, marginT+rectY+15);
    */

}

//not used
function storeBackground() {
    for (var x = 0; x < width; x++) {
        for (var y = 0; y < height; y++) {
            if (random(0,1) < 0.1) {
                bgx.push(x);
                bgy.push(y);
            }
        }
    }
}

//not used
function drawBackgound() {
    for (var i = 0; i < bgx.length; i++) {
        stroke('black');
        point(bgx[i], bgy[i]);
        noStroke();
    }
}

function cafiresPoster() {
    //drawBackgound();

    push();
    translate(width/2, rectY/2 + marginT);

    background(tanColor);
    fill('black');
    rectMode(CENTER);
    rect(0, 0, rectX, rectY);

    rotate(radians(-90));
    scale(0.7);

    for (var i = 0; i < numRows/3; i+=3) {
        var lat = fires.getNum(i, "X");
        var lon = fires.getNum(i, "Y");

        //var size = fires.getNum(i, "poly_GISAcres")

        var mappedLat = map(lat, -124, -114, -width/2, width/2);
        var mappedLon = map(lon, 32.55, 42, -height/2, height/2);
        //var mappedSize = map(size, 0, 223180, 20, 30);
        drawCircles(mappedLon, mappedLat, 5);
    }

    pop();

    topText();
    mainText();

    bottomText();
    noFill(); stroke(textRed);
    //drawStar(300, marginT + rectY + 40, 3);
    noStroke();
    //movingText();

    drawFlag(marginS+1, marginT+rectY+17, 0.3);
}

//capitalism is killing the planet
function drawTriangle(x, y, s, n) { //dont look at this function :///

    push();
    translate(x,y);
    scale(s);
    noFill();

    beginShape();

    vertex(-50 + random(n), 50+random(n));//point
    for (var i = -49; i < 49; i+=10) {
        vertex(i + random(n), 50 + random(n));
    }
    vertex(50 + random(n), 50 + random(n)); //point
    vertex(43.75 + random(n),39.375 + random(n));
    vertex(37.5 + random(n), 28.75 + random(n));
    vertex(31.25 + random(n), 18.125 + random(n));
    vertex(25 + random(n), 7.5 + random(n));
    vertex(12.5 + random(n), -13.5 + random(n));
    vertex(6.25 + random(n), -24.25 + random(n));
    vertex(3.125 + random(n), -29.625 + random(n));
    vertex(0 + random(n), -35 + random(n)); //point
    vertex(-3.125 + random(n), -29.625 + random(n));
    vertex(-12.5 + random(n), -13.5 + random(n));
    vertex(-25 + random(n), 7.5 + random(n));
    vertex(-31.25 + random(n), 18.125 + random(n));
    vertex(-37.5 + random(n), 28.75 + random(n));
    vertex(-43.75 + random(n),39.375 + random(n));

    endShape(CLOSE);

    pop();
}

function drawConcentricTriangles(x, y, n) {
    push();
    for (var i = 0; i < 6; i++) {
        strokeWeight(i);
        drawTriangle(x, y, 0.8*(6-i), n);
    }
    pop();
}

function mainTextCap() {
    image(bottomMainTextCapImg, 0, height - bottomMainTextCapImg.height);
    /*
    textSize(40);
    fill('black');
    noStroke();
    //textFont(gothic);
    textAlign(LEFT, TOP);
    text('capitalism is', 10, height/2 + 30);
    text('killing', 10, height/2 + 30 + 45);
    text('the planet', 10, height/2 + 30 + 2*45);
    */
}

function topTextCap() {
    image(topTextCapImg, 0, 0);
    /*
    textSize(12);
    fill('black');
    noStroke();
    //textFont(dosisL);
    textAlign(LEFT, TOP);
    text('CAN CAPITALISM SURVIVE?', 10, 10);
    text('NO, I DO NOT THINK IT CAN.', 10, 22);

    textAlign(RIGHT, TOP);
    text('ITS VERY SUCCESS UNDERMINES', width - 10, 10);
    text('THE SOCIAL INSTITUTIONS WHICH', width - 10, 22);
    text('PROTECT IT', width - 10, 34);
    */
}

function bottomTextCap() {
    textSize(12);
    fill('black');
    noStroke();
    //textFont(dosisL);
    textAlign(RIGHT, BOTTOM);
    text('1942', width - 10, height - 10 - 12 - 12);
    text('JOSEPH SCHUMPETER', width - 10, height - 10 - 12);
    text('CAPITALISM, SOCIALISM AND DEMOCRACY', width - 10, height - 10);
}

function capitalismPoster() {
    background('orange');
    noFill();

    mainTextCap();
    topTextCap();

    stroke('black');

    //silent at bottom left corner
    while (mouseX < 0 & mouseY < 0) {
        triangleRand = 0;
    }

    triangleRand = max(mouseX, height - mouseY)/100;

    stroke(tanColor); //tan
    drawConcentricTriangles(5*width/9, 120, triangleRand);

    stroke(255, 204, 64); //yellow
    drawConcentricTriangles(4*width/9, 120, 0);

    //image(barcode, 15, height-barcodeWidth-10, 30, barcodeWidth);
    //bottomTextCap()
}

LO-11

For this week’s looking outwards, I decided to talk a bit about why NFTs suck. NFTs, or non-fungible tokens, have been gaining a lot of steam recently with the boom of equally stupid cryptocurrencies. The entire idea of an NFT breaks a lot of artistic integrity, as it exists purely to be able to be sold. Owning an NFT doesn’t give you anything other than the ability to resell it. What is it you may ask? A piece of digital art, that one could just as easily right-click and download. Because of this NFT has devolved away from decent-looking art and into photos of toilet paper and tungsten cubes. They exist entirely as a tool for rich tech bros to make money. On top of that, the processing power necessary to load the blockchain NFTs run on has a massive environmental toll, amounting to over 30 million tonnes of CO2 a year. The idiocy of this all came crashing down two weeks ago when the blockchain was hacked, forcing NFT owners to overwrite their own blockchain, which defeats the whole “non-fungible” thing they seem to love and reverts you back to the system NFTs owners claim to hate. All in all, it’s time to end NFTs (and crypto for that matter) and move on to make art that’s more meaningful than its monetary value as a clipart.

https://mashable.com/article/nft-cryptocurrency-bad-environment-art
https://www.insidehook.com/daily_brief/art/nft-most-ridiculous-items
https://earth.org/nfts-environmental-impact/

Project 11 – Moving Landscape

sketch

Trees and birds and trees and birds

var trees = [];
var birds = [];
var dx = -1;

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

    for (var i = 0; i < 10; i++){ //populate trees
        var rx = random(width);
        trees[i] = makeTree(rx);
    }for (var i = 0; i < 3; i++){ //populate birds
        var bx = random(width);
        birds[i] = makeTree(bx);
    }
    frameRate(10);
}


function draw() {
    background('lightblue');

    //dirt
    noStroke();
    fill('darkgreen');
    rect(-10, 100, width+20, height);

    updateAndDisplayTrees();
    removeTree();
    newTree();

    updateAndDisplayBird();
    removeBird();
    newBird();

    drawRoad();
}

function drawRoad() {
    fill('grey');
    rect(-10, 130, width+20, 30);

    stroke('black');
    var dividerLines = [];
    for (var i = 0; i < 30; i++) { //make vals
        var a = i*width/30;
        dividerLines.push(a);
    } for (var i = 0; i < 30; i++) { //draw lines
        line(dividerLines[i], 145, dividerLines[i]+width/60, 145);
    } for (var i = 0; i < 30; i++) { //move lines
        dividerLines[i] += dx;
        if (dividerLines[i] <= -width/60) {
            dividerLines[i] = width;
        }
    }
}

function updateAndDisplayTrees(){
    for (var i = 0; i < trees.length; i++){
        trees[i].move();
        trees[i].display();
    }
}

function updateAndDisplayBird(){
    for (var i = 0; i < birds.length; i++){
        birds[i].move();
        birds[i].display();
    }
}

function removeTree(){
    var treesToKeep = [];
    for (var i = 0; i < trees.length; i++){
        if (trees[i].x > -50) {
            treesToKeep.push(trees[i]);
        }
    }
    trees = treesToKeep;
}

function removeBird(){
    var birdsToKeep = [];
    for (var i = 0; i < birds.length; i++){
        if (birds[i].x > -50) {
            birdsToKeep.push(birds[i]);
        }
    }
    birds = birdsToKeep;
}

function newTree() {
    var newTreeLikelihood = 0.02;
    if (random(0,1) < newTreeLikelihood) {
        trees.push(makeTree(width+50));
    }
}

function newBird() {
    var newBirdLikelihood = 0.05;
    if (random(0,1) < newBirdLikelihood) {
        birds.push(makeBird(width));
    }
}


// method to update position of Tree every frame
function treeMove() {
    this.x += this.speed * this.scal/3;
}

function birdMove() {
    this.x += this.speed;
}


function treeDisplay() {
    push();
    translate(this.x, 100);
    scale(this.scal)
    stroke('brown');
    strokeWeight(5);
    line(0, 0, 0, 20);

    stroke('green');
    fill('green');

    for (var i = 0; i < 5; i++) {
        triangle(-20+2*i, -7*i, -2, -7*i, -2, -20-7*i);
    } for (var i = 0; i < 5; i++) {
        triangle(20-2*i, -7*i, 2, -7*i, 2, -20-7*i);
    }
    pop();
}

function birdDisplay() {
    push();
    translate(this.x, this.y);
    stroke('black');
    noFill();
    strokeWeight(2);
    arc(0, 0, 20, 20, PI+PI/3, 2*PI-PI/3);
    arc(10, 0, 20, 20, PI+PI/3, 2*PI-PI/3);
    pop();
}


function makeTree(birthLocationX) {
    var tree = {x: birthLocationX,
                scal: random(0.5, 2),
                speed: dx,
                move: treeMove,
                display: treeDisplay}
    return tree;
}

function makeBird(birthLocationX) {
    var bird = {x: birthLocationX,
                y: random(0, 70),
                speed: random(-5,-2),
                move: birdMove,
                display: birdDisplay}
    return bird;
}

Sonic Story

sketch

Fishies! For this week’s project, I wade an infinite animation of a fish eating a fish eating a fish eating a… the colors are randomly generated and there are two pitches playing the jaws theme, and chomping and background underwater sounds from freesounds.org. Enjoy!!


function setup() {
    createCanvas(400, 200);
    useSound();
    frameRate(4);
    background('lightblue');
    chooseColor1();
    chooseColor2();
}


function soundSetup() {
    osc = new p5.Oscillator();
    osc.amp(1);
    osc.setType('sine');
    osc.start();
}

function preload() {
    chomp = loadSound("https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/11/Chomp.wav");
    bg = loadSound("https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/11/bg.wav");
    bg.setVolume(0.75);
    chomp.setVolume(0.5);
}

var r;
var g;
var d;
var col1;
var col2;

function chooseColor1(){
    r = random(100,255);
    g = 140;
    b = random(100,255);
    col1 = color(r,g,b);
}

function chooseColor2(){
    r = random(100,255);
    g = 140;
    b = random(100,255);
    col2 = color(r,g,b);
}

function drawFish1(x, y, s, c, mouthClosed, lookingFord) {
    push();
    translate(x, y);
    scale(s);
    strokeCap(SQUARE)
    strokeWeight(1);

    var fil = color(red(c)+20, green(c)+20, blue(c)+20);

    if (mouthClosed == true) {
        //top half of fish (colored w/ c)
        //fill
        stroke(fil);
        fill(fil);
        triangle(-17, -5, -12,-2, -17, -1);
        rect(-17, -1, 7, 3);
        rect(-16, 2, 3, 1);
        rect(-6,-5, 16, 5);
        line(-6, -2, -10,-2);
        line(-6, -3, -8,-3);
        line(10, -2, 17, -2);
        line(10, -3, 14, -3);

        //outline
        stroke(c);
        line(-17, 2, -17, -6);
        point(-16,-6);
        point(-15,-5);
        point(-14,-4);
        point(-13,-3);
        point(-12,-2);
        point(-11,-2);
        point(-10,-3);
        point(-9,-3);
        point(-8,-4);
        point(-7,-4);
        line(-6,-5, -2, -5);

        //fin
        stroke(fil);
        rect(-1, -8, 4, 4);
        triangle(-1, -7,-3, -5, -1, -5);
        line(3, -6, 5, -6);

        stroke(c);
        point(-4, -6);
        point(-3, -7);
        line(-2, -8, 3, -8);
        point(3, -7);
        point(4, -7);
        point(5, -6);

        line(2,-5, 10, -5);
        point(11,-4);
        point(12,-4);
        point(14,-3);
        point(15,-3);
        line(16,-2, 18, -2);

        //bottom half of fish
        //finn fill
        stroke(240);
        fill(240);
        rect(-5, 4, 4, 2);

        stroke(220);
        point(-16, 4);
        point(-15, 4);
        line(-14, 3, -10, 3);
        line(-10, 4, -6, 4);
        line(-6, 5, 0, 5);

        //fin
        stroke(220)
        point(-6,5);
        point(-7,5);
        point(-7, 6);
        line(-6, 7, -2, 7);
        line(-2, 6, 10, 6)

        stroke(240);
        line(11, 5, 0, 5);
        line(12, 5, 0, 5);
        line(13, 4, -5, 4);
        line(14, 3, -10, 3);
        line(15, 2, -10, 2);
        line(16, 1, -10, 1);
        line(17, 0, -10, 0);
        line(18, -1, -10, -1);

        //gills
        stroke(204,194,194);
        point(0,2);
        point(1,1);
        point(2,2);
        point(3,1);
        point(4,2);
        point(5,1);
        point(6,2);

        stroke(220);
        point(10, 5);
        point(11, 5);
        point(12, 4);
        point(13, 3);
        point(14, 2);
        point(15, 1);
        point(16, 0);
        point(17, -1);



        //eye
        fill(255);
        stroke(255);
        rect(9, -1, 4, 2);
        rect(10, -2, 2, 4);
        stroke(0);
        //if (lookingFord) {
            point(11,0);
        //} else if (!lookingFord) {
        //    point(10, -1);
        //}

        pop();
    } else {
        //top half of fish (colored w/ c)
        stroke(fil);
        fill(fil);
        triangle(-17, -5, -12,-2, -17, -1);
        rect(-17, -1, 7, 3);
        rect(-16, 2, 3, 1);
        rect(-6,-5, 16, 5);
        line(-6, -2, -10,-2);
        line(-6, -3, -8,-3);
        line(10, -2, 17, -2);
        line(10, -3, 14, -3);

        stroke(c);
        line(-17, 2, -17, -6);
        point(-16,-6);
        point(-15,-5);
        point(-14,-4);
        point(-13,-3);
        point(-12,-2);
        point(-11,-2);
        point(-10,-3);
        point(-9,-3);
        point(-8,-4);
        point(-7,-4);
        line(-6,-5, -2, -5);

        //fin
        stroke(fil);
        rect(-1, -8, 4, 4);
        triangle(-1, -7,-3, -5, -1, -5);
        line(3, -6, 5, -6);

        stroke(c);
        point(-4, -6);
        point(-3, -7);
        line(-2, -8, 3, -8);
        point(3, -7);
        point(4, -7);
        point(5, -6);

        line(2,-5, 10, -5);
        point(11,-4);
        point(12,-4);
        point(14,-3);
        point(15,-3);
        line(16,-2, 18, -2);

        //bottom half of fish
        //finn fill
        stroke(240);
        fill(240);
        rect(-5, 4, 4, 2);

        stroke(220);
        point(-16, 4);
        point(-15, 4);
        line(-14, 3, -10, 3);
        line(-10, 4, -6, 4);
        line(-6, 5, 0, 5);

        //fin
        stroke(220)
        point(-6,5);
        point(-7,5);
        point(-7, 6);
        line(-6, 7, -2, 7);
        line(-2, 6, 10, 6)

        stroke(240);
        line(11, 5, 0, 5);
        line(13, 5, 0, 5);
        line(16, 4, -5, 4);
        line(17, 3, -10, 3);
        line(14, 2, -10, 2);
        line(13, 1, -10, 1);
        line(12, 0, -10, 0);
        line(18, -1, -10, -1);

        stroke(204,194,194);
        point(0,2);
        point(1,1);
        point(2,2);
        point(3,1);
        point(4,2);
        point(5,1);
        point(6,2);

        stroke(220);
        point(10, 5);
        point(11, 5);
        point(12, 5);
        point(13, 4);
        point(14, 4);
        point(15, 4);
        point(16, 3);
        point(17, 3);

        //eye
        fill(255);
        stroke(255);
        rect(9, -1, 4, 2);
        rect(10, -2, 2, 4);
        stroke(0);
        point(11,0);

        pop();
    }
}

function drawFish2(x, y, s, c, mouthClosed, lookignFord) {
    push();
    translate(x, y);
    scale(s);
    strokeCap(SQUARE)
    strokeWeight(1);

    var fil = color(red(c)+20, green(c)+20, blue(c)+20);

    if (mouthClosed == true) {
        //top half of fish (colored w/ c)
        stroke(fil);
        fill(fil);
        triangle(-15, -5, -12,-2, -15, -1);
        rect(-15, -1, 7, 3);
        rect(-14, 2, 3, 1);
        rect(-6,-5, 16, 5);
        line(-6, -2, -8,-2);
        line(-6, -3, -6,-3);
        line(10, -2, 17, -2);
        line(10, -3, 14, -3);

        stroke(c);
        line(-15, 2, -15, -4);
        //point(-16,-6);
        point(-15,-5);
        point(-14,-4);
        point(-13,-3);
        point(-12,-2);
        point(-11,-2);
        point(-10,-3);
        point(-9,-3);
        point(-8,-4);
        point(-7,-4);
        line(-6,-5, -2, -5);

        //fin
        stroke(fil);
        rect(-1, -8, 4, 4);
        triangle(-1, -7,-3, -5, -1, -5);
        line(3, -6, 5, -6);

        stroke(c);
        point(-4, -6);
        point(-3, -7);
        line(-2, -8, 3, -8);
        point(3, -7);
        point(4, -7);
        point(5, -6);

        line(2,-5, 10, -5);
        point(11,-4);
        point(12,-4);
        point(14,-3);
        point(15,-3);
        line(16,-2, 18, -2);

        //bottom half of fish
        //finn fill
        stroke(240);
        fill(240);
        rect(-5, 4, 4, 2);

        stroke(220);
        point(-16, 4);
        point(-15, 4);
        line(-14, 3, -10, 3);
        line(-10, 4, -6, 4);
        line(-6, 5, 0, 5);

        //fin
        stroke(220)
        point(-6,5);
        point(-7,5);
        point(-7, 6);
        line(-6, 7, -2, 7);
        line(-2, 6, 10, 6)

        stroke(240);
        line(11, 5, 0, 5);
        line(12, 5, 0, 5);
        line(13, 4, -5, 4);
        line(14, 3, -10, 3);
        line(15, 2, -10, 2);
        line(16, 1, -10, 1);
        line(17, 0, -10, 0);
        line(18, -1, -10, -1);

        stroke(204,194,194);
        point(0,2);
        point(1,1);
        point(2,2);
        point(3,1);
        point(4,2);
        point(5,1);
        point(6,2);

        stroke(220);
        point(10, 5);
        point(11, 5);
        point(12, 4);
        point(13, 3);
        point(14, 2);
        point(15, 1);
        point(16, 0);
        point(17, -1);



        //eye
        fill(255);
        stroke(255);
        rect(9, -1, 4, 2);
        rect(10, -2, 2, 4);
        stroke(0);
        //if (lookingFord) {
            point(11,0);
        //} else if (!lookingFord) {
        //    point(10, -1);
        //}

        pop();
    } else {
        //top half of fish (colored w/ c)
        stroke(fil);
        fill(fil);
        triangle(-17, -5, -12,-2, -17, -1);
        rect(-17, -1, 7, 3);
        rect(-16, 2, 3, 1);
        rect(-6,-5, 16, 5);
        line(-6, -2, -10,-2);
        line(-6, -3, -8,-3);
        line(10, -2, 17, -2);
        line(10, -3, 14, -3);

        stroke(c);
        line(-17, 2, -17, -6);
        point(-16,-6);
        point(-15,-5);
        point(-14,-4);
        point(-13,-3);
        point(-12,-2);
        point(-11,-2);
        point(-10,-3);
        point(-9,-3);
        point(-8,-4);
        point(-7,-4);
        line(-6,-5, -2, -5);

        //fin
        stroke(fil);
        rect(-1, -8, 4, 4);
        triangle(-1, -7,-3, -5, -1, -5);
        line(3, -6, 5, -6);

        stroke(c);
        point(-4, -6);
        point(-3, -7);
        line(-2, -8, 3, -8);
        point(3, -7);
        point(4, -7);
        point(5, -6);

        line(2,-5, 10, -5);
        point(11,-4);
        point(12,-4);
        point(14,-3);
        point(15,-3);
        line(16,-2, 18, -2);

        //bottom half of fish
        //finn fill
        stroke(240);
        fill(240);
        rect(-5, 4, 4, 2);

        stroke(220);
        point(-16, 4);
        point(-15, 4);
        line(-14, 3, -10, 3);
        line(-10, 4, -6, 4);
        line(-6, 5, 0, 5);

        //fin
        stroke(220)
        point(-6,5);
        point(-7,5);
        point(-7, 6);
        line(-6, 7, -2, 7);
        line(-2, 6, 10, 6)

        stroke(240);
        line(11, 5, 0, 5);
        line(13, 5, 0, 5);
        line(16, 4, -5, 4);
        line(17, 3, -10, 3);
        line(14, 2, -10, 2);
        line(13, 1, -10, 1);
        line(12, 0, -10, 0);
        line(18, -1, -10, -1);

        stroke(204,194,194);
        point(0,2);
        point(1,1);
        point(2,2);
        point(3,1);
        point(4,2);
        point(5,1);
        point(6,2);

        stroke(220);
        point(10, 5);
        point(11, 5);
        point(12, 5);
        point(13, 4);
        point(14, 4);
        point(15, 4);
        point(16, 3);
        point(17, 3);

        //eye
        fill(255);
        stroke(255);
        rect(9, -1, 4, 2);
        rect(10, -2, 2, 4);
        stroke(0);
        point(11,0);

        pop();
    }
}

var count = 0;
var mouthClosed;
var lookingFord;

function draw() {
    background('lightblue');

    if (count%32==0) {
        count = 0;
        col1 = col2;
        chooseColor2();
        osc.start();
        bg.play();
        bg.loop();
    }

    if (count > 8) {
        mouthClosed = true;
        osc.stop();
        //lookignFord = false;
    } else {
        mouthClosed = false;
        //lookignFord = true;
    }

    if (count <= 8) {
        if (count%2==0) {
            drawFish1(width/2, height/2, 3, col1, true);
            osc.freq(midiToFreq(52));
        } else if ((count+1)%2==0) {
            osc.freq(midiToFreq(53));
            drawFish2(width/2, height/2, 3, col1, true);
        }
    }

    var bigFishX = map(count, 0, 12, -200, 200);
    var bigFishS = map(count, 12, 24, 10, 3);

    if (count == 5) {
        chomp.play();
    }

    if (count <= 12) {
        if (count%2==0) {
            drawFish1(bigFishX, height/2, 10, col2, mouthClosed);
        } else if ((count+1)%2==0) {
            drawFish2(bigFishX, height/2, 10, col2, mouthClosed);
        }
    } if (count > 12 & count <= 24) {
        if (count%2==0) {
            drawFish1(width/2, height/2, bigFishS, col2, mouthClosed);
        } else if ((count+1)%2==0) {
            drawFish2(width/2, height/2, bigFishS, col2, mouthClosed);
        }
    } if (count > 24) {
        if (count%2==0) {
            drawFish1(width/2, height/2, 3, col2, mouthClosed);
        } else if ((count+1)%2==0) {
            drawFish2(width/2, height/2, 3, col2, mouthClosed);
        }
    }

    count += 1;
}

LO-9

Hello! For this weeks looking outwards I decided to explore Olia Lialina’s online art gallery. Olia is an internet artist and experimental film producer. She was born in Moscow and studied film criticism and journalism in Moscow State University, then got an art residencey in Budapest and Munich. Olia’s online gallery linked below is a massive website that displays her art in different spots on the page. With a galaxy background, navigating through the website shifts you around the page to different pieces and categories. I really like this piece because it navigating through it really does feel like walking through a well-curated gallery. I think this is an awesome example of what art galleries can look like in the finite in order to reach more people through the internet.

Center of the Universe

Portrait

The first thing that came to mind when thinking of portrait is Warhol’s Mao. I radially sampled a portrait of Mao and mapped the sum of each sampled pixel’s red and blue values from 0 to 5, and used that as the size of each dot to make a pop-art-esk halftone effect. I attached a photo because the actual output is too big. Enjoy!!

sketch

var img;
var step = 5;
var rmax = 6;
var xpos = [];
var ypos = [];
var rad = [];

function preload() {
    img = loadImage('https://i.imgur.com/R13OPCr.jpeg');
}


function setup() {
    createCanvas(2*530, 2*670);
    image(img, 0, 0, width/2, height/2);
}


function draw() {
    rectMode(CENTER);
    noStroke();
    var xposNum;
    var yposNum;
    for (var r = 0; r < img.width; r+=step) {
        for (var theta = 0; theta < img.height; theta+=step) {
            xposNum = img.width/2+r*cos(radians(theta));
            yposNum = img.height/2+r*sin(radians(theta));
            var c = get(xposNum,yposNum);
            fill(c);
            xpos.push(xposNum);
            ypos.push(yposNum);

            c = red(c)+blue(c);
            c = map(c, 0, 510, 0, rmax);
            if (xposNum > img.width || yposNum > img.height || xposNum < 0 || yposNum < 0) {
                c = rmax;
            }
            rad.push(rmax - c);
        }
    }

    background(255);

    push();
    for (var i = 0; i < xpos.length; i++) {
        fill('RED');
        ellipse(xpos[i], ypos[i], rad[i]);
    }
    translate(width/2, 0);
    for (var i = 0; i < xpos.length; i++) {
        fill('GREEN');
        ellipse(xpos[i], ypos[i], rad[i]);
    }
    pop();
    push();
    translate(0, height/2);
    for (var i = 0; i < xpos.length; i++) {
        fill('BLUE');
        ellipse(xpos[i], ypos[i], rad[i]);
    }
    pop();
    push();
    translate(width/2, height/2);
    for (var i = 0; i < xpos.length; i++) {
        fill('MAGENTA');
        ellipse(xpos[i], ypos[i], rad[i]);
    }

    noLoop();
}

LO8

For this week’s looking outwards I researched Matt Zumwalt, who was an eyeo speaker in 2019. Zumwalt is an engineer and scholar based in Philadelphia. He describes himself as a “queer Buddhist software creator,” and has studied software engineering and cognitive science. His work pertains largely to presenting information and open-sourced software. He has developed several hackable Ruby libraries to ease presenting data and large-scale informatics in rails. Much of his work also revolves around meditating on the nature of technology. He wrote an article titled “the internet has been stolen from you” where he discusses the non-cooperative nature of modern industry and its opposition to open-sourced innovation and free transfer of information.

https://flyingzumwalt.com

LO7

For this weeks looking outwards I chose to look at Aaron Koblin’s flight patterns. Together with colleges from UCLA, Koblin developed a Processing program to analyze and visualize flight patterns over North America. Koblin does’t elaborate on the mechanics of his algorithm, but from the images he has up on his website it looks like he made color and thickness a function of flight frequency, which makes the final product look like a colored pencil-like piece, with webbed spots around airports. This obviously makes for a really effective depiction of the flight patterns in question as it makes really clear where and from large chunks of flights go, but it’s also really visually appealing as a work of pure art.

<href="http://www.aaronkoblin.com/project/flight-patterns/" target='_blank'>flight patterns<\href>

Curves

I really like the dichotomy in this project between calm and chaos. I wanted a pretty simple curve(s) on a plain background that change from very simple and still to complex and chaotic. I set the colors to make it seem like a star or spreading entropy or something. I hope you enjoy!!

sketch
var nPoints = 100;

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


function draw() {
    background(255);

    // draw the frame
    fill(0);
    noStroke();
    stroke(0);
    noFill();

    // draw the curve
    push();
    translate(width / 2, height / 2);
    drawCurve();
    pop();
}

//--------------------------------------------------
function drawCurve() {
    // Hypotrochoid
    // https://mathworld.wolfram.com/Hypotrochoid.html

    var x;
    var y;

    var a = constrain(map(mouseX, 0, width, 50, 150), 50, 150);
    var b = a / constrain(map(mouseX, 10, width-10, 1, 8), 1, 8);
    var h = b;
    var ph = mouseX / 50.0;

    var n = 12;

    for (var j = 0; j < n; j++) {
        var c = map(j, 0, n, 0, 256);
        stroke(256-c,114,c);
        beginShape();
        for (var i = 0; i < nPoints; i++) {
            var t = map(i, 0, nPoints, 0, TWO_PI);
            var r = map(mouseY, 0, height, 0, 5)

            x = (j/n)*(a - b) * cos(t) + (j/n)*h * cos(ph + t * (a - b) / b);
            y = (j/n)*(a - b) * sin(t) - (j/n)*h * sin(ph + t * (a + b) / b);
            vertex(x + random(-r,r), y + random(-r,r));
        }
        endShape(CLOSE);
    }

}

LO-6

Hello! For this weeks looking outward I wrote on John Cage’s Fontana Mix. Fontana Mix is a musical composition Cage composed based on dictation from randomly generated drawings. The sheet music is a combination of traditional sheet music and transparencies with randomly generated points, grids, and lines. Stacking these transparencies allows the player to create an image that can be algorithmically turned into a piece of playable music. This is done by noting the intersections between the lines and the grid, and connecting points in and out of the grid. These intersections are associated with instructions telling the player how to play the piece. The outcome is note only an uneasy and fascinating piece of music, but a beautiful image associated with the music. The viewer will have a hard time relating the image to what they hear, but both share the property of being seemingly random while simultaneously beautiful and reasonable.