poppy – [OLD FALL 2020] 15-104 • Introduction to Computing for Creative Practice https://courses.ideate.cmu.edu/15-104/f2020 Professor Tom Cortina • Fall 2020 • Introduction to Computing for Creative Practice Mon, 16 Nov 2020 03:37:26 +0000 en-US hourly 1 https://wordpress.org/?v=5.4.15 Project 11 – Generative Landscape https://courses.ideate.cmu.edu/15-104/f2020/2020/11/15/project-11-generative-landscape-4/ https://courses.ideate.cmu.edu/15-104/f2020/2020/11/15/project-11-generative-landscape-4/#respond Sun, 15 Nov 2020 15:05:08 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=63476

For this project, I wanted to create a bustling city environment. I created an iPhone in the middle with someone pressing the record button, imagining that they are in a driving car and want to take in the city.

sketch
/* 
 * Amy Lee 
 * amyl2
 * Section B 
 */ 

// Variables for people 
var px = [];
var py = [];
var pdx = [];
var pc = [];
var skin = []; 
var pWidth = []; 
var pHeight = []; 

// Variables for clouds 
var cx = [];
var cy = [];
var cdx = [];
var cWandH = []; 

var buildings = [];
var houses = []; 

function preload() {
    // loading image files 
    finger = loadImage("https://i.imgur.com/DPWPwwe.png"); 
    police = loadImage("https://i.imgur.com/9xYWNnM.png"); 
    taxi = loadImage("https://i.imgur.com/ywwvyoP.png")
} 

function setup() {
    createCanvas(480,480); 
    frameRate(20); 

    // Finger 
    fin = new Object(); 
    fin.image = finger; 
    fin.x = 200;
    fin.y = 460; 
    fin.dx = 1; 
    fin.dy = 1; 
    fin.width = 290; 
    fin.height = 200; 
    fin.move = fingerMove; 
    fin.draw = fingerDraw;

    pol = new Object(); 
    pol.image = police; 
    pol.x = 700; 
    pol.y = 255; 
    pol.dx = 15; 
    pol.width = 240; 
    pol.height = 240; 
    pol.move = polMove; 
    pol.draw = polDraw; 

    tax = new Object(); 
    tax.image = taxi; 
    tax.x = 900; 
    tax.y = 275; 
    tax.dx = 10; 
    tax.width = 230
    tax.height = 230 
    tax.move = taxiMove; 
    tax.draw = taxiDraw; 

    // People
    for (var i = 0; i < 10; i ++){
        px[i] = random(25, width - 25); 
        py[i] = 350; 
        pdx[i] = random(1,3); 
        pc[i] = color(random(255), random(255), random(255));
        skin[i] = color(random(55,200), 80, 90); 
        pWidth[i] = random(20,50); 
        pHeight[i] = random(30,80); 
    }

    // Clouds 
    for (var i = 0; i < 5; i ++){
        cx[i] = random(20,460); 
        cy[i] = random(30,90); 
        cdx[i] = 2; 
        // cloud width and height 
        cWandH[i] = random(20,30); 
    }

    // Building 
    for (var j = 0; j < 5; j ++){
        var bx = random(width); 
        buildings[j] = makeBuildings(bx); 
    }

    // House 
    for (var k = 0; k < 3; k ++){
        var hx = random(width); 
        houses[k] = makeHouses(hx); 
    }

    frameRate(10); 
} 

function draw() {
//  background(130,208,218); 
    background(200,241,208);

    sidewalk(); 
    road(); 

    // Draw clouds, make them move right, and reappear if they move off canvas 
    for (var i = 0; i < 5; i++){
       cloud(cx[i], cy[i], cdx[i], cWandH[i], cWandH[i]);
       cx[i] += cdx[i]; 

       if (cx[i] > width + 10){
           cx[i] = -40; 
       }
   }

    updateAndDisplayBuildings();
    removeBuildingsThatHaveSlippedOutOfView();
    addNewBuildingsWithSomeRandomProbability(); 

    updateAndDisplayHouses();
    removeHousesThatHaveSlippedOutOfView();
    addNewHousesWithSomeRandomProbability(); 

    // Make buildings reappear if they go off the right side of the canvas 
    // Reappear on the left side 
    for (var j = 0; j < buildings.length; j++){
        if (buildings[j].x > width + 20) {
           buildings[j].x = -60; 
       }
   }

    // Make houses reappear if they go off the right side of the canvas 
    // Reappear on the left side 
    for (var k = 0; k < houses.length; k ++){
        if (houses[k].x > width + 20) {
            houses[k].x = -100; 
        }
    }

    // Make people reappear if they go off the right side of the canvas 
    // Reappear on the left side     
    for (var i = 0; i < 10; i ++){
        people(px[i], py[i], pdx[i], pc[i],skin[i],pWidth[i], pHeight[i]); 
        px[i] += pdx[i]; 

        if(px[i] > width+50){
           px[i] = -50; 
        }
    }

    pol.draw(); 
    pol.move(); 

    tax.draw(); 
    tax.move();  

    drawiPhone();  
    fin.draw(); 
    fin.move(); 

    if (frameCount >= 60){
    record(); 
    }

}

 function people(px, py, pdx, pc,skin, pWidth, pHeight){
    fill(pc); 
    noStroke(); 
    // Shirt 
    ellipse(px, py, pWidth, pHeight); 
    // Head 
    fill(skin); 
    ellipse(px,py-25,20,20); 
 }


