int r = 100; int n = 100; int mousepress = 0; //float stan = print(mouseX); //float fac = print(mouseY); void setup() { background(255, 255, 255); frameRate(50); size(255, 255); stroke(255); } void draw(){ stroke(mouseX/2, mouseY/3, random(100)/2, 50); line(r, n, mouseX, mouseY); if (mousePressed){ r = mouseX; n = mouseY; //mouseNum++; } }