Technopat – [OLD SEMESTER] 15-104 • Introduction to Computing for Creative Practice https://courses.ideate.cmu.edu/15-104/f2021 Professor Tom Cortina • Fall 2021 • Introduction to Computing for Creative Practice Mon, 06 Dec 2021 04:44:37 +0000 en-US hourly 1 https://wordpress.org/?v=5.8.9 Final Project https://courses.ideate.cmu.edu/15-104/f2021/2021/12/05/final-project-21/ https://courses.ideate.cmu.edu/15-104/f2021/2021/12/05/final-project-21/#respond Mon, 06 Dec 2021 04:44:37 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=69515 Continue reading "Final Project"]]>
wpf-final.js
//Patrick Fisher, section B, wpf assignment - 13

var bear; //object for the bear
var icebergs = []; //array of objects of icebergs
var middleIce; //variable the stores the position of the platform that is under the bear
var clouds = []; //array of objects of clouds
var score = 0; //score counter based on frame count and the amount of platforms passed

function setup() {
    createCanvas(480,480);
    background(113,147,231);
    bear = makeBear();
    var ib = newBerg(-60,0,120) //creates the starting platform which is the same everytime
    icebergs.push(ib);

    for(var i = 1; i <= 5; i++){ //creates new, random platofrms,
        icebergs.push(newBerg(-60 + (i * 250),floor(random(-20,0)),random(90,150)))
    }

    for(var i = 0; i <= 7; i++){ //aesthetic clouds at the top
        clouds.push(makeCloud(-60 + (i * 250)));
    }
    middleIce = {end: 60, y: 0}; //starting info for the platform that will have colision
}

function draw() {
    background(113,147,231); //sky
    fill(63,181,207);
    rect(0,300,width,height); //ocean

    fill(255,246,2); //sun
    circle(100,75, 50);
    
    push();
    fill(0);
    translate(width/2-75, 300);
    for(var i = 0; i <= 5; i ++){ //for loop to draw the icebergs
        if(icebergs[i].x <= 30 & icebergs[i].end >= -30){ //checks to see if theres a platform under the bear and if so stores it as middle ice
            middleIce.y = floor(icebergs[i].y);
            middleIce.end = floor(icebergs[i].end);
        }

        icebergs[i].draw();
    

        if(icebergs[i].x <= -600){ //deletes a iceberg from the array when it gets too far off screen and makes a new one
            icebergs.shift();
            icebergs.push(newBerg(900,random(-20,0),random(90,150)));

        }

    }
    if(middleIce.end <= -25){ //gets rid of middle ice after its gone past the bear
        middleIce.y = 200;
        score ++;

    }

    for(var i = 0; i <= 7; i++){ //draws clouds
        clouds[i].draw();
    }

    if(clouds.x <= -600){ //deletes a cloud from the array when it gets too far off screen and makes a new one
            clouds.shift();
            clouds.push(makeCloud(600));

        }

    if (bear.y >= 200) { //checks to see if the bear has fallen and if so starts the game over sequence
        bear.isAlive = false;
    }

    if(frameCount < 240){ //4 seconds of the text
        text("Press Space to Jump", 10, 30);
    }

    bear.draw(); 
    pop();

    if(bear.isAlive == false){ //game over sequencse
        background(0);
        fill(63,181,207);
        stroke(255);
        textSize(50);
        textAlign(CENTER);
        text("GAME OVER", width/2, height/2);
        textSize(40);
        text("SCORE: " + score.toString(), width/ 2, height/2 + 75);
        noLoop();
    }
}

function newBerg(bx,by,bw) { //constructor funtion to create icebergs
    var b = {x: bx, y: by, w: bw, end: bx+bw, half: bx + (bw / 2), draw: drawIce, speed: iceSpeed};
    return b;
}

function makeBear() { //constructor to make the bear
    var b = {x: 0, y: 0, dy: 0, isAlive: true, vestOn: false, draw: drawBear}
    return b;
}

function drawBear(){
    push();
    
    this.y += this.dy; //moves the bear down
    if(this.y >= middleIce.y - 3 & this.y <= middleIce.y){ //checks if the bear is over a platform
        this.dy = 0;
    }
    else{ 
        this.dy ++;
    }

    fill(214,207,193); //draws the bear
    legAni(this.x,this.y);
    ellipse(this.x,this.y-17,50,30);
    legAni(this.x + 2,this.y);
    ellipse(this.x+20,this.y-38,5,10);
    ellipse(this.x+30,this.y-38,5,10);
    circle(this.x+25,this.y-30,20);

    
    fill(0);
    circle(this.x+30,this.y-32,5);

    pop();
}

function drawIce() { //draws the ice
    push();
    fill(95,145,150);
    triangle(this.x,this.y,this.end,this.y,this.half, this.y + 160);
    fill(228,224,221);
    triangle(this.x,this.y,this.end,this.y,this.half, this.y - 90);
    push();
    strokeWeight(5);
    line(this.x,this.y,this.end,this.y);
    pop();
    pop();

    this.speed();

}

function keyPressed() { // press spacebar to jump
    if(keyCode ==  32){
        bear.dy = -10;
    }
}

