9 votes

Dissecting a Dweet: Strange Attractor (a tiny 3D Lorenz system in javascript)

1 comment

  1. KilledByAPixel
    Link
    Hello all. This is my 5th weekly post talking about one if my tiny javascript programs. I feel like I am getting better at writing these every time. This one is all about how to make a cool 3d...

    Hello all. This is my 5th weekly post talking about one if my tiny javascript programs. I feel like I am getting better at writing these every time.

    This one is all about how to make a cool 3d strange attractor animation using just a tiny bit of javascript. I hope you enjoy!

    Javascript code...

    https://www.dwitter.net/d/14726

    c.width|=X=Y=Z=1
    for(i=4010;i--;i<2e3&&x.lineTo(960+(X*C(t)-Y*S(t))*45,1160-Z*23))Z+=(X*Y-Z)/39,X+=(Y-X)/13,Y+=X*(28-Z)/99
    x.fill`evenodd`
    
    3 votes