void setup(){ size(200,200); background(255); framerate(30); } void draw(){ smooth(); int posx = int(random(0,200)); // Calcul de la position posY int posy; if (posx > 50 && posx < 150){ posy = (round(random(50,100))*((round(random(1))*2)-1))+100; } else { posy = int(random(0,200)); } stroke(random(255),random(255),random(255)); strokeWeight(random(3)); line(random(50,150),random(50,150),posx,posy); }