Looking Outwards 11: Societal Impacts of Digital Art

https://www.nytimes.com/2016/12/27/magazine/finding-inspiration-for-art-in-the-betrayal-of-privacy.html

Finding Inspiration for Art in the Betrayal of Privacy

Jenna Wortham

Dec. 27, 2016

The article “Finding Inspiration for Art in the Betrayal of Privacy” by Jenna Wortham discusses topics including works of art, privacy, and data security.

The author introduces an art exhibition in Lower Manhattan and specifically lists some of the works to show how easy it is for people’s private information to be acquired and exploited unknowingly in the era of big data.

For example, information from Wifi-enabled devices passing through the gallery is gathered by eight antennas and relayed to a large screen, which shows how easy and common it is for us to be tracked.

The article acknowledges the high level of technology development and its wide range of uses, but also reminds people of the side effects brought by technology development–the cost of privacy.

In the author’s opinion, artists reflect on society through their creations, making people aware of the problems existing in society and reflect on them.

Project 11: Generative Landscape

SpongeBob SquarePants

sketch
//Xinyi Du 
//15104 Section B
//xinyidu@andrew.cmu.edu
//Project-11

//SpongBob walking gif source:
//https://www.deviantart.com/supermariospongebob/art/SB-Walkin-into-Monday-858782150
//SB Walkin' into Monday
//by supermariospongebob

//arrays for background flowers
var filenamesF = [];
var bgflowers = [];
var backgroundF = [];
//arrays for the character
var filenames = [];
var walkImage = [];
var character = [];

var buildings = [];
var leaves = [];
var flags = [];

function preload() {
    //load SpongeBob walk cycle images
    filenames[0] = "https://i.imgur.com/ulD5SOy.png";
    filenames[1] = "https://i.imgur.com/0cFmmhf.png";
    filenames[2] = "https://i.imgur.com/wmSWQHb.png";
    filenames[3] = "https://i.imgur.com/iYYLnPL.png";
    filenames[4] = "https://i.imgur.com/kFzcZXr.png";
    filenames[5] = "https://i.imgur.com/Ej0nUgn.png";
    filenames[6] = "https://i.imgur.com/wfR57hy.png";
    filenames[7] = "https://i.imgur.com/4TadbPD.png";
    filenames[8] = "https://i.imgur.com/BjVfWWi.png";
    filenames[9] = "https://i.imgur.com/vLUiotP.png";
    filenames[10] = "https://i.imgur.com/oA49LHr.png";
    filenames[11] = "https://i.imgur.com/A9TMzpP.png";
    filenames[12] = "https://i.imgur.com/NAPIs2c.png";
    for (var i = 0; i < filenames.length; i++) {
        walkImage[i] = loadImage(filenames[i]);
    }
    //load background flower images
    filenamesF[0] = "https://i.imgur.com/ZNmnfMU.png";
    filenamesF[1] = "https://i.imgur.com/o1z2jrZ.png";
    filenamesF[2] = "https://i.imgur.com/U4OwJMt.png";
    filenamesF[3] = "https://i.imgur.com/iACszh9.png";
    filenamesF[4] = "https://i.imgur.com/4eTqZLb.png";
    for (var i = 0; i < filenamesF.length; i++) {
        bgflowers[i] = loadImage(filenamesF[i]);
    }
    leaves.push(loadImage("https://i.imgur.com/8NFDDnM.png"));
    leaves.push(loadImage("https://i.imgur.com/CberjzQ.png"));
    flags.push(loadImage("https://i.imgur.com/2kTH6D6.png"));
}

//make SpongeBob
function makeSpongeBob(sx, sy) {
    var s = {x: sx, y: sy, 
             imageNum: 0,
             drawFunction: drawSpongeBob
         }
    return s;
}
function drawSpongeBob() {
    this.imageNum ++; //increase imageNum
    //if reaches the length (end) of the array (go over 10 images), start from 0 again
    if (this.imageNum == walkImage.length) { 
        this.imageNum = 0;
    }
    image(walkImage[this.imageNum], this.x, this.y, 130, 140); //draw the image
}

function setup() {
    createCanvas(480, 400); 
    frameRate(9);
    //store SpongBob andCoral images to the array character
    character.push(makeSpongeBob(180, 220));
    character.push(makeCoral(0));
    //store background flower images to the array makeBackground
    backgroundF.push(makeBackground(20, 50, 0));
    backgroundF.push(makeBackground(180, 30, 1));
    backgroundF.push(makeBackground(460, 30, 2));
    backgroundF.push(makeBackground(120, 180, 3));
    backgroundF.push(makeBackground(300, 180, 4));
    backgroundF.push(makeBackground(550, 100, 0));
    backgroundF.push(makeBackground(650, 30, 3));
    //store 4 types of buildings to the array buildings
    buildings.push(makeBuilding1(0));
    buildings.push(makeBuilding1(360));
    buildings.push(makeBuilding2(130));
    buildings.push(makeBuilding3(270));
    buildings.push(makeBuilding4(560));
}