function iceSpeed() { //function that moves and continually speeds up the icebergs every 30 seconds
    var o = floor(frameCount / (30*60));

    this.x -= o+1;
    this.end -= o+1;
    this.half -= o+1;
}

function makeCloud(cx){ //constructor for the clouds
    var c = {x: cx, y: (-350,-250), draw: drawCloud}
    return c;
}

function drawCloud(){ //function to draw the clouds
    push();
    fill(255);  //series of ellipses that draws the cloud
    ellipse(this.x,this.y,60,50);
    ellipse(this.x+30,this.y-10,60,50);
    ellipse(this.x+80,this.y,60,50);
    ellipse(this.x+20,this.y+20,60,50);
    ellipse(this.x+60,this.y+15,60,50);
    push();
    noStroke();
    ellipse(this.x+40,this.y+10,100,55)
    pop();
    pop();

    if(frameCount % 2 == 0){
        this.x --;
    }
}

function legAni(x,y){ //simple leg moving animation
    
    if(frameCount % 4 == 0){
        ellipse(x-18,y-8,10,20);
        ellipse(x+22,y-8,10,20);
    }

    if(frameCount % 4 == 1){
        ellipse(x-18,y-8,10,20);
        ellipse(x+21,y-8,10,20);
    }

    if(frameCount % 4 == 2){
        ellipse(x-17,y-8,10,20);
        ellipse(x+20,y-8,10,20);
    }

    if(frameCount % 4 == 3){
        ellipse(x-15,y-8,10,20);
        ellipse(x+19,y-8,10,20);
    }
}


For my project what inspired me was the polar ice caps melting and seeing pictures of polar bears literally having to jump across water to get to safety. So I decided to create a platform game that was that. It’s pretty simple, just press space to repeatedly jump and land on the next iceberg. The collision detection for the icebergs is very hit or miss, unfortunately. If I had more time I would want to figure out what is going wrong with it as when debugging I could see that the values for the bear and the iceberg I was comparing were equal and yet the bear did not stop falling. Additionally, I had more time I would add a sort of extra life feature, described in my design documents as a life preserver, make the icebergs sink once landed on, and make the bear fully controllable rather than the game being an auto scroller.

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/12/05/final-project-21/feed/ 0
Project 11: Generative Landscape https://courses.ideate.cmu.edu/15-104/f2021/2021/11/13/project-11-generative-landscape-2/ https://courses.ideate.cmu.edu/15-104/f2021/2021/11/13/project-11-generative-landscape-2/#respond Sun, 14 Nov 2021 02:34:35 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=69010 Continue reading "Project 11: Generative Landscape"]]>
wpf-landscape.js
//Patrick Fisher, Section B, wpf@andrew.cmu.edu Assignment -11-project
var trackLines = []; //array for converyer belt
var robots = []; //array for the robots

function setup() {
    createCanvas(480,300);
    background(219.219,211);
    for(var i = 0; i <= 9; i++){
        trackLines[i] = i*48; //fills the track array
    }

    for(var i = 0; i <= 5; i++){
        robots[i] = makeRobot(i); //fills the robot array
        robots[i].centerX = -50 + (i*-200);
    }
}

function draw(){
    push();
    stroke(0);
    strokeWeight(4);
    fill(54,54,66);
    rect(0,50,width,200);
    fill(28,150,195);
    rect(0,25,width,25);
    rect(0,250,width,25);
    stroke(0);
    strokeWeight(3); //draws the lines and moves them forward
    for(var i = 0; i <= 9; i++){
        line(trackLines[i],50,trackLines[i],250);
        trackLines[i] += 1;

        if(trackLines[i] >= width){ //sends a line back to the start when it gets to big
            trackLines[i] = 0;
        }
    }
    pop();

    for(var i = 0; i <= 5; i++){
        robots[i].draw(); //draws the robots
        

        robots[i].centerX ++; //sends the robots forward
        
        if(robots[i].centerX >= 800){ //deletes a robot from the array when it gets too far off screen and makes a new one
            robots.shift();
            robots.push(makeRobot(0));
            robots[5].centerX = -400
        }
    }
}

function makeRobot(i) {
    var rob = {centerX: 0, //funciton for making the robot
               head: floor(random(0,3)),
               eyes: floor(random(0,4)),
               glowColor: clrSelect(floor(random(0,6))), //sends a random number to the color select function to set the color variable
               mouth: floor(random(0,3)), //5
               chest: floor(random(0,2)),
               chestPiece: floor(random(0,3)), //8
               arms: floor(random(0,3)), //4
               legs: floor(random(0,3)), //3
               draw: drawRobot,
               drawHead: drawRobotHead,
               drawBody: drawRobotBody,
               drawEye: robotEyes,
               drawMouth: robotMouth,
               drawPiece: robotChestPiece,
               drawArms: robotArms,
               drawLegs: robotLegs,
           }
    return rob;

}

function drawRobot(){// draws the robot in fragments
    this.drawHead();
    this.drawBody();

}

