Jasper – [OLD FALL 2018] 15-104 • Introduction to Computing for Creative Practice https://courses.ideate.cmu.edu/15-104/f2018 Professor Roger B. Dannenberg • Fall 2018 • Introduction to Computing for Creative Practice Sat, 12 Sep 2020 00:17:52 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.25 Project 02- Jasper Rogal https://courses.ideate.cmu.edu/15-104/f2018/2018/09/07/project-02-jasper-rogal/ https://courses.ideate.cmu.edu/15-104/f2018/2018/09/07/project-02-jasper-rogal/#respond Fri, 07 Sep 2018 23:07:21 +0000 https://courses.ideate.cmu.edu/15-104/f2018/?p=28268 Continue reading "Project 02- Jasper Rogal"]]>

Jasper Face 2

// Face variables
var eyeSize = 30;
var faceWidth = 80;
var faceHeight = 125;
var noseSize = 335;
var earSize = 15;
var mouthSize = 345;

function setup() {
    createCanvas(480, 600);
}

function draw() {
    background('blue');
    //hair
    fill('brown');
    ellipse(width / 2, height / 2 -20, faceWidth,  faceHeight);
    //face
    fill(253, 228, 200);
    ellipse(width / 2, height / 2, faceWidth,  faceHeight);
    fill('white'); 
    //eyes
    var eyeLX = width / 2 - faceWidth * 0.25;
    var eyeRX = width / 2 + faceWidth * 0.25;
    ellipse(eyeLX, height / 2, eyeSize, eyeSize);
    ellipse(eyeRX, height / 2, eyeSize, eyeSize);
    //iris
    fill('brown');
    ellipse(eyeLX, height / 2, eyeSize * .25, eyeSize * .25);
    ellipse(eyeRX, height / 2, eyeSize * .25, eyeSize * .25);
    //nose
    fill(253, 228, 200);
    triangle(240,  320, 237, noseSize, 243, noseSize);
    //mouth
    arc(width / 2, mouthSize, 10, 10, 0, PI, OPEN);
    //ears
    ellipse(240 - faceWidth * .5, 285, 10, earSize);
    ellipse(240 + faceWidth * .5, 285, 10, earSize);
}

function mousePressed() {
    faceWidth = random(70, 125);
    faceHeight = random(120, 160);
    eyeSize = random(18, 37);
    noseSize = random(330, 340);
    earSize = random(12, 18);
    mouthSize = random(343, 348)
}

I had trouble with variables at first, but once I understood them more it was fine.

]]>
https://courses.ideate.cmu.edu/15-104/f2018/2018/09/07/project-02-jasper-rogal/feed/ 0
Project 01- Jasper Rogal https://courses.ideate.cmu.edu/15-104/f2018/2018/08/31/project-01-jasper-rogal/ https://courses.ideate.cmu.edu/15-104/f2018/2018/08/31/project-01-jasper-rogal/#respond Sat, 01 Sep 2018 01:34:18 +0000 https://courses.ideate.cmu.edu/15-104/f2018/?p=27112 Continue reading "Project 01- Jasper Rogal"]]>

Jasper Face

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

function draw() {
    background(76, 45, 143);
    //neck
    fill(253, 228, 200);
    rect(140, 140, 20, 70);
    //face
    ellipse(150, 150, 55, 65);
    //eye
    fill('white');
    ellipse(140, 140, 12, 10);
    ellipse(160, 140, 12, 10);
    //iris
    fill('brown');
    ellipse(140, 140, 6, 6);
    ellipse(160, 140, 6, 6);
    //pupil
    fill('black');
    ellipse(140, 140, 2, 2);
    ellipse(160, 140, 2, 2);
    //nose
    fill(253, 228, 200);
    triangle(150, 150, 148, 160, 153, 160);
    //mouth
    arc(150, 166, 10, 10, 0, PI, OPEN);
    //eylashes left side
    line(140, 134, 140, 131);
    line(136, 135, 136, 131);
    line(138, 134, 138, 131);
    line(134, 135, 134, 131);
    line(142, 134, 142, 131);
    line(144, 135, 144, 131);
    //eyelashes right side
    line(160, 134, 160, 131);
    line(162, 134, 162, 131);
    line(164, 136, 164, 131);
    line(166, 136, 166, 131);
    line(160, 134, 160, 131);
    line(158, 134, 158, 131);
    line(156, 135, 156, 131);
    //hair
    stroke('brown');
    line(mouseX, 105, 150, 116);
    line(mouseX+5, 105, 155, 118);
    line(mouseX+10, 105, 160, 120);
    line(mouseX+15, 105, 165, 122);
    line(mouseX-5, 105, 145, 118);
    line(mouseX-10, 105, 140, 120);
    line(mouseX-15, 105, 135, 122);
}

This is my first time coding. Also my hair is animated.

]]>
https://courses.ideate.cmu.edu/15-104/f2018/2018/08/31/project-01-jasper-rogal/feed/ 0