// Double slashes indicate this line is a comment that Processing can ignore. // Comments in your code make it easier to follow. // The first thing to do is declare all the variables we will use. float x, y, seed=888, f=0; // Each seed value gives a different fractal. double df=0, ddf=TWO_PI/seed; int i=0; void setup(){ // 'setup' is called just once, when the program is run. size(200,200); // Tell Processing how big a window it should use. } void draw(){ // 'draw' is called every time the program draws a frame. // We need to reset most of the variables every frame. x=100; y=100; i=0; f=0; df=0; background(255); // This fills in the frame with a white background. while (i<9000){ // Repeat the next block 9000 times. i+=1; // This means 'add 1 to i'. We could also write out 'i=i+1'. f+=df; df+=ddf; x+=cos(f); y+=sin(f); point(x,y); } ddf+=0.000000005; // Increasing this each frame causes animation to happen. }