function fingerDraw(){
    image(finger, this.x, this.y, this.width, this.height); 
}

// Move finger to record button 
function fingerMove(){ 
    if (fin.x > 142 & this.y > 378){
    this.x -= this.dx; 
    this.y -= this.dy; 
    }
}

function polDraw(){
    image(police, this.x, this.y, this.width, this.height); 
}

function polMove(){
    this.x -= this.dx; 
    if (this.x <= -800){
        this.x = 500; 
    }
}

function taxiDraw(){
    image(taxi, this.x, this.y, this.width, this.height); 
}

function taxiMove(){
    this.x -= this.dx; 
    if (this.x <= -1000){
        this.x = 500; 
    }
}

//              BUILDINGS                   //
function updateAndDisplayBuildings(){
    // Update the building's positions, and display them.
    for (var j = 0; j < buildings.length; j++){
        buildings[j].move();
        buildings[j].display();
    }
}

function removeBuildingsThatHaveSlippedOutOfView(){
    var buildingsToKeep = [];
    for (var j = 0; j < buildings.length; j++){
        if (buildings[j].x + buildings[j].breadth > 0) {
            buildingsToKeep.push(buildings[j]);
        }
    }
    buildings = buildingsToKeep; // remember the surviving buildings
}

function addNewBuildingsWithSomeRandomProbability() {
    // With a very tiny probability, add a new building to the end.
    var newBuildingsLikelihood = .0006; 
    if (random(0,1) < newBuildingsLikelihood) {
        buildings.push(makeBuildings(width));
    }
}

// Make buildings move to right 
function buildingsMove() {
    this.x += this.speed;

}

function buildingsDisplay() {
    var floorHeight = 30;
    var bHeight = this.nFloors * floorHeight; 
    push();
    noStroke(); 
    fill(this.col); 
    translate(this.x, height - 40);
    // Drawing the actual buildings
    rect(0, -bHeight-110, this.breadth, bHeight);
//    fill(18, 126, 190);  
    // Windows 
    for (var i = 0; i < this.nFloors; i++) {
        fill(18, 126, 190);  
        rect(5, -130 - (i * floorHeight), this.breadth - 10, 10);
    }
    // Building antennae 
    stroke(18,126,190); 
    strokeWeight(2); 
    line(5,-bHeight-110,5,-bHeight-120); 
    line(10,-bHeight-110,10, -bHeight-130); 
    noStroke(); 
    pop();
}

function makeBuildings(birthLocationX) {
    var bldg = {x: birthLocationX,
                breadth: 60,
                speed: 4.0,
                col: color(121,204,221),
                nFloors: round(random(5,10)),
                move: buildingsMove,
                display: buildingsDisplay}
    return bldg;
}

//              HOUSES                   //
function updateAndDisplayHouses(){
    for (var k = 0; k < houses.length; k++){
        houses[k].move(); 
        houses[k].display(); 
    }
}

function makeHouses(birthLocationX){
    var houses = {x: birthLocationX,
                 breadth: 100,
                 speed: 4.0, 
                 col1: color(232,175,104),
                 col2: color(182,110,125),
                 nFloors: round(random(2,4)), 
                 move: housesMove, 
                 display: housesDisplay}
    return houses; 
}

function removeHousesThatHaveSlippedOutOfView() {
    var housesToKeep = []; 
    for (var k = 0; k < houses.length; k++){
        if (houses[k].x + houses[k].breadth > 0) {
            housesToKeep.push(houses[k]); 
        }
    }
    houses = housesToKeep; 
}


function addNewHousesWithSomeRandomProbability() {
    var newHousesLikelihood = .0001; 
    if (random(0,1) < newHousesLikelihood) {
        houses.push(makeHouses(width)); 
    }
}

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

function housesDisplay() {
    var floorHeight = 20; 
    var hHeight = this.nFloors * floorHeight; 
    push(); 
    noStroke(); 
    fill(this.col1); 
    translate(this.x, height-30); 
    rect(0, -hHeight - 110, this.breadth, hHeight); 
    fill(this.col2); 
    triangle(0, -hHeight - 110, this.breadth, -hHeight - 110, this.breadth/2, -hHeight - 140); 
    rect(30, -hHeight - 90, this.breadth - 60, hHeight - 20); 
    fill(252, 197, 132); 
    ellipse(50, -hHeight - 110 , 8, 8); 
    pop(); 
}