function drawRobotHead(){
    fill(101,108,127);
    if(this.head == 0){
        circle(this.centerX,90,60);
    }
    if(this.head == 1){
        push();
        rectMode(CENTER);
        rect(this.centerX,90,60,60);
        pop();
    }
    if(this.head == 2){
        triangle(this.centerX,120,this.centerX-50,70,this.centerX+50,70);
    }

    this.drawEye();

    this.drawMouth();
    

}

function drawRobotBody(){
    fill(101,108,127);
    if(this.chest == 0){
        rect(this.centerX-25,120,50,75);
    }
    if(this.chest == 1){
        ellipse(this.centerX, 157.5,50,75);
    }
    
    this.drawPiece();

    this.drawArms();

    this.drawLegs();


}

function robotEyes() {
    push();
    fill(this.glowColor);
    if(this.eyes == 0){
        circle(this.centerX + 15,85,20);
        circle(this.centerX - 15,85,20);
    }

    if(this.eyes == 1){
        push();
        rectMode(CENTER);
        rect(this.centerX + 15, 85, 15, 15);
        rect(this.centerX - 15, 85, 15, 15);
        pop();

    }
    if(this.eyes == 2){
        push();
        stroke(this.glowColor);
        strokeWeight(3);
        line(this.centerX + 20, 80 , this.centerX + 5, 80);
        line(this.centerX - 20, 80 , this.centerX - 5, 80);
        pop()
    }

    if(this.eyes == 3){
        push();
        stroke(this.glowColor);
        strokeWeight(3);
        line(this.centerX + 15, 90 , this.centerX + 15, 75);
        line(this.centerX - 15, 90 , this.centerX - 15, 75);
        pop()
    }
    pop();
}

function robotMouth() {
    if(this.mouth == 0){
        push();
        stroke(this.glowColor);
        strokeWeight(4);
        noFill();
        arc(this.centerX, 100, 20, 20, 0, PI);
        pop();
    }

    if(this.mouth == 1){
        push();
        stroke(this.glowColor);
        strokeWeight(4);
        line(this.centerX + 10, 105, this.centerX -10, 105);
        pop();
    }
    if(this.mouth == 2){
        push();
        fill(this.glowColor);
        rect(this.centerX - 10, 101, 20, 8);
        line(this.centerX -10, 105, this.centerX + 10, 105);
        pop();

    }

}

function robotChestPiece() {
    if(this.chestPiece == 0){
        push();
        fill(this.glowColor);
        circle(this.centerX, 147,20);
        pop();
    }
    if(this.chestPiece == 1){
        push();
        fill(this.glowColor);
        rectMode(CENTER);
        rect(this.centerX, 147,20,20);
        pop();
    }
    if(this.chestPiece == 2){
        push();
        fill(this.glowColor);
        translate(this.centerX,147);
        rotate(radians(45));
        rectMode(CENTER);
        rect(0,0,20,20);
        pop();
    }

}

function robotArms(){
    if(this.arms == 0){
        push();
        stroke(0);
        strokeWeight(2);
        line(this.centerX + 25, 147, this.centerX + 50, 147);
        line(this.centerX - 25, 147, this.centerX - 50, 147);
        pop();
        circle(this.centerX - 55, 147, 10);
        circle(this.centerX + 55, 147, 10);

    }
    if(this.arms == 1){
        ellipse(this.centerX+37.5,147,25,10);
        ellipse(this.centerX-37.5,147,25,10);
    }
    if(this.arms == 2){
        push();
        rectMode(CENTER);
        square(this.centerX+35,147,20);
        square(this.centerX-35,147,20);
        pop();

    }
}

function robotLegs(){
    if(this.legs == 0){
        push()
        stroke(0);
        strokeWeight(2);
        line(this.centerX + 20, 195, this.centerX + 20, 225);
        line(this.centerX - 20, 195, this.centerX - 20, 225);
        pop();
        circle(this.centerX + 20, 230, 10);
        circle(this.centerX - 20, 230, 10);

    }
    if(this.legs == 1){
        ellipse(this.centerX - 15, 215, 10,40);
        ellipse(this.centerX + 15, 215, 10,40);
    }
    if(this.legs == 2){
        triangle(this.centerX-15, 197.5, this.centerX - 10, 235, this.centerX - 20, 235);
        triangle(this.centerX+15, 197.5, this.centerX +10, 235, this.centerX + 20, 235);
    }
}

function clrSelect(i){
    if(i == 0){
        var c = color(128,196,99); //green
    }
    if(i == 1){
        var c = color(182,20,29); //red
    }
    if(i == 2){
        var c = color(10,201,239); //blue
    }
    if(i == 3){
        var c = color(217,16,207); //purple
    }
    if(i == 4){
        var c = color(248,241,25); //yellow
    }
    if(i == 5){
        var c = color(244,239,221); //off white
    }

    return c;

}

