(Useless) Nightly delirium

actionscript 3, fun

Just some hypno-fun with drawing APIs:


Click to self-hypnotize

p.s.: this zoom back infinitely (more and more drawing API usage) so do not leave it run wildly or your cpu will burn :D

Code:

var w:Number=stage.stageWidth;
var h:Number=stage.stageHeight;
var steps:uint=5;
var stepAngle:Number=720/steps;
var div:Number=2;
var inita:Number=0;
var acc:Number=0;

function render(event:Event):void {
	acc+=1;
	div+=.02;
	inita+=.2;
	this.graphics.clear();
	this.graphics.beginFill(0);
	this.graphics.moveTo(w/2, h/2);
	var r:Number=1;
	var a:Number;
	var arad:Number;
	var i:int=0;
	while (r<1000) {
		if (div!=0) r+=r/div;
		a=inita;
		for (i=0; i
			
3 Comments

3 Comments

  1. dVyper  •  Apr 24, 2009 @10:22 am

    A warning for users – don’t open the SWF and leave your computer for a few hours. After that time, the SWF uses up so much processing time its wrong…

  2. Pierluigi Pesenti  •  Apr 24, 2009 @1:27 pm

    Totally agree with the warning ;)
    However come on, it’s just a nightly trip, and is clearly stated in the post that quickly becomes cpu hungry… who could resist hours looking at this stuff :-D

  3. FranckyInfo  •  Mar 30, 2010 @1:00 am

    I love that!!!

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>