function cloud(cx, cy, cdx, cWandH, cWandH){
    push(); 
    stroke(255); 
    strokeWeight(20); 
    line(cx, cy, cx+30, cy); 
    pop(); 
    fill(255);
    ellipse(cx,cy,cWandH, cWandH); 
    ellipse(cx+10,cy-10,cWandH, cWandH); 
    ellipse(cx+20,cy,cWandH, cWandH); 
}

function drawiPhone(){
    fill(0); 
    // top rectangle
    rect(130,40,200,60); 
    // left side 
    rect(130,40,20,400); 
    // right side 
    rect(330,40,20,400); 
    // bottom rectangle 
    rect(130,380,200,60) 
    // home button 
    fill(255); 
    ellipse(236,416,31,31); 
    fill(33);
    ellipse(240,416,33,33);  
    // small rectangle at top 
    fill(58); 
    rect(215,65,50,10); 
    // glass shine 
    push(); 
    stroke(255); 
    strokeWeight(10); 
    line(160,140,200,110); 
    line(160,170,240,110); 
    line(240,360,310,305); 
    line(272,370,315,336); 
    pop(); 
} 

function sidewalk(){
    noStroke(); 
    fill(236,205,158); 
    rect(0,330,480,70); 
    fill(132,64,64); 
    rect(0,390,480,10); 
}

function road(){
    fill(180,145,126); 
    rect(0,400,480,80); 
}

// REC button on iPhone 
function record(){
    fill(255,0,0); 
    ellipse(270,124,13,13); 
    textSize(20);     
    text("REC", 280, 130); 
}

















]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/11/15/project-11-generative-landscape-4/feed/ 0
Looking Outwards – 11 https://courses.ideate.cmu.edu/15-104/f2020/2020/11/10/looking-outwards-11/ https://courses.ideate.cmu.edu/15-104/f2020/2020/11/10/looking-outwards-11/#respond Tue, 10 Nov 2020 23:15:47 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=63394 Continue reading "Looking Outwards – 11"]]>

Mouna Andras studied film, digital media, and storytelling. She met up with Melissa Mongiat in Montreal, where they decided to start working on projects together due to their complementary backgrounds. Together, they co-founded Daily Tous Les Joures, which aims to create collective experiences for public spaces. In other words, they use physical spaces to create something meaningful for the public people.

One project, in particular, is called Musical Swings. Musical Swings are swings that start playing musical pieces when people interact, even transforming when people swing in synochrony. Whle this was meant to be a one-off project, the artists ended up building the swings in a multitude of public areas. This is because they saw the people’s positive reactions and interactions with the project. I admire their project because it invites people to use their imagination again and feel enchanted when they interact with the piece. Being able to garner those reactions from people who consume their art is definitely not an easy feat.

]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/11/10/looking-outwards-11/feed/ 0
Project 10 – Sonic Story https://courses.ideate.cmu.edu/15-104/f2020/2020/11/09/project-10-sonic-story-19/ https://courses.ideate.cmu.edu/15-104/f2020/2020/11/09/project-10-sonic-story-19/#respond Mon, 09 Nov 2020 20:25:25 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=62979 Continue reading "Project 10 – Sonic Story"]]>
sketchDownload
/* 
 * Amy Lee 
 * amyl2
 * Section B 
 */ 

var count = 0; 
var grayvalue = 255; 

function preload() {
    // loading image files 
    sheep = loadImage("https://i.imgur.com/ASPgqzI.png"); 
    sheep2 = loadImage("https://i.imgur.com/E1rZIt0.png")
    rabbit = loadImage("https://i.imgur.com/R9besKF.png"); 
    turtle = loadImage("https://i.imgur.com/KzuH03l.png"); 
    turtlefam = loadImage("https://i.imgur.com/6Wo9cT4.png?1")
    musician = loadImage("https://i.imgur.com/NAApLxI.png"); 
    musicnotes = loadImage("https://i.imgur.com/Q1cKMk2.png");

    // loading sound files 
    gasp = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/gasp.wav"); 
    cheer = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/cheer.wav"); 
    guitar = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/guitar1.wav"); 
    countdown = loadSound("https://courses.ideate.cmu.edu/15-104/f2020/wp-content/uploads/2020/11/countdown.wav"); 
}

function soundSetup() { 
    // Setup for audio generation
    gasp.setVolume(.4); 
    cheer.setVolume(.6); 
    guitar.setVolume(.3); 
    countdown.setVolume(.5); 
}