For my project, I did a robot factory line, with all the different parts of the robots changing. I started with getting the conveyor belt to look correct. Then I worked on making one look for the robot and getting it to loop continuously. Afterward, I started to separate the body parts into distinct functions and then implements the if statements to draw different types of body parts. I am very happy with how it worked out, I think the robots look kind of cute and I am happy with how seamless the loop is. I also think I have a good amount of variety so the robots do not get immediately boing.

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/11/13/project-11-generative-landscape-2/feed/ 0
Looking Outwards-11 https://courses.ideate.cmu.edu/15-104/f2021/2021/11/13/looking-outwards-11-2/ https://courses.ideate.cmu.edu/15-104/f2021/2021/11/13/looking-outwards-11-2/#respond Sun, 14 Nov 2021 02:26:16 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=69007 Continue reading "Looking Outwards-11"]]>

The article I read discusses the digital divide. The digital divide is the phenomenon of poorer people and areas having less access to functional computers, smart phones, or internet, all devices that are becoming more and more needed in the modern education and work worlds. This has been especially relevant during the Covid-19 pandemic, considering how many people were working or attending school from home, those without internet or an internet capable device were severely impacted. This article discusses an exhibition at a museum in Barcelona. The exhibition focuses not only on the digital divide, but also how it can disproportionately affect women and ethnic minorities. As the world continues to become more reliant on digital access, the worse the affects of the digital divide will become.

https://www.reuters.com/article/us-health-coronavirus-tech/spanish-art-show-spotlights-hidden-digital-divide-in-pandemic-idUSKBN28S0IC

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/11/13/looking-outwards-11-2/feed/ 0
Project 10: Sonic Story https://courses.ideate.cmu.edu/15-104/f2021/2021/11/07/project-9-sonic-story/ https://courses.ideate.cmu.edu/15-104/f2021/2021/11/07/project-9-sonic-story/#respond Mon, 08 Nov 2021 03:55:30 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=68841 Continue reading "Project 10: Sonic Story"]]>
wpf-curves.js
//Patrick Fisher wpf@andrew.cmu.edu Assignment-10-project
var fireSound;
var earthSound;
var windSound;
var waterSound;
var rockxarray = []; //array for falling rocks
var rockyarray = [];
var dy = 12; //drop rate for rocks
var fireYPoints = []; //array for the points for drawing the fire 
var noiseParam = 0; //variable for noise function
var noiseStep = 0.05; //variable to change noiseParam
var windx = []; //wind sweep x array
var windy = []; //wind swee y array
var wind2x = [];
var wind2y = [];
var waterPoints = []; //array for the points for drawing the river
var oppoWaterPoints = [];
var framesC = 0; //frame count variable 

function preload() {
    fireSound = loadSound("https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/11/fireedit.wav");
    earthSound = loadSound("https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/11/earthedit.wav");
    windSound = loadSound("https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/11/windedit.wav");
    waterSound = loadSound("https://courses.ideate.cmu.edu/15-104/f2021/wp-content/uploads/2021/11/wateredit.wav");
}


function setup() {
    createCanvas(500, 300);
    for(var i = 0; i <= 19; i++){ //establish rocks
        rockxarray[i] = random(0,500);
        rockyarray[i] = random(0,20);
    }
    for(var i = 0; i <= 120; i++){ //establishes fire
        fireYPoints[i] = map(noise(noiseParam),0,1,100,300);
        noiseParam += noiseStep
    }
    for(var i = 0; i <= 120; i++){ //establsihes water
        waterPoints[i] = map(noise(noiseParam),0,1,0,height/2);
        oppoWaterPoints[i] = map(waterPoints[i],0,height/2,height,height/2)
        noiseParam += noiseStep
    }

    for(var i = 0; i <= 19; i++){ //establish wind 1 array
        windy[i] = map(noise(noiseParam),0,1,100,300);
        windx[i] = map(noise(noiseParam),0,1,100,500);
        noiseParam += noiseStep
    }

    for(var i = 0; i <= 19; i++){ //establishes wind 2 array
        wind2y[i] = map(noise(noiseParam),0,1,100,300);
        while(wind2y[i] == windy[i]){
            wind2y[i] = map(noise(noiseParam),0,1,100,300);
        }
        wind2x[i] = map(noise(noiseParam),0,1,100,500);
        while(wind2x[i] == windx[i]){
            wind2x[i] = map(noise(noiseParam),0,1,100,300);
        }

        noiseParam += noiseStep
    }

    createDiv("p5.dom.js library is loaded.");
    //======== call the following to use sound =========
    useSound();
    frameRate(4);

}


function soundSetup() { // setup for audio generation
    fireSound.setVolume(0.5);
    earthSound.setVolume(0.5);
    waterSound.setVolume(0.5);
    windSound.setVolume(0.5);
}


function draw() {
    background(40);
    if(framesC == 0){ //does the earth section
        earthSound.play();

    }
    if(framesC < 28){
        earthDraw();

    }

    if(framesC == 28){ //does the fire section
        fireSound.play();

    }
    if(framesC >= 28 & framesC < 56){
        fireDraw();
    }

    if(framesC == 56){ //does the wind section
        windSound.play();
    }
    
    if(framesC >= 56 & framesC < 84){ 
        windDraw();
    }

    

    if(framesC == 84){ //does the water section
        background(40);
        waterSound.play();
    }
    if(framesC >= 84 & framesC < 112){

        waterDraw();
    }

    if(framesC == 112){ //ends the program
        background(0);
        noLoop();
    }



    framesC ++;
} 

