/** Arcos. Mueva el mouse en sentido vertical y horizontal. / Emiliano Causa - Julio 2006 / e_causa@yahoo.com.ar / www.emiliano-causa.com.ar */ void setup(){ size(400,400); smooth(); noFill(); stroke(255); strokeWeight(5); } void draw(){ fill(0,0,55,6); rect(-10,-10,420,420); float distancia = dist(mouseX,mouseY,pmouseX,pmouseY); float angulo = atan2(mouseY-pmouseY,mouseX-pmouseX); float diam = linea(distancia, -10 , 10 , 0 , 200); arc(200, 200, diam, diam, angulo - HALF_PI/2, angulo + HALF_PI/2); } float linea(float x , float x1 , float x2, float y1 , float y2 ){ return (x-x1)/(x2-x1)*(y2-y1)+y1; }