function setup() {
    createCanvas(500, 600);
    frameRate(15); 
    useSound();

    // Set up text parameter
    textAlign(CENTER, CENTER); 

    // Creating character objects 
    rab = new Object(); 
    rab.image = rabbit; 
    rab.x = 60; 
    rab.y = 460; 
    rab.dy = 2; 
    rab.width = 200;
    rab.height = 150; 
    rab.draw = rabbitDraw; 

    turt = new Object(); 
    turt.image = turtle; 
    turt.x = 250; 
    turt.y = 450; 
    turt.dy = 1; 
    turt.width = 200;
    turt.height = 150; 
    turt.draw = turtleDraw; 

    turtfam = new Object(); 
    turtfam.image = turtlefam; 
    turtfam.x = 200; 
    turtfam.y = 700; 
    turtfam.dy = 2; 
    turtfam.width = 250;
    turtfam.height = 150; 
    turtfam.draw = turtlefamDraw; 

    muse = new Object(); 
    muse.image = musician; 
    muse.x = -100; 
    muse.y = 200; 
    muse.width = 330; 
    muse.height = 260; 
    muse.draw = musicianDraw; 

    // Normal sheep 
    she = new Object(); 
    she.image = sheep; 
    she.x = 360; 
    she.y = 150; 
    she.dx = 1; 
    she.width = 200; 
    she.height = 150; 
    she.draw = sheepDraw; 

    // Shocked sheep 
    she2 = new Object(); 
    she2.image = sheep2; 
    she2.x = 360; 
    she2.y = 150; 
    she2.width = 200; 
    she2.height = 150; 
    she2.draw = sheep2Draw; 

    notes = new Object(); 
    notes.image = musicnotes; 
    notes.x = 80; 
    notes.y = 170; 
    notes.width = 40; 
    notes.height = 30; 
    notes.draw = musicnotesDraw; 

}

function draw() {

    background(125,45,45);

    // Random speckles on race track 
    push(); 
    for (var i = 0; i < 100; i ++){
    fill(0); 
    ellipse(random(0,600),random(0,600),1.5,1.5); 
    }
    pop(); 

    // Starting Line and Dividers
    fill(255); 
    noStroke(); 
    rect(248,0,4,600); 
    rect(80,0,4,600); 
    rect(420,0,4,600); 
    rect(0,470,500,4); 

    // Checkered Finish Line 
    for(var y = 20; y <= 40; y += 20){ 
        for (var x = 0; x <= 500; x += 20){
            fill(grayvalue); 
            rect(x, y, 20, 20);
            grayvalue = 255 - grayvalue; 
        } 
        grayvalue = 255 - grayvalue; 
    }

    // Write "FINISH" near finish line
    textSize(50); 
    fill(0); 
    text("F  I  N  I  S  H", 250, 100); 
    fill(255); 
    text("1",100,500); 
    text("2",280,500);

    print(frameCount); 

    rab.draw(); 
    turt.draw(); 
    muse.draw(); 

    // Storyline 
    // Calling sounds at specific counts here: 
    if (count == 0){ 
        countdown.play(); 
    }

    if (count == 75){ 
        guitar.play(); 
    }

    if (count == 120){
        gasp.play(); 
    }

    if (count == 450){
        cheer.play(); 
    }

    if (count >= 0){
        she.draw(); 
        muse.draw(); 
    }

    // Make music notes move 
    if (count > 70 & count <= 660){
        notes.draw(); 
        notes.x += random(-2,2); 
        notes.y += random(-2,2); 
        if (notes.x <= 78 || notes.x >= 82){
            notes.x = 80; 
        }
        if (notes.y <= 168 || notes.y >= 172){
            notes.y = 170; 
        }        
    }

    // Moving images at specific counts 
    // Turtle and rabbit begin racing 
    if (count > 50 & count <= 60){
        turt.y -= turt.dy; 
        rab.y -= rab.dy; 
        she.draw(); 
        muse.draw(); 
    }

    // Musician starts playing, rabbit gets distracted and stops 
    // Turtle keeps going 
    if (count > 60 & count <= 80){
        rab.y -= rab.dy; 
        turt.y -= turt.dy; 
        she.draw(); 
    }

    // turtle keeps going 
    // rabbit still distracted
    if (count > 80 & count <= 110){
        turt.y -= turt.dy; 
        rab.y -= rab.dy; 
        if (rab.y = 300){
            textSize(13); 
            text("i love music",200,280); 
            rab.y = 300; 
        }
        she.draw(); 
    }

    // Sheep shows up, gasps at surprise 
    // Turtle wins 
    if (count > 110 & count<= 120){
        turt.y -= turt.dy;  
        she.draw(); 
    }

    if (count > 120){
        textSize(13); 
        text("*shocked*",465,170); 
        turt.y -= turt.dy        
        if (turt.y <= 10){
            turt.y = 10; 
            turtfam.draw();
            turtfam.y -= turtfam.dy; 
            if (turtfam.y <= 100){
                turtfam.y = 100; 
            }
        }
        she2.draw(); 
    }

    // Confetti celebration for when turtle wins 
    if (count >= 450){
        confetti(); 
    }

    count ++; 
}


function turtleDraw(){
    image(turtle, this.x,this.y, this.width, this.height); 
}

function rabbitDraw(){
    image(rabbit,this.x,this.y, this.width, this.height); 
} 

function sheepDraw(){
    image(sheep, this.x, this.y, this.width, this.height); 
}

function sheep2Draw(){
    image(sheep2, this.x, this.y, this.width, this.height); 
}