function waterDraw() { // draws the water
    
    push();
    noStroke();
    fill(158,196,226);
    waterPoints.shift(); //removes the last entry in the array to make room for the next one
    waterPoints.push(map(noise(noiseParam),0,1,0,height/2));
    oppoWaterPoints.shift();
    oppoWaterPoints.push(map(waterPoints[120],0,height/2,height,height/2))
    beginShape(); //begins drawing the mountain
    for(i = 0; i <= 120; i++){    //for loop that makes the peaks     
        vertex(i*5,waterPoints[i]);
        vertex(i*5,oppoWaterPoints[i]);
    }
    endShape(CLOSE);
    noiseParam += noiseStep;
    pop();

}

function fireDraw() { //draws the fire

    push();
    noStroke();
    fill(248,103,19);
    beginShape(); //begins drawing the fire
    vertex(0,height);
    for(i = 0; i <= 120; i++){    //for loop that makes the fire     
        vertex(i*5,fireYPoints[i]);
    }
    vertex(width,height);
    endShape(CLOSE);

    for(var i = 0; i <= 120; i++){ //for loop that initrially fills the array
        fireYPoints[i] = map(noise(noiseParam),0,1,100,300);
        noiseParam += noiseStep
    }
    pop();

}

function earthDraw() { //draws the rocks

    for(var i = 0; i <= 19; i++){
        fill(87,64,52);
        ellipse(rockxarray[i],rockyarray[i],random(5,10,random(5,10))); //draws the rocks, the randomness makes them "tumble"
        rockyarray[i] += dy; //moves the rocks down
    }   
}

function windDraw() { //draws the wind

    push();
    strokeWeight(5);
    stroke(190,239,143);

    for(var i = 0; i <= 9; i++) {
        line(windx[i],windy[i],windx[i+1],windy[i+1]); //draws the wind
    }
    windx.push(random(100,500)); //shifts the array and adds new points
    windy.push(random(100,300));
    windx.shift();
    windy.shift();

    for(var i = 0; i <= 9; i++) {
        line(wind2x[i],wind2y[i],wind2x[i+1],wind2y[i+1]);
    }
    wind2x.push(random(100,500));
    wind2y.push(random(100,300));
    wind2x.shift();
    wind2y.shift();
    
}

I was inspired by the intro to a certain children’s cartoon. My sounds are earth, fire, air, and water. It was surprisingly difficult to find quality sounds of some of these, and I had a lot of trouble with the web server stuff.

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/11/07/project-9-sonic-story/feed/ 0
Project 9: Portrait https://courses.ideate.cmu.edu/15-104/f2021/2021/10/30/project-9-portrait/ https://courses.ideate.cmu.edu/15-104/f2021/2021/10/30/project-9-portrait/#respond Sun, 31 Oct 2021 00:48:10 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=68299 Continue reading "Project 9: Portrait"]]>
wpf-portraits.js
//Patrick Fisher, Section B, wpf@andrew.cmu.edu Assignment -09-project
let img;
let drawState = 0; //variable to change the type of drawing that is happeing
let x2 = 5; //startin x variable for the bouncing drawing
let y2 = 5; //startin y variable for the bouncing drawing
let r2 = 5; //startin radius variable for the bouncing drawing
let dx2; //delta for x for bouncing drawing
let dy2; //delta for y for bouncing drawing
var ly1; //first end of the line for the line drawing
var ly2; //second end of the line for line drawing
var lx; //mid x point of the line for line drawing

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

function setup() {
    createCanvas(480, 480);
    img.resize(480,480); //fits image to canvas
    imageMode(CENTER);
    noStroke();
    background(255);
    img.loadPixels();
    dx2 = floor(random(1,10)); //sets delta x
    dy2 = floor(random(1,10)); //sets delta y
    while(dy2 == dx2){ //makes sure the deltas are not the same
        dy2 = floor(random(1,10));
    }
    ly1 = random(0,height); //sets the random line locations
    ly2 = random(0,height);
    lx = random(50,width-50); 
}
function draw() {
    if(drawState == 0){ //line drawings
        push();
        strokeWeight(4);
        let pix = img.get(lx,(ly1+ly2)/2);
        stroke(pix,128);
        line(lx-50,ly1,lx+50,ly2);
        ly1 = random(0,height);
        ly2 = random(0,height);
        lx = random(50,width-50);
        pop();
    }
    if(drawState == 1){ //bouncing drawing
        let pix = img.get(x2,y2);
        fill(pix,128);
        circle(x2,y2,2*r2);
        x2 += dx2;
        y2 += dy2;

        if(x2 >= width){
            dx2 = -dx2;
        }
        if(y2 >= height){
            dy2 = -dy2;
        }

        if(x2 <= 0){
            dx2 = -dx2;
        }
        if(y2 <= 0){
            dy2 = -dy2;
        }

    }
    if(drawState == 2){ //  square loop drawing
        var xy3 = mouseX/10;
        var rcnum = height/(xy3+1); //variable for the width of the square based on how many squares there are
        background(255);
        for(var col = 0; col <=xy3; col++){
            for(var row = 0; row <= xy3; row++){
                let pix = img.get((row*(rcnum))+(rcnum)/2,(col*(rcnum))+(rcnum)/2);
                fill(pix,128);
                square(row*(rcnum),col*(rcnum),(rcnum));
            }
        }
    }

}