function draw() {
    background(87,157,231); 
    //draw background flowers
    for (i = 0; i < backgroundF.length; i++) {
        backgroundF[i].update();
        backgroundF[i].display();  
    } 
    //draw the grounds and horizon lines
    fill(235,233,218);
    noStroke();
    rect(0, height*2/3, width, height/3);
    fill(80);
    rect(0, height*3/4, width, height/4);
    stroke(0);
    strokeWeight(0.7);
    line(0, height*3/4, width, height*3/4);
    line(0, height*2/3, width, height*2/3)
    //draw the buildings
    for (i = 0; i < 5; i ++) {
        buildings[i].update();
        buildings[i].drawFunction();
    }
    character[0].drawFunction(); //draw SpongBob
    character[1].drawFunction(); //draw corals
}

//make background flowers
function makeBackground(bgx, bgy, idx) {
    var bg = {x: bgx, y: bgy, index: idx, speed: -3,
                size: random(100, 180), //random starting size
                dsize: random(-6,6), //random decrease or increase size every update
                update: bgFlowerUpdate,
                display: bgFlowerDisplay
            }
    return bg;  
}
function bgFlowerUpdate() {
    this.x += this.speed; //move to the left with speed -3
    this.size += this.dsize; //increase or decrease size by dsize
    if (this.x < -width/2) { //if out of the canvas
        this.x = width; //start from the right side again
        this.size = random(80, 100); //start with random size
        this.size += this.dsize;
    }
    if (this.size >= 200 || this.size <= 30) { //if size reaches the limit 30 or 200
        this.dsize = -this.dsize; //inverse the size change direction
    }
}
function bgFlowerDisplay() {
    image(bgflowers[this.index], this.x, this.y, this.size, this.size); 
}

//Squidward Tentacles' house
function makeBuilding1(bx) { //startX is the starting X of the building
    var bg = {startX: bx, speed: -6,
              r: random(40, 150), g: random(70, 200), b: random(200, 255), //random color in cool tone
              update: updateBuilding1,
              drawFunction: drawBuilding1
            }
    return bg;
}
function drawBuilding1() {
    //structure
    var x1 = 100; var y1 = 140;
    var x2 = 150; 
    var x3 = 165; var y2 = 285;
    var x4 = 85; 
    fill(this.r+20, this.g+20, this.b+20);
    rect(this.startX+80, 180, 90, 45);
    fill(this.r, this.g, this.b);
    quad(this.startX+x1, y1, this.startX+x2, y1, this.startX+x3, y2, this.startX+x4, y2);
    fill(this.r-20, this.g-20, this.b-20);
    rect(this.startX+103, 169, 44, 11);
    quad(this.startX+120, 180, this.startX+130, 180, this.startX+138, 235, this.startX+112, 235);
    //windows
    fill(171,174,191);
    ellipse(this.startX+109, 190, 19, 20);
    ellipse(this.startX+141, 190, 19, 20);
    if (frameCount % 5 == 0) { //blink every 5 frames
        fill(21,144,177); 
    } else {
        fill(255, 250, 112);
    }
    ellipse(this.startX+109, 190, 0.6*19, 0.6*20);
    ellipse(this.startX+141, 190, 0.6*19, 0.6*20);
    //door
    fill(132, 114, 85);
    arc(this.startX+125, 255, 26, 26, PI, PI*2, OPEN);
    noStroke();
    rect(this.startX+125-13, 255, 26, 30);
    stroke(0);
    line(this.startX+125-13, 255, this.startX+125-13, 255+30);
    line(this.startX+125+13, 255, this.startX+125+13, 255+30);
    line(this.startX+125-13, 255+30, this.startX+125+13, 255+30);

}
function updateBuilding1() {
    this.startX += this.speed;
    if (this.startX < -width/3) { //if out of the canvas
        this.startX = width; //start from the right side again
    }

}
//SpongeBob's house
function makeBuilding2(bx) {
    var bg = {startX: bx, speed: -6,
              r: random(240,255), g: random(140,210), b: random(10,45), //random orange/yellow
              update: updateBuilding2,
              drawFunction: drawBuilding2
            }
    return bg;
}
function drawBuilding2() {
    fill(46, 144, 11);
    image(leaves[0], this.startX+16, 76, 200, 230); //draw leaves  
    //pineapple structure
    fill(this.r, this.g, this.b);
    arc(this.startX+125, 245.5, 100, 130, PI*3/4, PI*9/4, CHORD);
    //windows
    fill(171,174,191);
    ellipse(this.startX+109, 210, 19, 20);
    ellipse(this.startX+155, 265, 19, 20);
    if (frameCount % 8 == 0) { //blinks every 8 frames
        fill(255, 250, 112);
    } else {
        fill(21,144,177);
    }
    ellipse(this.startX+109, 210, 0.6*19, 0.6*20);
    ellipse(this.startX+155, 265, 0.6*19, 0.6*20);
    //door
    fill(171,174,191);
    strokeWeight(0.5);
    arc(this.startX+125, 260, 26, 26, PI, PI*2, OPEN);
    noStroke();
    rect(this.startX+125-13, 260, 26, 25);
    stroke(0);
    strokeWeight(0.5);
    line(this.startX+125-13, 260, this.startX+125-13, 260+25);
    line(this.startX+125+13, 260, this.startX+125+13, 260+25);
    line(this.startX+125-13, 260+25, this.startX+125+13, 260+25);
    fill(76,89,121);
    arc(this.startX+125, 260, 18, 18, PI, PI*2, OPEN);
    noStroke();
    rect(this.startX+125-9, 260, 18, 25);
    stroke(0);
    strokeWeight(0.5);
    line(this.startX+125-9, 260, this.startX+125-9, 260+25);
    line(this.startX+125+9, 260, this.startX+125+9, 260+25);
    line(this.startX+125-9, 260+25, this.startX+125+9, 260+25);
}
function updateBuilding2() {
    this.startX += this.speed;
    if (this.startX < -width/3) {
        this.startX = width;
    }

}
//Patrick Star's house
function makeBuilding3(bx) {
    var bg = {startX: bx, speed: -6,
              r: random(150,255), g: 80, b: 80, //random shades of red
              update: updateBuilding3,
              drawFunction: drawBuilding3
            }
    return bg;
}
function drawBuilding3() {
    //decoration
    strokeWeight(0.3)
    fill(248,228,156);
    rect(this.startX+125-1.5, 248, 3, 30);
    rect(this.startX+125-8, 245, 16, 3);
    //structure
    strokeWeight(0.6);
    fill(this.r, this.g, this.b);
    arc(this.startX+125, 285, 60, 60, PI, PI*2, CHORD);
}
function updateBuilding3() {
    this.startX += this.speed;
    if (this.startX < -width/2) {
        this.startX = width;
    }
}
//Krusty Krab Restaurant
function makeBuilding4(bx) {
    var bg = {startX: bx, speed: -6,
              update: updateBuilding4,
              drawFunction: drawBuilding4
            }
    return bg;
}
function drawBuilding4() {
    fill(115,95,42);
    rect(this.startX, 222, 105, 63);
    //glass windows and door
    fill(109,165,244);
    rect(this.startX, 252, 105, 33);
    //wooden structures
    fill(115,95,42);
    rect(this.startX, 215, 12, 70);
    rect(this.startX+105, 215, 12, 70);
    fill(94,74,29);
    line(this.startX-5+63, 252, this.startX-5+63, 285)
    rect(this.startX-5, 273, 40, 12);
    rect(this.startX+80, 273, 41, 12);
    rect(this.startX-5+40, 252, 40, 5);
    rect(this.startX-5+40, 252, 10, 33);
    rect(this.startX+71, 252, 11, 33);
    //load flags
    image(flags[0], this.startX+11.5, 232, 94, 20); 
}
function updateBuilding4() {
    this.startX += this.speed;
    if (this.startX < -width/3) {
        this.startX = width;
    }

}
//corals
function makeCoral(cx) {
    var s = {startX: cx, speed: -10,
             drawFunction: drawCoral
         }
    return s;
}
function drawCoral() {
    image(leaves[1], this.startX+100, 320, 60, 120); //smaller coral
    image(leaves[1], this.startX+200, 280, 100, 200); //bigger coral
    this.startX += this.speed;
    if (this.startX < -width) {
        this.startX = width*1.2;
    }
}