function musicianDraw(){
    image(musician, this.x, this.y, this.width, this.height); 
}

function musicnotesDraw(){
    image(musicnotes, this.x,this.y,this.width, this.height); 
}

function turtlefamDraw(){
    image(turtlefam, this.x,this.y,this.width, this.height); 
}

function confetti(){
    var cy = 0; 
    var cDy = 3; 
    for( i = 0; i <= 300; i++){
        fill(random(255),random(255),random(255)); 
        ellipse(random(width),cy, 4,4); 
    cy += cDy; 
    }
}
































For my sonic story, I wanted to illustrate the class Tortoise and the Hare race. In this story, the rabbit is distracted by the music and stops racing, while the turtle takes it slow and continues to race. In the end, his win is celebrated by confetti and his family joining to congratulate him.

I also drew the characters separately in the “Sketchbook” app in order to get the transparent background for this project.

]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/11/09/project-10-sonic-story-19/feed/ 0
Looking Outwards – 10 – Computer Music https://courses.ideate.cmu.edu/15-104/f2020/2020/11/08/looking-outwards-10-computer-music-5/ https://courses.ideate.cmu.edu/15-104/f2020/2020/11/08/looking-outwards-10-computer-music-5/#respond Mon, 09 Nov 2020 04:10:54 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=62422 Continue reading "Looking Outwards – 10 – Computer Music"]]>

The Stanford Laptop Orchestra was founded in 2008 by Ge Wang. Using Chuck, the laptop orchestra was born. Chuck is a programming language for music, where the programmer can code frequencies to create different sequences and repitition of sequences, generating computer music.

The orchestra itself is an ensemble of laptops, humans, controllers, and special hemispherical speaker arrays. I really admire how the speakers were created from nonstandard ways of utilizing an everyday object. The speakers are actually bowls from Ikea turned upside down. Six holes are drilled in them. A base plate is made, and car speakers and amplifiers are put in them. The finished speakers are placed near the orchestra. They project the sound coming from the laptops, emulating real instruments where music comes from the artifact itself. The controllers were originally created for gaming purposes. Wang decided to use them for prototyping instruments because of its ability to track the position of players’ hands.

Wang’s artistic sensibilities manifested in the Laptop Orchestra because his passion for computer music transformed conventional Orchestras with technology. The computer’s precision allows for the creation of new sounds and automation to perform music.

]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/11/08/looking-outwards-10-computer-music-5/feed/ 0
Looking Outwards – 09 – On Looking Outwards https://courses.ideate.cmu.edu/15-104/f2020/2020/10/31/looking-outwards-09-on-looking-outwards-6/ https://courses.ideate.cmu.edu/15-104/f2020/2020/10/31/looking-outwards-09-on-looking-outwards-6/#respond Sun, 01 Nov 2020 03:37:37 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=61566 Continue reading "Looking Outwards – 09 – On Looking Outwards"]]>

Random Internationals Swarm Studies is incredible because it automatically draws people in. It allows people to interact with the piece through visuals, audio, and motion. I agree with Mango in that I also admire how the piece manifests unique forms with each interaction it has with each person. In a way, it encourages people to become an artist themselves and create their own personalized experiences.

Random Internationals – Swarm Study I (2010)

I also believe that Random Internationals wanted to imitate the acrobatic efficiency of birds in flight. It seems like mystery how entire flocks of birds are able to make quick, instant turns when they are flying forty miles per hour. Studies have shown that flocks are able to propogate easily because each bird watches for the moves of their nearest neighbor. Similarly, each light source in the piece changes their direction and motion in response to the noise near them, resulting in collective behavior.

In this way, I think that the creators’ artistic sensibilities are rooted in togetherness. The act of collective behavior of the lights, people, and their interactions, can lead to artistic experiences.

]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/10/31/looking-outwards-09-on-looking-outwards-6/feed/ 0
Project – 09 – Portrait https://courses.ideate.cmu.edu/15-104/f2020/2020/10/31/project-09-portrait-8/ https://courses.ideate.cmu.edu/15-104/f2020/2020/10/31/project-09-portrait-8/#respond Sun, 01 Nov 2020 03:37:10 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=61762 Continue reading "Project – 09 – Portrait"]]>

For this project, I used a picture that I took of my mom while we were at Epcot, Walt Disney World. We were in the Power of Color theater, which shone different hues of colors while we stood in the room. Because of that, I tried to add colors that shoot out towards the top of the canvas when the mouse is clicked.

sketch
/* 
 * Amy Lee 
 * amyl2
 * Section B 
 */ 

var myPicture; 
var x = 0; 
var y = 0; 
var star; 

function preload(){
	var picLink = "https://i.imgur.com/sTUlPXx.png"; 
	myPicture = loadImage(picLink); 
}

function setup() {
    createCanvas(335,409);
    background(200,226,206);
    myPicture.loadPixels(); 
    frameRate(500); 
    // setting up star parameters 
    star = {
    		sX: mouseX,
    		sY: mouseY, 
    		size: random(5,15)
    }
}

