import processing.core.*; 
import processing.xml.*; 

import java.applet.*; 
import java.awt.Dimension; 
import java.awt.Frame; 
import java.awt.event.MouseEvent; 
import java.awt.event.KeyEvent; 
import java.awt.event.FocusEvent; 
import java.awt.Image; 
import java.io.*; 
import java.net.*; 
import java.text.*; 
import java.util.*; 
import java.util.zip.*; 
import java.util.regex.*; 

public class spireule extends PApplet {


int nbBoules=400;
float turn=0.0f;

public void setup() {
  size(500, 500);
  smooth();
  frameRate(50);
  noStroke();
  colorMode(HSB);
}

public void draw() {
  turn-=0.0001f;
  background(0);
  for (int i=0;i<nbBoules;i++) {
    fill(i%0xFF, 0xFF, 0xFF);
    ellipse(width/2+cos(i*turn)*i, height/2+sin(i*turn)*i, 20, 20);
  }
}

  static public void main(String args[]) {
    PApplet.main(new String[] { "--bgcolor=#D4D0C8", "spireule" });
  }
}
