Wednesday, 6 April 2011

Progress- Creation #1

I have begun creating my image. I have started doing tutorials, i would be lying to say that i have been able to withhold all the information from the tutorials but i have been able to make a good start.

My first step was to create the circle and an if statment for when the circle is clicked. This means i have to limake the mouse clicked area only inside the circle. In order to test i have done this, for the time being i made it so that if the circle was clicked it would go white. so i would know if i have been successfull.




You have to tell the mouse where to click,
if(mousePressed && mouseX > centerX-r/2 && mouseY > centerY-r/2&& mouseX < centerY+r/2 && mouseY < centerY+r/2)
{
  drawSomething();
 }
}

void drawSomething()
{
  fill(255);
  ellipse(centerX,centerY,r,r);
}


No comments:

Post a Comment