function draw() {
	// pick random x and y coordinates of picture
    var picX = random(width);
    var picY = random(height);

    // Pixel position to retrieve color from - constrain within canvas 
    var imX = constrain(floor(picX), 0, width);
    var imY = constrain(floor(picY), 0, height);

    // Get color of image at pixels
    var pixelColor = myPicture.get(imX,imY);
    fill(pixelColor); 
    mouse(picX,picY); 

    // Wavy red borders around picture 
 	for (var x = 0; x < width; x = x + 1){
 		stroke(167,37,42,.8); 
 		strokeWeight(22); 
 		point(x, 35-20*sin(radians(x))); 
    }

  	for (var x = 0; x < width; x = x + 1){
 		stroke(167,37,42,.8); 
 		strokeWeight(22); 
 		point(x, 376-20*sin(radians(x))); 
    }

  	for (var x = 0; x < width; x = x + 1){
 		stroke(167,37,42,.6); 
 		strokeWeight(22); 
 		point(x, 65-20*sin(radians(x))); 
    }

  	for (var x = 0; x < width; x = x + 1){
 		stroke(167,37,42,.6); 
 		strokeWeight(22); 
 		point(x, 346-20*sin(radians(x))); 
    }

    // Shooting star of random colors 
    fill(random(255),random(255),random(255)); 
	noStroke();  
    ellipse(star.sX,star.sY,star.size,star.size);
    // make the star move to the left 
    star.sX = star.sX - 1; 
    // make the star move upwards
    star.sY = star.sY - 1; 
    // make the star smaller 
    star.size = star.size - 0.2;
}

// Creating Mickey Mouse head shape 
function mouse(x,y){
	noStroke(); 
	ellipse(x,y,20,20);  
	ellipse(x-10,y-10,15,15); 
	ellipse(x+10,y-10,15,15);  
}

// when mouse is pressed, a new star is formed at the mouse (x,y) position
function mousePressed(){
	star = {
		sX: mouseX,
		sY: mouseY, 
		size: random(5,15)
	}
}









]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/10/31/project-09-portrait-8/feed/ 0
Looking Outwards – 08 – Creative Practice https://courses.ideate.cmu.edu/15-104/f2020/2020/10/25/looking-outwards-08-creative-practice/ https://courses.ideate.cmu.edu/15-104/f2020/2020/10/25/looking-outwards-08-creative-practice/#respond Sun, 25 Oct 2020 05:29:28 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=61415 Continue reading "Looking Outwards – 08 – Creative Practice"]]>

Daniel Shiffman was born in Baltimore, Maryland. He studied Mathematics and Philosophy at Yale University. Currently, he works an an Associate Arts Professor at NYU’s Tisch School of the Art. He is also a director of The Processing Foundation, whose mission is to make software literacy in visual arts accessible to people from diverse backgrounds and interests. He has published his own books on processing as well as uploaded many programming-related videos on his YouTube channel.

I find it incredibly admirable that he takes his passion in programming and works to share it with others around the world, whether it be through teaching, writing, or creating videos. I admire his project called The Unicorn Race, not only because it was coded live on stage at Eyeo 2019, but because it is interactive. The game recognizes custom objects and sounds, gets the audience involved, and even broadcasts images to the world after the game is over.

Daniel Shiffman – Eyeo 2019 – The Unicorn Race Project

Shiffman is knowledgeable in his field, yet he simultaneously presents himself in a very personable, humble way. He interacts with his audience while he presents and tries to make them laugh as well. This makes his work easier to follow along because he shares his thought process out loud, keeping his audience focused. This made me reflect on how I could present my own work more effectively by engaging my audience and articulating my thought process.

]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/10/25/looking-outwards-08-creative-practice/feed/ 0
Looking Outwards – 07 https://courses.ideate.cmu.edu/15-104/f2020/2020/10/17/looking-outwards-07-2/ https://courses.ideate.cmu.edu/15-104/f2020/2020/10/17/looking-outwards-07-2/#respond Sat, 17 Oct 2020 23:11:01 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=60438 Continue reading "Looking Outwards – 07"]]>

Ben Fry’s piece called All Streets was created on April 24, 2008. It is compilation of 240 million segments of road compressed into the shape of the United States continent. Ben was joined by three teammates – Katy assembled high-resolution images for offset printing, James made sure that the prints’ densities were appropriate for the piece, and Chris helped write software. This software created tiles that could be combined into a high-quality, HD image.

All Streets by Ben Fry (April 24, 2008)

I admire this aspect of the project because compiling such an enormous amount of images into one is a feat, considering that most software has a hard time dealing with images more than 30,000 pixels wide. The software program that he developed is called Processing, an open source programming environment that allows for computational design and interactive media. His artistic sensibility in processing and visualizing data is clearly manifested in the final form of this piece. His interactions with informational data is transformed into piece that takes millions of individual road segments into one unified artwork.