Project 10: Sonic Story

Nick’s Prank (Story inspired by Zootopia Teaser Trailer)

Judy the bunny and the goat are walking on the street. Nick the fox sees them and decides to play a prank on Judy. When Judy passes Nick, Nick puts out his foot and trips Judy. In a panic, Judy pushes the goat walking in front of her, so the goat falls down as well. After seeing them both fall, Nick hums with joy.

sketch
//Xinyi Du 
//15104 Section B
//xinyidu@andrew.cmu.edu
//Project-10

//Nick's Prank (Story inspired by Zootopia Teaser Trailer)

//Judy the bunny and the goat are walking on the street. 
//Nick the fox sees them and decides to play a prank on Judy.
//When Judy passes Nick, Nick puts out his foot and trips Judy.
//In panic, judy pushes the goat walking in front of her, so the goat falls down as well.
//After seeing them both fall, Nick hums with joy.

/* 
Images of characters from Zootopia Teaser Trailer:
https://www.youtube.com/watch?v=g9lmhBYB11U

Street image source: 
https://www.etsy.com/au/listing/581765202/the-buildings-of-main-street-walt-disney?
ref=related-2&epik=dj0yJnU9UWhoMkVRQnRMc1hFbk40dXRWQ21FVUdSVG9iYVFZT3QmcD0wJm49RWRs
YUhPc25aWUxvdTY5ZEtod3liQSZ0PUFBQUFBR053QWdv
*/


var filenames = [];
var walkImage = []; //walk cycle images of judy

var filenames2 = [];
var fallImage = []; //fall images of judy

var filenames3 = [];
var walkImage2 = []; //walk cycle images of the goat

var filenames4 = [];
var fallImage2 = []; //fall images of the goat

var character = [];
var street;
var clouds;
var nick;

var walk; //walking footsteps sound variable
var ouch; //ouch sound judy makes when fall
var bodyfall; //body falling sound of the goat
var nickhumming; //happy humming of nick