function mousePressed (){ //changes the drawing with a press of the mouse
    if(drawState == 0) {
        background(255);
        drawState = 1;
    }
    else if(drawState == 1){
        background(255);
        drawState = 2;
    }
    else if(drawState == 2){
        background(255);
        drawState = 0;
    }
}

This project was a lot of fun. I had fun coming up with different ideas of how the photo could be revealed and while not simple, the coding process was rewardingly not strenous. I did have a lot of difficulty with imgur and p5.js trusting my image at first, including a few people commenting mean things, which was annoying.

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/10/30/project-9-portrait/feed/ 0
Looking Outwards 9 https://courses.ideate.cmu.edu/15-104/f2021/2021/10/30/looking-outwards-9/ https://courses.ideate.cmu.edu/15-104/f2021/2021/10/30/looking-outwards-9/#respond Sun, 31 Oct 2021 00:41:22 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=68295 Continue reading "Looking Outwards 9"]]>

The this weeks focus on women and non-binary people in tech, I am looking at the work of Adrien Segal, specifically her series on Wildfire Progression. What I really like about it, and about all Segal’s work, is that her art says something as well as just being a beautiful thing. Her Wildfire progression series is meant to share details on how destructive the California wildfires have been. The pieces seem abstract but they are actually modeled using the data of where and how a notable wildfire grew. It’s haunting seeing these and understanding they are representations of thousands of acres burned, countless lives ruined, displaced, or even some sadly lost. Adrien herself is from Oakland, California so this work in particular is very close to home. She studied at the California College of Arts and is now currently a teacher there as well. Her other activist related art includes pieces on water rights and the polar ice caps.

Adrien Segal, Wildfire Progression

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/10/30/looking-outwards-9/feed/ 0
Looking Outwards 8 https://courses.ideate.cmu.edu/15-104/f2021/2021/10/23/looking-outwards-8/ https://courses.ideate.cmu.edu/15-104/f2021/2021/10/23/looking-outwards-8/#respond Sat, 23 Oct 2021 21:59:35 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=68071 Continue reading "Looking Outwards 8"]]>

This week I watched Jennifer Daniel’s talk at Eyeo 2017. Daniel is a digital artist and editor, having had work published in many famous publications, such as The New York Times and Wired. At the time of her speech Daniel was working with a start up on the future of digital communication, specifically emojis, and is now the chair of the Unicode Consortium’s Emoji Subcommittee. Daniel’s work is in digital communication, specifically how humans communicate on digital platforms versus in person speaking or formal writing. Her presentation demonstrated a robust and nearly comprehensive understanding of digital communication, such as explaining the difference between emoji, gifs, and stickers or lightly chiding celebrities trying to capitalize on emojis but fail to understand how and why they are used. I think what Daniel is doing is very cool, her dedication to making communication as universal as possible and elevating emoji and other digital communication to the same consideration as traditional language is groundbreaking. I think in 20 years time her work will be remembered as a real positive for human communication.

Jennifer Daniel

https://vimeo.com/channels/eyeo2017

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/10/23/looking-outwards-8/feed/ 0
Project 7: Curves https://courses.ideate.cmu.edu/15-104/f2021/2021/10/16/project-7-curves/ https://courses.ideate.cmu.edu/15-104/f2021/2021/10/16/project-7-curves/#respond Sun, 17 Oct 2021 00:53:29 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=67767 Continue reading "Project 7: Curves"]]>
wpf-curves.js
//Patrick Fisher, Section B, wpf@andrew.cmu.edu Assignment -07-project
var functionState = 1;
function setup() {
    createCanvas(480, 480);
    frameRate(10);
}

function draw() {
    var nPoints = 80;
    var radius = 150;
    var separation = 120;

    if(functionState == 1){ //glitchy circle
        background(0);
        fill(255, 255, 255, 64);
        var mouseXincrease = map(mouseX,0,width,-40,40);
        var mouseYincrease = map(mouseY,0,height,-40,40);
        var colorXY = map(mouseX + mouseY,0,960,0,255);
    
        push();
    
        translate(2*separation, height / 2);
        fill(255,0,colorXY);
        beginShape();
        for (var i = 0; i < nPoints; i++) {
            var theta = map(i, 0, nPoints, 0, TWO_PI);
            var px = radius * cos(theta);
            var py = radius * sin(theta);
            vertex(px + random(-40, mouseXincrease), py + random(-40, mouseYincrease));
        }
        endShape(CLOSE);
        pop();
    } 

    else if(functionState == 2) {
        var mouseXpoints = map(mouseX,0,width/2,1,30);
        var oppoY = map(mouseY,0,width,255,0);

        background(240);
        push();
        fill(oppoY)
        translate(2*separation, height / 2);
        beginShape();
        for (var i = 0; i < mouseXpoints; i++) {
            var theta = map(i, 0, mouseXpoints, 0, TWO_PI);
            var px = radius * cos(theta);
            var py = radius * sin(theta);
            vertex(px,py); 
            ellipse(px, py, 3,3);
        }
        endShape(CLOSE);
        pop();
    }    
}

