/** A processing sketch for everybody who wants to shine a little light by Guru */ PImage img; int[] tailx = new int[10]; int[] taily = new int[10]; void setup() { size(300,300); smooth(); frameRate(25); img = loadImage("spark.png"); noCursor(); for (int i = 0; i < 10; i++ ) { tailx[i] = mouseX; taily[i] = mouseY; } } void draw() { background(0); for( int i = 9; i > 0; i-- ) { stroke(255,255,128,128 - 12 * i); strokeWeight((10-i)/2); line(tailx[i], taily[i], tailx[i-1], taily[i-1]); tailx[i] = tailx[i - 1]; taily[i] = taily[i - 1]; } tailx[0] = mouseX; taily[0] = mouseY; pushMatrix(); translate( mouseX, mouseY ); rotate( random( PI / 4 )); image(img, 0 - img.width / 2, 0 - img.height / 2, img.width, img.height); popMatrix(); }