A closer look at All Streets – roadless terrain creates the topography of the Appalachian Mountains
]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/10/17/looking-outwards-07-2/feed/ 0
Project – 07 – Curves https://courses.ideate.cmu.edu/15-104/f2020/2020/10/17/project-07-curves-7/ https://courses.ideate.cmu.edu/15-104/f2020/2020/10/17/project-07-curves-7/#respond Sat, 17 Oct 2020 21:57:02 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=60708 Continue reading "Project – 07 – Curves"]]>
sketch
/* 
 * Amy Lee 
 * amyl2
 * Section B 
 */ 

// Array variables for star X and Y positioning 
var starX = []; 
var starY = []; 
var r = 5; 
var r2 = 10; 
var nPoints = 5; 
var nPoints2 = 10; 
var separation = 120; 

function setup() {
    createCanvas(480,480);
    // Random placement of stars
    for (i = 0; i < 60; i++){
    	starX[i] = random(10,470); 
    	starY[i] = random(10,470); 
    }
    frameRate(7); 
}

function draw() {
	background(10); 

	// Time variable for stars 
	var s = second(); 

	// Setting randomGaussian ellipses in the background 
    push(); 
    translate(width/2,height/2); 
    for (var i = 0; i < 1000; i++){
    	fill(255); 
    	ellipse(randomGaussian(0,120),randomGaussian(0,120),2.2,2.2);
    }
    pop(); 

    // New star every second
    for( i = 0; i < s; i++){
    	fill(255); 
    	ellipse(starX[i],starY[i],4,4); 
    }

	// Calling on Hypotrochoid Function
    push(); 
    noStroke(); 
    translate(width/2,height/2); 
    drawHypotrochoid(); 
    pop();

    // Calling on Ranuculus Function
	drawRanuculus();

	// Drawing hidden alien, only appears when mouse distance from center is < 50
	push(); 
	for(var y = 200; y < 280; y += 5){
		for (var x = 200; x < 280; x += 5){
			noStroke(); 
			fill(173,212,173); 
			if(nearMouse(x,y) == true){
				// Face
				ellipse(241,240,70,70); 
				// Eye 
				fill(255); 
				ellipse(241,240,40,40); 
				// To make eye follow mouseX when mouseX is near 				
				fill(173,212,173); // green iris
				if (mouseX < 256 & mouseX > 230){ 
					ellipse(mouseX,240,25,25);
				} else {
					ellipse(241,240,25,25); 
				}
				// Pupil 				
				fill(0) 
				if (mouseX < 256 & mouseX > 230){ 
					ellipse(mouseX,240,20,20);
				} else {
					ellipse(241,240,20,20); 
				}				
				fill(255); 
				ellipse(248,230,10,10); 
			}
		}
	}
	pop(); 
} 


function drawHypotrochoid() {
	// Setting Hypotrocoid Variables
	for (var t = 0; t < 360; t++){
  		var h = map(mouseY, 0, height/4, height/2, height/4);
    	var a = 150;
    	var b = map(mouseY,0,height/2,1,2);

	var x = (((a-b)*cos(radians(t))) + h*cos(((a-b)/b)*radians(t))); 
	var y = (((a-b)*sin(radians(t))) - h*sin(((a-b)/b)*radians(t)));

	// Draw pentagons 
    beginShape();
    for (var i = 0; i < nPoints; i++) {
    	noStroke(); 
    	// Pentagons change color as mouseY changes 
		if (mouseY <= 80){
			fill(255,142,157); //Red 
		} else if (mouseY > 80 & mouseY <= 160){
			fill(255,210,142); // Orange 	
		} else if (mouseY > 160 & mouseY <= 240){
			fill(255,252,142); // Yellow 	
		} else if (mouseY > 240 & mouseY <= 320){
			fill(192,255,142); // Green 
		} else if (mouseY > 320 & mouseY <= 400){
			fill(142,188,255); // Blue 	
		} else if (mouseY > 400 & mouseY <= 480){
			fill(157,142,255); // Purple	
		} else {
			fill(random(255),random(255),random(255)); 
		}	
		// Setting variables for pentagons
        var theta = map(i, 0, nPoints, 0, TWO_PI);
        var px = r * cos(theta);
        var py = r * sin(theta);
        // Draw pentagon shape with random jitter 
        vertex(x+px + random(-1, 1), y+py + random(-1, 1));
   	}
    endShape(CLOSE);
	}
}

function drawRanuculus() {
	push(); 
	translate(2 * separation, height/2);
	// Setting stroke colors according to how mouseY changes 
		if (mouseY <= 80){
			stroke(255,142,157); //Red 
		} else if (mouseY > 80 & mouseY <= 160){
			stroke(255,210,142); // Orange 	
		} else if (mouseY > 160 & mouseY <= 240){
			stroke(255,252,142); // Yellow 	
		} else if (mouseY > 240 & mouseY <= 320){
			stroke(192,255,142); // Green 
		} else if (mouseY > 320 & mouseY <= 400){
			stroke(142,188,255); // Blue 	
		} else if (mouseY > 400 & mouseY <= 480){
			stroke(157,142,255); // Purple	
		} else {
			stroke(random(255),random(255),random(255)); 
		}	
	strokeWeight(3); 
	fill(10); 
	beginShape();
    for (var i = 0; i < nPoints2; i += 0.1){
      var px2 = r2 * (6 * cos(i) - cos(6 * i));
      var py2 = r2 * (6 * sin(i) - sin(6 * i));
      vertex(px2, py2);
    }
    endShape();
    pop()
}