function preload(){
    //load sounds
    walk = loadSound("https://courses.ideate.cmu.edu/15-104/f2022/wp-content/uploads/2022/11/footsteps.mp3");
    ouch = loadSound("https://courses.ideate.cmu.edu/15-104/f2022/wp-content/uploads/2022/11/ouch.mp3");
    bodyfall = loadSound("https://courses.ideate.cmu.edu/15-104/f2022/wp-content/uploads/2022/11/bodyfall.wav");
    nickhumming = loadSound("https://courses.ideate.cmu.edu/15-104/f2022/wp-content/uploads/2022/11/happy-huming.mp3");
    
    //load images
    //walk cycle images of judy
    filenames[0] = "https://i.imgur.com/wLVmUpf.png";
    filenames[1] = "https://i.imgur.com/TffffQ8.png";
    filenames[2] = "https://i.imgur.com/5Lirbd1.png";
    filenames[3] = "https://i.imgur.com/N2BUn7y.png";
    filenames[4] = "https://i.imgur.com/pc6Lp46.png";
    filenames[5] = "https://i.imgur.com/lhOcePN.png";
    filenames[6] = "https://i.imgur.com/djXrWqQ.png";
    filenames[7] = "https://i.imgur.com/8nXGJZe.png";
    filenames[8] = "https://i.imgur.com/D8o0eOa.png";
    filenames[9] = "https://i.imgur.com/qzJQm37.png";
    for (var i = 0; i < filenames.length; i++) {
        walkImage[i] = loadImage(filenames[i]);
    }
    //fall images of judy
    filenames2[0] = "https://i.imgur.com/c1vUye5.png";
    filenames2[1] = "https://i.imgur.com/mbibpsr.png";
    filenames2[2] = "https://i.imgur.com/ZSeL7on.png";
    filenames2[3] = "https://i.imgur.com/UNqmLD7.png";
    for (var i = 0; i < filenames2.length; i++) {
        fallImage[i] = loadImage(filenames2[i]);
    }
    //walk cycle images of the goat
    filenames3[0] = "https://i.imgur.com/RRf37Kf.png";
    filenames3[1] = "https://i.imgur.com/ue4D3ig.png";
    filenames3[2] = "https://i.imgur.com/MxIlCqf.png";
    filenames3[3] = "https://i.imgur.com/UDHWsZ8.png";
    filenames3[4] = "https://i.imgur.com/a3nmvz3.png";
    filenames3[5] = "https://i.imgur.com/i75T56A.png";
    filenames3[6] = "https://i.imgur.com/cN4M52I.png";
    filenames3[7] = "https://i.imgur.com/A1iDTIi.png";
    for (var i = 0; i < filenames3.length; i++) {
        walkImage2[i] = loadImage(filenames3[i]);
    }
    //fall images of the goat
    filenames4[0] = "https://i.imgur.com/plfUZHK.png";
    filenames4[1] = "https://i.imgur.com/g7C3kXU.png";
    filenames4[2] = "https://i.imgur.com/14PuZpL.png";
    filenames4[3] = "https://i.imgur.com/Pcl7xcg.png";
    filenames4[4] = "https://i.imgur.com/KC56zzH.png";
    for (var i = 0; i < filenames4.length; i++) {
        fallImage2[i] = loadImage(filenames4[i]);
    }

    street = loadImage("https://i.imgur.com/G0SJIDN.jpg");
    clouds = loadImage("https://i.imgur.com/LbxT2nS.png");
    nick = loadImage("https://i.imgur.com/hEIvnaB.png");
}

//constructor for walking judy
function makeJudy(jx, jy, jdx) {
    var j = {x: jx, y: jy, dx: jdx,
             imageNum: 0,
             stepFunction: stepJudy,
             drawFunction: drawJudy
         }
    return j;
}
function stepJudy() {
    this.x += this.dx; //increase x by dx
    this.imageNum ++; //increase imageNum
    //if reaches the length (end) of the array (go over 10 images), start from 0 again
    if (this.imageNum == walkImage.length) { 
        this.imageNum = 0;
    }
}
function drawJudy() {
    image(walkImage[this.imageNum], this.x, this.y, 63, 80); //draw the image
}


//constructor for falling judy
function makeFallDown(fx, fy) {
    var f = {x: fx, y: fy, imageNum: 0,
            stepFunction: stepFallDown,
            drawFunction: drawFallDown
         }
    return f;
}
function stepFallDown() {
    //increases imageNum only when it has not exceed the length of the array fallImage
    if(this.imageNum < fallImage.length-1) {
        this.imageNum ++;
    }  
}
function drawFallDown() {
    image(fallImage[this.imageNum], this.x, this.y, 170, 100);
}


//constructor for walking goat
function makeNewChar(cx, cy, cdx) {
    var c = {x: cx, y: cy, dx: cdx,
             imageNum: 0,
             stepFunction: stepChar,
             drawFunction: drawChar
         }
    return c;
}
function stepChar() {
    this.x += this.dx; 
    this.imageNum ++; 
    if (this.imageNum == walkImage2.length) { 
        this.imageNum = 0;
    }
}
function drawChar() {
    image(walkImage2[this.imageNum], this.x, this.y, 120, 180); 
}


//constructor for falling goat
function makeFallDown2(fx, fy) {
    var f = {x: fx, y: fy, imageNum: 0,
            stepFunction: stepFallDown2,
            drawFunction: drawFallDown2
         }
    return f;
}
function stepFallDown2() {
    if(this.imageNum < fallImage2.length-1) {
        this.imageNum ++; 
    }  
}
function drawFallDown2() {
    image(fallImage2[this.imageNum], this.x, this.y, 300, 200);
}

//set up sounds
function soundSetup() {
    walk.setVolume(0.4);
    ouch.setVolume(0.8);
    bodyfall.setVolume(1.2);
    nickhumming.setVolume(0.1);
}
//define a function to add the sounds
function addSounds() {
    if(frameCount % 15 == 1) {
        walk.play(); //walking footstep sounds very 15 frameCounts
    }
    if(frameCount == 99) {
        ouch.play(); //judy makes "ouch" sound when being tripped
    }
    if(frameCount > 100){
        walk.stop(); //stop walking footstep sounds when falling down
    }
    if(frameCount == 100) {
        bodyfall.play(); //body falling sound of the goat after judy falls
    }
    if(frameCount == 108) {
        nickhumming.play(); //nick humming after they both falls
        noLoop(); //end the loop
    }
}