function mousePressed(){
    if(functionState ==1){
        functionState = 2;
    } else if(functionState ==2){
        functionState = 1;
    }
}

I am very conflicted on the result of this project. I had a major lack of inspiration when it came to ideas, so I ended up taking some of the shapes shown in the sample and playing around a bit with them. I had difficulty with some of my map functions as they were not working as I had intended for some reason. However, I do like in the end what I came up with. The circle getting more and more glitchy is really fun and I really love how the vertices of the second circle spring out of the original one like a clown car.

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/10/16/project-7-curves/feed/ 0
Looking Outwards 7 https://courses.ideate.cmu.edu/15-104/f2021/2021/10/16/looking-outwards-7/ https://courses.ideate.cmu.edu/15-104/f2021/2021/10/16/looking-outwards-7/#respond Sun, 17 Oct 2021 00:43:09 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=67765 Continue reading "Looking Outwards 7"]]>

This week I am looking at a YouTube video called “SEIZURE WARNING Pushing Sorts to their Limits”. Hyperbolic name aside, it is an hour long video where YouTuber Musicombo visualizes 79 different sorting algorithms. All the arrays sorted just contain integer values, up to either 2^14th (roughly 8 thousand) or 2^15th (roughly 16 thousand), in a completely random order. All the algorithms are doing is comparing two number values and seeing which one is larger than the other, until eventually the array is sorted correctly from 1 to their max number. However, how each algorithm goes about where in the array it chooses to compare a pair of numbers is where the variety and artistry comes in. Some are very simple, such as starting in the middle and going down, then starting in the middle of the rest of the unsorted section, so on and so forth, while some are much more intricate. The intricate ones are not always the fastest, but they create the more interesting patterns and visuals for sorting. Additionally the creator adds fun, arcade, Pac-Man esk sounds that make the entire process very pleasant as the cluttered noise becomes closer to a solid sequence, culminating when the final check runs successfully. The idea is relatively simple but the execution is so remarkable that it is just so satisfying to watch, so much so that the video has over 1.6 million views.

Musicombo

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/10/16/looking-outwards-7/feed/ 0
Project 6: Abstract Clock https://courses.ideate.cmu.edu/15-104/f2021/2021/10/10/project-6-abstract-clock-4/ https://courses.ideate.cmu.edu/15-104/f2021/2021/10/10/project-6-abstract-clock-4/#respond Sun, 10 Oct 2021 04:02:14 +0000 https://courses.ideate.cmu.edu/15-104/f2021/?p=67321 Continue reading "Project 6: Abstract Clock"]]>
wpf-abstract-clock.js
//Patrick Fisher, Section B, wpf@andrew.cmu.edu Assignment-06-project
var cloudVar = []; //array for cloud x coordinate
var rainVar = []; //array for cloud y coordinate
var hourTime; //variable to store hour
var minuteTime; //vairable to store minute
function setup() {
    createCanvas(600, 600);

    }
function draw(){
    background(155);
    hourTime = hour();
    minuteTime = minute();
    for(var i = 0; i <= 23; i++){ //sets cloud x position by mapping the current second of the day to an x value on the canvas
        cloudVar[i] =  map((second()+(60*minute())+(60*60*(hour()-i))),0,(24-i)*60*60,-105,width);
    }

    for(i = 0; i <= 59; i++){ //sets the rain y position my mapping the current second of the hour to a y value on the canvas
        rainVar[i] = map((second()+60*(minute()-i)),0,(60-i)*60,-12,height+10)
    }

    for(var counter = 0; counter <= 23; counter ++) { //for loop that checks how many hours into the day it is and draws that many clouds with the stored x values and each hour that has passed
        if(hourTime >= counter){
            drawCloud(cloudVar[counter],counter);
        }
    }

    for(var counter = 0; counter <= 59; counter ++) { //for loop that checks how many minutes into the hour it is and draws that many rain drops with the stored y values and each minute that has passed
        if(minuteTime >= counter){
            drawRain(rainVar[counter],counter);
        }
    }
}

