Tuesday, 25 September 2012

Current 25/9/2012

 //Here is some of my code, it is developing slowly.
 //I plan for it to do more than just move one eyeball but I am learning as go so it is taking some time.
 //My next step is to figure out how to produce many eyeballs.
 //I then want to change the scale of the eye as the mouse button is pressed; move the eye pupil
// towards the mouse; and change the colour of the eyeballs as the mouse moves faster.

float [] circle_x = {};
float [] circle_y = {};

 int z=0;
 int a=0;

void setup(){

 int count = 0;
  size (500,500);

}

void draw()
{
   background (255);
  int x=20; 
 
 
int i=0;
while (i<circle_x.length){
  i=i+1;
   fill(203,169,159);
  ellipse (z,a,8*x,5.5*x);
 fill(190,164,103);
  ellipse (z,a,7*x,5.4*x);             //My eyeball shape
 fill(42,14,10);
  ellipse (z,a,5*x,5*x);
 fill(0);
  ellipse (z,a,x,x);
 
}
while (i<circle_y.length){
  i=i+1;
   fill(203,169,159);
  ellipse (z,a,8*x,5.5*x);
 fill(190,164,103);
  ellipse (z,a,7*x,5.4*x);             //My eyeball shape
 fill(42,14,10);
  ellipse (z,a,5*x,5*x);
 fill(0);
  ellipse (z,a,x,x);
}
}

void mousePressed(){
 circle_x = append(circle_x,mouseX);
 circle_y = append(circle_x,mouseY);
  z=mouseX;
  a=mouseY;
}

No comments:

Post a Comment