function nearMouse(x,y){
	if(dist(x,y,mouseX,mouseY) < 50){
		return true;
	} else {
		return false; 
	}
}


	

 





For this project, I played around with the Hypotrochoid and Ranuculus curves to create these designs. I wanted to give this an outer space feel, so I also added a Gaussian distribution of ellipses to resemble stars in the background. When the distance of the mouse is close to the center, an alien eye is revealed. The colors of the curves according to the mouseY position and an additional larger star is added every second. It definitely has a chaotic look to it but I thought that it fit the theme since space is far from organized.

]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/10/17/project-07-curves-7/feed/ 0
Project – 06 – Abstract Clock https://courses.ideate.cmu.edu/15-104/f2020/2020/10/10/project-06-abstract-clock-8/ https://courses.ideate.cmu.edu/15-104/f2020/2020/10/10/project-06-abstract-clock-8/#respond Sun, 11 Oct 2020 00:24:40 +0000 https://courses.ideate.cmu.edu/15-104/f2020/?p=59887 Continue reading "Project – 06 – Abstract Clock"]]>
sketchDownload
/* 
 * Amy Lee 
 * amyl2
 * Section B 
 */ 

 var x = []; 
 var y = []; 

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

    // For the random placement of the stars
    for (i = 0; i < 60; i++){
    	x[i] = random(10,390); 
    	y[i] = random(10,200); 
    }

}

function draw() {
    noStroke(); 

    var h = hour(); 
    var m = minute(); 
    var s = second();

    // Background color gets darker as seconds pass by 
	background (83 - (2*s), 143 - (2*s), 213 - (2*s));

    // Drawing static hills
    fill(122,172,136); 
    ellipse(80,435,300,440);    
    fill(122,172,136); 
    ellipse(width-80,435,300,440);  
    fill(161,206,148); 
    ellipse(200,440,500,400);

    // New star appearing every minute 
    for(i = 0; i < m; i ++){
    	fill(252,255,149); 
    	ellipse(x[i],y[i],7,7); 
    }

    // Moon increasing size every second  
    var s1 = map(s, 0, 60, 0,200); 

    // Drawing Moon 
 	stroke(242, 242, 242,40);
  	strokeWeight(10);
  	fill(220,220,220,50);
  	ellipse(50, 50, s1, s1);

    // Drawing Sheep 
	noStroke(); 
    // Legs
    fill(92); 
    ellipse(175,315,15,50);
    ellipse(225,315,15,50); 
    // Body 
    fill(255);
    ellipse(200,310,50,50); 
    ellipse(170,280,50,50); 
    ellipse(200,270,50,50); 
    ellipse(230,280,50,50); 
    ellipse(170,300,50,50); 
    ellipse(230,300,50,50); 
    // Fur texture 
    fill(152); 
    ellipse(220,290,15,15); 
    fill(255); 
    ellipse(222,290,15,15); 

    fill(152); 
    ellipse(190,305,15,15); 
    fill(255); 
    ellipse(188,305,15,15); 

    fill(152); 
    ellipse(193,315,8,8); 
    fill(255); 
    ellipse(191,315,8,8); 

    fill(152); 
    ellipse(170,282,15,15); 
    fill(255); 
    ellipse(172,282,15,15);   

   	// Face 
    fill(92);  
    ellipse(240,270,40,40);

    // Making the eye close or open every hour  
    var eyeDiam = 20; 
    if ((h%2)>0){
    	eyeDiam = 20; //closed 
    }else if((h%2)==0){
    	eyeDiam = 0.1; //opened 
    }
    // Ear 
    ellipse(220,275,20,10);
    // Eye 
    fill(0); 
    ellipse(240,270,15,15); 
    fill(92);
    ellipse(235,265,eyeDiam,eyeDiam); 

    // Tail 
    fill(255); 
    ellipse(140,290,20,10); 

    // Fence 
    fill(175,140,117);
    rect(0,350,15,height); 
    rect(385,350,15,height); 
    rect(0,360,width,10); 
    rect(0,380,width,10); 

  }




























For this project, I thought of how I used to try counting sheep to fall asleep when I was younger. Unfortunately, it usually didn’t work too well. As a result, I was inspired to create an abstract clock that depicts a sheep trying to sleep but waking up every hour. The moon expands and the night sky gets darker every second. A new star also appears every minute.

]]>
https://courses.ideate.cmu.edu/15-104/f2020/2020/10/10/project-06-abstract-clock-8/feed/ 0