Here’s a program I wrote to continuously draw points in a random place
void setup()
{
size(400,400);
strokeWeight(4);
}
void draw()
{
point (random(400),random(400));
}
The commands between the { and the } below setup() are only performed once, when the program first starts.
The commands between the { and the } below draw() are repeatedly executed, a few times a second.
change the program to draw lines in random places
use frameRate() to change the update speed (you can read about this function in the Help/Reference section).