function setup() {
    createCanvas(700, 500);
    frameRate(5);
    useSound();
    //store the characters info to the characters array
    var judyX = width/4;
    character.push(makeJudy(judyX, height-94, 0));
    character.push(makeFallDown(judyX, height-112, 0));
    var newCharX = width/3;
    character.push(makeNewChar(newCharX, height-184, 0)); //walking goat before judy falls
    var newChar2X = width/3;
    character.push(makeNewChar(newChar2X, height-184, 10)); //goat after judy falls, continue walking
    character.push(makeFallDown2(290, height-199, 10));
}

function draw() {
    background(25);
    //call the addSounds function to add sounds
    addSounds();
    //constrain the Xs of the images of street and clouds so that they stop rolling when Judy falls
    //street and clouds rolling with different speed according to frameCount
    var streetX = constrain(0-frameCount*10, -1000, 0); 
    var cloudsX = constrain(0-frameCount*5, -500, 0);
    image(street, streetX, -70, 2000, 600);
    image(clouds, cloudsX, -100, 2000, 600);

    //update the steps and draw the characters
    //constrain the X of nick so that it does not move when the street scene stops
    var nickX = constrain(1175-frameCount*10, 175, 1000);
    var judyX = width/4;
    var newCharX = width/11;
    //if judy (width/4) has not meet nick(nickX)
    if (nickX > width/4) {
        //draw the image of nick
        image(nick, nickX, height-111, 80, 100);
        character[2].stepFunction(); 
        character[2].drawFunction(); //walking goat
        character[0].stepFunction();
        character[0].drawFunction(); //walking judy
    } 
    //if judy (width/4) passes by nick(nickX)
    if (judyX == nickX) {
        character[1].stepFunction();
        character[1].drawFunction(); //judy falls down
        //the goat continue walking
        if (character[3].x < 250) { 
            character[3].stepFunction();
            character[3].drawFunction(); //walking goat
        }
    } 
    //if judy pushes the goat
    if (character[3].x >= 250) {
        character[4].stepFunction();
        character[4].drawFunction(); //goat falls down
    }
}




Project 09: Computational Portrait (Custom Pixel)

Click to switch between “circles” or “lines” mode.

“Circles” Mode: move the mouse left or right to change the circles’ size and stroke weight to make the portrait more blurry.

“Lines” Mode: move the mouse left or right to change the rotation angle of the lines to create the wind blowing effect.

sketch
Circles
Lines
//Xinyi Du 
//15104 Section B
//xinyidu@andrew.cmu.edu
//Assignment-09

//Click to switch between "circles" or "lines" mode.

//"Circles" Mode: 
//move the mouse left or right to change the circles' size and stroke weight 
//to make the portrait more blurry.

//"Lines" Mode: 
//move the mouse left or right to change the rotation angle of the lines 
//to create the wind blowing effect.

var click = 0; //number of clicks

function preload() {
  
  img = loadImage("https://i.imgur.com/ncc1zMh.jpg");
  //original url https://i.imgur.com/mOmrZEo.jpg
}

function setup() {
  createCanvas(547, 547);
  background(255);
  imageMode(CENTER);
  img.loadPixels(); //load pixels
}

function draw() { 
  //click to switch between "circles" or "lines" mode
  if (click % 2 == 0) {
    draw1(); //circles mode
  }
  else {
    draw2(); //lines mode
  }
}


function draw1() { //circles
  for (i=0; i<100; i++) {
    var x = floor(random(img.width)); //random x of the center of circles
    var y = floor(random(img.height)); //random y of the center of circles
    var dotcolor = img.get(x, y); //get the pixel color info
    var point = (dotcolor[0]+dotcolor[1]+dotcolor[2])/3; //get the average RGB value

    //map the mouseX position to circle sizes
    var mapsize = map(mouseX, 0, width, 5, 30);
    //map the mouseX position to circle stroke weights
    var mapWeight = map(mouseX, 0, width, 5, 0.5);;

    strokeWeight(mapWeight);
    stroke(dotcolor); //strokecolor is the pixel color
    noFill();
    ellipse(x, y, mapsize, mapsize);
    stroke(dotcolor[0]+35, dotcolor[1]+35, dotcolor[2]+35); //stroke color ligher
    ellipse(x, y, mapsize*1.5, mapsize*1.5); //circle size bigger
    stroke(dotcolor[0]-35, dotcolor[1]-35, dotcolor[2]-35); //stroke color darker
    ellipse(x, y, mapsize*0.5, mapsize*0.5); //circle size smaller
  }
}


