float xDirection, yDirection; float x, y; float bSize=20; void draw() { size(200,200); background(204); translate(width/2, height/2); float a = atan2(mouseY-height/2, mouseX-width/2); rotate(a); fill(255,0,0); noStroke(); ellipseMode(CENTER); ellipse(x,y,bSize*2,bSize); ellipse(x,y-bSize/2,bSize/2,bSize); ellipse(x,y+bSize/2,bSize/2,bSize); ////////////////////////////////////////////////////// fill(255); ellipse(x+15 ,y-8,4,4); fill(255); ellipse(x+15,y+8,4,4); fill(0); ellipse(x+15 ,y-8,2,2); ellipse(x+15 ,y+8,2,2); fill(255,0,0); triangle(x,y+bSize/2,x-3*bSize,y+random(10)-random(10),x,y-bSize/2); }