ICM WEEK 3: I HAD ABOUT 1000 IDEAS.

It is true that you must learn to walk before you run. However, what I have been learning in ITP has required myself to slow down, take a deep breath and start my journey  by squirming on the ground like much like an aimless yet relaxed worm.  Last week I felt the wind in my sails leading up to my Wednesday marathon of mental exercise that is both ICM and PCOMP back to back. This week, I was getting chopped down as my ideas grew larger and faster but my skills trailed behind slowly, but importantly, steadily.

I will say that I am happy on the ground moving like an embryo in the swamp that is java script. I have learned to like it down here. I feel comfortable and warm and protected. However, I know that like any single celled organism – I have the potential for much growth.

Here is my sketch for this week:

An Organism With A Tooth

//background color
var r = 232
var g = 121
var b = 189
  //control box
var x = 100;
var y = 100;
var w = 100;
var h = 100;


//small rect
var xrect1 = 300;
var yrect1 = 200;
var wrect1 = 30;
var hrect1 = 30;

//rightsmallrect
var xrect2 = 700;
var yrect2 = 200;
var wrect2 = 30;
var hrect2 = 30;


//mouth
var xrect3 = 330;
var yrect3 = 300;
var wrect3 = 350;
var hrect3 = 10;

//fangleft
var fangx1 = 470;
var fangy1 = 303;
var fangx2 = 500;
var fangy2 = 360;
var fangx3 = 530;
var fangy3 = 303;

//fangright
var fangrx2 = 667;
var fangry2 = 303;
var fangrx2 = 600;
var fangry2 = 360;
var fangrx3 = 640;
var fangry3 = 303;


//top triangle 
var trix1 = 500;
var triy1 = 250;
var trix2 = 250;
var triy2 = 0;
var trix3 = 750;
var triy3 = 0



function setup() {
  createCanvas(1000, 500)

}

var goDown = false; //resident

function draw() {

  background(r, g, b);
  stroke(1);
  strokeWeight(5);
  fill(31, 255, 128);
  rect(75, 75, 150, 150);
  rect(x, y, w, h);


  //the mouse is inside the box
  if (mouseX >= x && mouseX <= (x + w) && mouseY >= y && mouseY <= (y + h)) {
    //when inside the box, x get bigger by 1
    x = x + 1;
    y = y + 1;

    //small rectangle
    rect(xrect1, yrect1, wrect1, hrect1);

    xrect1 = xrect1 + 1;
    yrect1 = yrect1 + 1;

    //small rectangle right
    rect(xrect2, yrect2, wrect2, hrect2);
    xrect2 = xrect2 + 1;
    yrect2 = yrect2 + 1;

    //mouth
    rect(xrect3, yrect3, wrect3, wrect3);

    //triangle top
    triangle(trix1, triy1, trix2, triy2, trix3, triy3);

//fang
fill(255,0,0)
triangle(fangx1,fangy1,fangx2,fangy2,fangx3,fangy3);


    //residentcode
    if (r > 255) {
      goDown = true;

    }

    if (goDown === true) {
      r = r - 1
      g = g - 1
      b = b - 1
    } else {
      r = r + 1
      g = g + 1
      b = b + 1
    }

    if (r < 0) {
      goDown = false;
    } //resident code


    if (xrect1 >= 302 && yrect1 >= 202) {
      xrect1 = xrect1 - 5;
      yrect1 = yrect1 - 5;

    }

  }
  //controlling amount that box is moving
  if (x >= 102 && y >= 102) {
    //when x equal to or great than 102, x = 97
    x = x - 5;
    y = y - 5;
  }

  if (xrect2 >= 702 && yrect2 >= 202) {
    xrect2 = xrect2 - 5;
  yrect2 = yrect2 - 5;
  }

}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s