function draw2() { //lines
  for (i=0; i<10000; i++) {
    var initdegree = mouseX; //mouseX determines the initial degree
    //x, y of the starting point of the lines, random points within the canvas
    var x = floor(random(img.width)); 
    var y = floor(random(img.height));
    var dotcolor = img.get(x, y);
    var point = (dotcolor[0]+dotcolor[1]+dotcolor[2])/3;

    //map the average RGB value to degrees, the greater the value the greater the degrees
    var mapdegree = initdegree+map(point, 0, 255, 0, 180);
    //map the average RGB value to line lengths, the greater the value the shorter the lengths
    var maplength = map(point, 0, 255, 15, 2);
    //map the average RGB value to stroke weights, the greater the value the smaller the stroke weights
    var mapWeight = map(point, 0, 255, 5, 0.3);

    noFill();
    strokeWeight(mapWeight);

    push();
    translate(x,y); //translate the origin to (x,y)
    rotate(radians(mapdegree)); //rotate mapdegree
    stroke(dotcolor);
    line(0, 0, 0+maplength, 0+maplength);
    stroke(dotcolor[0]+35, dotcolor[1]+35, dotcolor[2]+35);
    line(10, 0, 10+maplength+5, 0+maplength+5);
    stroke(dotcolor[0]-35, dotcolor[1]-35, dotcolor[2]-35);
    line(-10, 0, -10+maplength-5, 0+maplength-5); 
    pop();
  }

}

function mousePressed() {
  click ++ ; //if mouse is pressed, increase number of clicks
}


Looking Outwards 09: A Focus on Women and Non-binary Practitioners in Computational Art

https://www.adriensegal.com/

Work: Molalla River Meander

Artist: Adrien Segal

Adrien Segal is an artist and writer based in Oakland, California.

She mainly focuses on transforming statistical information and data into artworks (sculpture) that reflect aspects like “history, narrative, emotion, landscape, and perception”, through artistic explorations and experiments.

Molalla River Meander

“Molalla River Meander” is my favorite work of the artist.

This work transforms alluvial flow data of the Molalla River in Oregon into a sculpture art piece. Data were obtained from the USGS Oregon Water Science Center, LIDAR maps of the Molalla River in Clackamas County, Oregon, which recorded river path changes from 1995 to 2009.

What I admire a lot about the project is that the years recorded are reflected through the thickness of the art piece and the general variations of the flow are reflected through the vertical variations of the wooden curved “wall”. I think Adrien Segal combined and reflected the two aspects (years and path changes) perfectly through her artistic expression.

Molalla River Meander
Video

Looking Outwards 08: The Creative Practice of an Individual

Nicole Aptekar

http://nicolation.net/

Nicole Aptekar is a paper sculptor and technologist based in Brooklyn, NY. Her works aim to turn basic digital forms into sophisticated, intricate, and elegant physical forms through technologies like “custom software” and “contemporary CNC fabrication methods”. Her works can be considered representations of the transition between the digital and physical forms as well as the transition between the virtual and the real world.

The works of Nicole Aptekar show high delicacy in structures and high craftmanship in the eventual prevented outcome. Her works mainly use the technique of overlay to overlay dozens of papers on top of each other. She makes each piece of paper slightly different than another, thus creating the eventual works not only amazing two-dimensionally but also three-dimensionally. I admire the series “METAFLUX” the most. Because for this series of works, the artist applies the color of black and white to create a marvelous color contrast effect as well.

To present her works, Nicole Aptekar includes high-resolution images to present her work not only two-dimensionally (showing how the works look from the top view) but also three-dimensionally (showing the works from an angle slightly above). She also included zoomed images to show the details. These are very effective strategies that I can learn from when presenting my own work.

For once in your life you have to pause. January, 2018. 40 sheets of paper.
For once in your life you have to pause. January, 2018. 40 sheets of paper.
Continuation/325. April, 2018. 40 sheets of paper.
Continuation/325. April, 2018. 40 sheets of paper.

Video

Project-07: Composition with Curves

Reference Curve: Atzema Spiral

Move the mouse up and down to change the rotation angle

Move the mouse left and right to change the radius

sketch
Examples
//Xinyi Du 
//15104 Section B
//xinyidu@andrew.cmu.edu
//Project-07

//Referrence Curve: Atzema Spiral
//move the mouse up and down to change the rotation angle
//move the mouse left and right to change radius

function setup() {
    createCanvas(480, 480);
    background(250);
}

function draw() {
    background(0);
    //draw the pair of lines that change with mouseX and mouseY
    lines1(mouseX, mouseY);
    lines2(mouseX, mouseY);
}

//define the function to draw the lines
function lines1 (R, A) {
    //constrain the angle and radius and map them to specific ranges
    RR = constrain(R, 0, width);
    AA = constrain(A, 0, height);
    //radius with the range(20, 20)
    r = map(RR, 0, width, 20, 50);
    //angle within the range(50, 800)
    a = map(AA, 0, height, 50, 800);
    
    //for loop to draw the lines and circles
    for (angle = 57.2957795; angle < 57.2957795+a; angle += 3) {
        push(); //push to save the orgin tranformation

        //translate the origin to (width/3, width/3)
        translate(width/3, width/3);
        //polar coordinates according to Atzema Spiral
        var t = radians(angle);
        var x = x3+ r * ( sin(t)/t - 2*cos(t) - t*sin(t) );
        var y = y3+ r * ( -cos(t)/t - 2*sin(t) - t*cos(t) );
        //another series of polar coordinates with 60 more degrees of angle
        var t2 = radians(angle+60);
        var x2 = x3 + (r) * ( sin(t2)/t2 - 2*cos(t2) - t2*sin(t2) );
        var y2 = y3 + (r) * ( -cos(t2)/t2 - 2*sin(t2) - t2*cos(t2) );
        //reference circle polar coordinates
        var radius = 2*r; //radius of the circle
        var x3 = radius * cos(radians(angle));
        var y3 = radius * sin(radians(angle));

        strokeWeight(0.5);
        //purple and opacity 90 of the lines from center to polar coordinates
        stroke(183, 125, 255, 90);
        line(0, 0, x, y);
        
        //blurish purple 
        stroke(104, 81, 225); 
        noFill();
        
        //three circles
        ellipse(0, 0, radius*2, radius*2);
        ellipse(0, 0, radius*2+10, radius*2+10);
        ellipse(0, 0, radius*2+20, radius*2+20);

        //blue
        stroke(1, 124, 228);
        //lines from first series of polar coordinates to the second series
        line(x, y, x2, y2);
        //lines from center to the reference circle
        line(0, 0, x3, y3);

        //purple
        stroke(183, 125, 255)
        fill(183, 125, 255);
        //small circles
        circle(x, y, 3);

        pop(); //pop to return to the original setting of the origin 
    }

}
    
