Thanks Upu! Actually, I didn’t do much I found the code for this Lorentz attractor in Flash Math Creativity (Jared Tarbell from www.levitated.net ), and all I did is that random color thing, and the dynamic drawing of the shape. I could watch it spin for hours…

Here’s the code (for the www.bit-101.com contest):

```
_root.createEmptyMovieClip("line",i++);
MovieClip.prototype.drawCircle = function(r, x, y){
this.moveTo(x+r, y);
this.curveTo(r+x, -0.4142*r+y, 0.7071*r+x, -0.7071*r+y);
this.curveTo(0.4142*r+x, -r+y, x, -r+y);
this.curveTo(-0.4142*r+x, -r+y, -0.7071*r+x, -0.7071*r+y);
this.curveTo(-r+x, -0.4142*r+y, -r+x, y);
this.curveTo(-r+x, 0.4142*r+y, -0.7071*r+x, 0.7071*r+y);
this.curveTo(-0.4142*r+x, r+y, x, r+y);
this.curveTo(0.4142*r+x, r+y, 0.7071*r+x, 0.7071*r+y);
this.curveTo(r+x, 0.4142*r+y, r+x, y);}
line.lineStyle(1,0x000000,100);
line.drawCircle(100,0,0);
myPos=new Array(random(10)/10,random(20),random(10));
myVar=new Array(0.01,10,28,8/3);
_root.onEnterFrame=function(){
x1=myPos[0]+myVar[0]*myVar[1]*(myPos[1]-myPos[0]);
y1=myPos[1]+myVar[0]*(myPos[0]*(myVar[2]-myPos[2])-myPos[1]);
z1=myPos[2]+myVar[0]*(myPos[0]*myPos[1]-myVar[3]*myPos[2]);
mc=line.duplicateMovieClip("line"+(i++),i,{_x:myPos[0]*10+210,_y:myPos[1]*10+210,_xscale:z1/3,_yscale:z1/3});
myPos=[x1,y1,z1];}
_root.onMouseDown=function(){
this.onEnterFrame=null;
this.onMouseDown=function(){
loadMovieNum("lorentzBit13.swf",0);}}
line._visible=0;
```

This one’s with circles and colorless (too many lines!). Just put the code in the first frame of your movie.

pom :asian: