Monica - K

By Monica Harvancik
//one circle is trying to escape, but as soon as it gets //close to the other one, the second one grabs it and wont let go. //its like two ufc fighter going round the rink, //they circle each other slowly, prowling, until they get too close //and then BAM they grab each other and start to grapple mercilessly.. //intense. sucker a1; sucker a2; int directionX =1; int directionY =1; float x =5; float y =5; float diameter = 5; float speedX =.4; float speedY =.02; PImage s1; void setup() { size (400, 400); smooth(); s1 = loadImage ("meh1.jpg"); strokeWeight(3); stroke(80); a1 = new sucker(); a2 = new sucker(); a1.Values(50, 50, 140, a1); a2.Values(100, 100, 20, a2); } void draw() { image (s1,0,0); a1.move(); a2.move(); a1.display(); a2.display(); frameRate(15); } class sucker { void Values (float centerx, float centery, float diameter, sucker sucker2) { } float diameter =1; float speed = 1; float x; float y; sucker a2; void move() { x = x + random(-15, 15); y = y + random(-15, 15); x= constrain(x, 200, width-50); y= constrain(y, 200, height-50); } void display() { fill(200); ellipse(x,y, 40, 40); } }

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*