//rotate 180 degrees of the lines1
function lines2 (R, A) {
    //tranlate the origin
    translate(width, height);
    rotate(radians(180));
    //call the function lines1
    lines1(R, A);
}


Looking Outwards 07: Information Visualization

Flight Patterns

http://www.aaronkoblin.com/work/flightpatterns/index.html

Aaron Koblin, Scott Hessels, and Gabriel Dunne

Celestial Mechanics–Flight Patterns

Flight Patterns

The Project is an exploration and visual representation of flight patterns in North America.

What I admire a lot about the project is that the project not only provides status images to show the overall patterns and frequency of flights in different cities but also a video to show the dynamic routes of the flights.

The data used is from Federal Aviation Administration and the Processing programming environment and Adobe After Effects and/or Maya are applied for the visualization and representation of data.

The background is set in black and the flights are set in lighter colors, and the denser the lines or the more frequent the flight routes, the brighter the colors and closer the colors to white. This use of contrast of dark background and light lines creates strong contrast and makes the flights more prominent. It is also easy to identify the places where flights are more frequent by comparing the line weights and colors. On the aesthetic aspect, the overall effects of both the diagrams and the video are very visually appealing and the lines remind the audience of lightning or fireworks.

Flight Patterns–Southwest
Video of Flight Patterns

Project 06 – Abstract Clock

Big circles with no fills and rotation angles of small circles represent seconds.
-The top of the canvas displays the first 30 seconds,
-and the bottom displays the second 30 seconds.

The size of the small rotating circles represents minutes.
-The size of the main circle corresponds to the minutes.
-The greater the current minutes, the greater the size of the circles.

The fill color of the upper biggest circle represents hours.
-Each different hour represents a different fill color.

The stroke colors of the upper big circles represent day and night.
-During the day, the strokes are in the color of light yellow.
-During the night, the strokes are in the color blue.

P6

sketch
//Xinyi Du 
//15104 Section B
//xinyidu@andrew.cmu.edu
//Project-05

/*
Big circles with no fills and rotation angles of small circles represent seconds. 
Top of the canvas displays the first 30 seconds, 
and the bottom displays the second 30 seconds.

The size of the small rotating circles represent minutes.
The size of the main cirle correspond to the minutes. 
The greater the current minutes, the greater the size of the circles. 

The filled color of the upper biggest circle represent hours.
Each different hour represent a different filled color.

The strokes of the upper big circles represent day and night.
During the day, the strokes are in color of light yellow.
During the night, the strokes are in color if blue.
*/

function setup() {
    createCanvas(480, 450);
    frameRate(15);
}

