//Michael schmitz 2003 int mx = 0; int my = 0; int px = 0; int py = 0; int hypo; int abstand; void setup() { size(400,400); background(55,55,55); ellipseMode(CENTER_DIAMETER); rectMode(CENTER_DIAMETER); } void loop() { background(55,555,55); mx = mouseX; my = mouseY; hypo = ((mx-200) * (mx-200)) + ((my-200) * (my-200)); abstand = int(sqrt(hypo)); px = (200-mx)/2+mx; py = (200-my)/2+my; if(mx<200){ px = px - abstand/2; } else if(mx>200){ px = px + abstand/2; } stroke(255,255,255); line(200,200 ,px,py ); line(mx,my, px,py); fill(255,255,255); noStroke(); ellipse(200,200,mx/2,my/2); }