function drawCloud(x,counter) { //function to draw clouds
    var y; //long amount of if statements to set the y coordinate
    if(counter == 0) {
        y = 50
    }
    else if(counter == 1) {
        y = 150
    }
    else if(counter == 2) {
        y = 250
    }
    else if(counter == 3) {
        y = 350
    }
    else if(counter == 4) {
        y = 450
    }
    else if(counter == 5) {
        y = 550
    }
    else if(counter == 6) {
        y = 50
    }
    else if(counter == 7) {
        y = 150
    }
    else if(counter == 8) {
        y = 250
    }
    else if(counter == 9) {
        y = 350
    }
    else if(counter == 10) {
        y = 450
    }
    else if(counter == 11) {
        y = 550
    }
    else if(counter == 12) {
        y = 50
    }
    else if(counter == 13) {
        y = 150
    }
    else if(counter == 14) {
        y = 250
    }
    else if(counter == 15) {
        y = 350
    }
    else if(counter == 16) {
        y = 450
    }
    else if(counter == 17) {
        y = 550
    }
    else if(counter == 18) {
        y = 50
    }
    else if(counter == 19) {
        y = 150
    }
    else if(counter == 20) {
        y = 250
    }
    else if(counter == 21) {
        y = 350
    }
    else if(counter == 22) {
        y = 450
    }
    else if(counter == 23) {
        y = 550
    }

    fill(255);  //series of ellipses that draws the cloud
    ellipse(x,y,60,50);
    ellipse(x+30,y-10,60,50);
    ellipse(x+80,y,60,50);
    ellipse(x+20,y+20,60,50);
    ellipse(x+60,y+15,60,50);
    push();
    noStroke();
    ellipse(x+40,y+10,100,55)
    pop();
}
function drawRain(y,counter) { //function to draw rain
        var x; //insanely long amount of if statements, like seriously there has to be an easier way to do this, to have the raindrops fall in a "random" pattern
        if(counter == 0) {
        x = 5;
        }
        if(counter == 39) {
        x = 15;
        }
        if(counter == 20) {
        x = 25;
        }if(counter == 2) {
        x = 35;
        }
        if(counter == 48) {
        x = 45;
        }if(counter == 38) {
        x = 55;
        }
        if(counter == 59){
        x = 65;
        }
        if(counter == 23) {
        x = 75;
        }
        if(counter == 19) {
        x = 85;
        }
        if(counter == 21) {
        x = 95;
        }
        if(counter == 47) {
        x = 105;
        }
        if(counter == 24) {
        x = 115;
        }
        if(counter == 1) {
        x = 125;
        }
        if(counter == 27) {
        x = 135;
        }
        if(counter == 25) {
        x = 145;
        }
        if(counter == 37) {
        x = 155;
        }
        if(counter == 49) {
        x = 165;
        }
        if(counter == 3) {
        x = 175;
        }
        if(counter == 28) {
        x = 185;
        }
        if(counter == 46) {
        x = 195;
        }
        if(counter == 58) {
        x = 205;
        }
        if(counter == 57) {
        x = 215;
        }
        if(counter == 50) {
        x = 225;
        }
        if(counter == 36) {
        x = 235;
        }
        if(counter == 45) {
        x = 245;
        }
        if(counter == 9) {
        x = 255;
        }
        if(counter == 35) {
        x = 265;
        }
        if(counter == 5) {
        x = 275;
        }
        if(counter == 51) {
        x = 285;
        }
        if(counter == 40) {
        x = 295;
        }
        if(counter == 17) {
        x = 305;
        }
        if(counter == 13) {
        x = 315;
        }
        if(counter == 22) {
        x = 325;
        }
        if(counter == 16) {
        x = 335;
        }
        if(counter == 34) {
        x = 345;
        }
        if(counter == 4) {
        x = 355;
        }
        if(counter == 29) {
        x = 365;
        }
        if(counter == 12) {
        x = 375;
        }
        if(counter == 56) {
        x = 385;
        }
        if(counter == 55) {
        x = 395;
        }
        if(counter == 11) {
        x = 405;
        }
        if(counter == 26) {
        x = 415;
        }
        if(counter == 15) {
        x = 425;
        }
        if(counter == 33) {
        x = 435;
        }
        if(counter == 41) {
        x = 445;
        }
        if(counter == 44) {
        x = 455;
        }
        if(counter == 30) {
        x = 465;
        }
        if(counter == 10) {
        x = 475;
        }
        if(counter == 6) {
        x = 485;
        }
        if(counter == 18) {
        x = 495;
        }
        if(counter == 42) {
        x = 505;
        }
        if(counter == 14) {
        x = 515;
        }
        if(counter == 52) {
        x = 525;
        }
        if(counter == 7) {
        x = 535;
        }
        if(counter == 53) {
        x = 545;
        }
        if(counter == 31) {
        x = 555;
        }
        if(counter == 8) {
        x = 565;
        }
        if(counter == 54) {
        x = 575;
        }
        if(counter == 43) {
        x = 585;
        }
        if(counter == 32) {
        x = 595;
        }

        fill(0,0,255); //draws a small ellipse as a rain drop
        ellipse(x,y,7,30)
}

This project was a lot of fun but very challenging. I came up with my idea fairly early on (I was brainstorming and listening to storm sounds). The amount of clouds is the amount of hours in the day, including a cloud for 0:00, and the amount of rain drops is how many minutes it has been in the day, including a drop for minute 0. The drops fall from the top and the clouds move left to right, with their positions being updated every second. I had to do a lot of algebra to have working formulas for the dynamic positions and ran into a lot of bugs when it came to keeping track of so many variables. My sketches became very incoherent very quickly. I also ended up writing an insane amount of for statements which was not good. If I could do this project again I would try to figure out a way to do what the if statements accomplished with some sort of loop.

]]>
https://courses.ideate.cmu.edu/15-104/f2021/2021/10/10/project-6-abstract-clock-4/feed/ 0