function draw() {
    background(50);
    //set hour, minute, and second
    var hourN = hour();
    var minuteN = minute();
    var secondN = second();

    //To present seconds & hours:
    //draw the number of circles with no fill according to the seconds
    for (var s = 0; s<secondN; s++) {
        //if seconds less than 30, draw the circles on the top half of the canvas
        if (s < 30) { 
            //if during the day, stroke color light yellow
            if (hourN <= 18 & hourN >= 6) {
                var r = 255;
                var g = 243;
                var b = 178;
                stroke(r, g, b);
            //if during the night, stroke color blue
            } else {
                var r = 80;
                var g = 131;
                var b = 220;
                stroke(r, g, b);
            }
            //fill color represent hour
            Hcolor(hourN);
            //each circle with different diameter represent one second
            circle(width/2, -60, 650-(s*15));
        } 
        //if seconds more than 30, draw the circles on the bottom half of the canvas
        if (s >= 30) {
            //stroke color for the bottom half circles: gradually darkening white
            stroke(255-(s-30)*6);
            noFill();
            //each circle with different diameter represent one second
            circle(width/2, height+60, 650-((s-30)*15));
        } 
    }

    
    //To present seconds & minutes:
    for (var s = 0; s<secondN; s++) {
        stroke(255);
        //if seconds less than 30, rotate along the outermost stroke of the top half circles
        if (s < 30) {
            push();
            //tranlate the origin
            translate(width/2, -60);
            //polar coordinates
            var angle = 47+(secondN/60)*180;
            var x = (650/2) * cos(radians(angle));
            var y = (650/2) * sin(radians(angle));
            // fill the main circle that represent minutes with day color
            fill(r, g, b);
            stroke(r, g, b);
            //drew the smaller circles that rotate along the strokes of different circles
            //the size of the main cirle correspond to the minutes
            circle(x, y, minuteN);
            fill(100);
            //other smaller circles
            var x1 = (650/2-30) * cos(radians(angle-40));
            var y1 = (650/2-30) * sin(radians(angle-40));
            circle(x1, y1, minuteN-minuteN/3);
            var x2 = (650/2-60) * cos(radians(angle-20));
            var y2 = (650/2-60) * sin(radians(angle-20));
            circle(x2, y2, minuteN-minuteN/(2/3));
            var x3 = (650/2-90) * cos(radians(angle-70));
            var y3 = (650/2-90) * sin(radians(angle-70));
            circle(x3, y3, minuteN-minuteN/2);
            var x4 = (650/2-120) * cos(radians(angle-50));
            var y4 = (650/2-120) * sin(radians(angle-50));
            circle(x4, y4, minuteN-minuteN/1.5);
            pop();
        }
        //if seconds more than 30, rotate along the outermost stroke of the bottom half circles
        if (s >= 30) {
            push();
            //tranlate the origin
            translate(width/2, height+60);
            //polar coordinates
            var angle = 180+47+((secondN-30)/60)*180;
            var x = (650/2) * cos(radians(angle));
            var y = (650/2) * sin(radians(angle));
            // fill the main circle that represent minutes with day color
            fill(r, g, b);
            stroke(255);
            //drew the smaller circles that rotate along the strokes of different circles
            //the size of the main cirle correspond to the minutes
            circle(x, y, minuteN);
            fill(100);
            //other smaller circles
            var x1 = (650/2-30) * cos(radians(angle-40));
            var y1 = (650/2-30) * sin(radians(angle-40));
            circle(x1, y1, minuteN-minuteN/3);
            var x2 = (650/2-60) * cos(radians(angle-20));
            var y2 = (650/2-60) * sin(radians(angle-20));
            circle(x2, y2, minuteN-minuteN/(2/3));
            var x3 = (650/2-90) * cos(radians(angle-70));
            var y3 = (650/2-90) * sin(radians(angle-70));
            circle(x3, y3, minuteN-minuteN/2);
            var x4 = (650/2-120) * cos(radians(angle-50));
            var y4 = (650/2-120) * sin(radians(angle-50));
            circle(x4, y4, minuteN-minuteN/1.5);
            pop();
        }

    }

    //legend showing the color that respond to each hour
    for (i=0; i<24; i=i+1) {
            Hcolor(i)
            noStroke();
            circle(width-20, 12+i*18.5, 12, 12);      
    }
    for (i=23; i>=0; i=i-1) {
            Hcolor(i)
            noStroke();
            circle(20, height-12-i*18.5, 12, 12);   
    }
}

//To present hours:
//Fill each different hour with a different color:
function Hcolor(h) {
    if (h == 0) {
        fill(6, 24, 51);
    } else if (h == 1) {
        fill(10, 33, 62);
    } else if (h == 2) {
        fill(19, 54, 103);
    } else if (h == 3) {
        fill(22, 59, 98);
    } else if (h == 4) {
        fill(24, 64, 106);
    } else if (h == 5) {
        fill(28, 69, 101);
    } else if (h == 6) {
        fill(36, 83, 118);
    } else if (h == 7) {
        fill(57, 125, 155);
    } else if (h == 8) {
        fill(116, 186, 191);
    } else if (h == 9) {
        fill(190, 223, 198);
    } else if (h == 10) {
        fill(218, 223, 148);
    } else if (h == 11) {
        fill(240, 212, 124);
    } else if (h == 12) {
        fill(245, 194, 121);
    } else if (h == 13) {
        fill(242, 182, 107);
    } else if (h == 14) {
        fill(240, 167, 103);
    } else if (h == 15) {
        fill(229, 147, 89);
    } else if (h == 16) {
        fill(226, 124, 124);
    } else if (h == 17) {
        fill(199, 109, 136);
    } else if (h == 18) {
        fill(124, 68, 130);
    } else if (h == 19) {
        fill(72, 41, 121);
    } else if (h == 20) {
        fill(44, 28, 107);
    } else if (h == 21) {
        fill(33, 39, 97);
    } else if (h == 22) {
        fill(16, 24, 75);
    } else if (h == 23) {
        fill(6, 14, 60);
    } 
}






Looking Outwards 06: Randomness

https://www.artnome.com/news/2018/8/8/why-love-generative-art

Lillian Schwartz

Pixillation, photographic film stills

1970

The works by Lillian Schwartz can be considered an excellent example of the computational art that applies “randomness”. Lilian is one of the first groups of artists that started to use “computers” to help them generate artwork.

Using computer bases, the works show great randomness but high consistency. Each segment of the diagrams is different to a certain degree, but the overall effects created by the various elements form a very balanced composition. The use of black and white also creates great contrasts to make the geometric shapes more prominent, which are amazing examples of the use of figures and ground.

If take a closer look, you will find that the four pictures are somewhat correlated with each other. The top left can be considered the first version because the shapes are simpler and the forms are more regular–mainly the laying of white squares and black rectangles. The bottom left and bottom right can be considered the second version–the shapes are merging to form more complicated forms, with the bottom left looking more flat and neat and the bottom right looking more three-dimensional because of the overlaying of squares. The top right can be considered the later version because it looks like the designer is trying to make the forms of the merging parts of the squares more irregular and curved.