/** A rotating NeonBox by Guru */ int rot = 0; void setup() { size(300,300); frameRate( 25 ); smooth(); } void draw() { rot++; if ( rot == 360 * 30 ) { rot = 0; } stroke(0); fill( 0, 0, 0, 80 ); rect( 0, 0, 300, 300 ); translate( 150, 150 ); rotate( rot * ( 4 * PI ) / 360 ); // fill( 255 * abs( sin( 45 + float(rot) / 10 )) , 255 * abs( sin( float(rot) / 10 )), 255 * abs( sin( 90 + float(rot) / 10 ))); strokeWeight( 3 ); stroke( 255 * abs( sin( 45 + float(rot) / 10 )) , 255 * abs( sin( float(rot) / 10 )), 255 * abs( sin( 90 + float(rot) / 10 ))); rect( -75, -75, 150, 150 ); }