Sunday, May 17, 2015

Float like a Butterfly

This is my creative, non-writing piece. I looked again at the equations Hughes supplied in his book for the Lorenz Attractor and noticed that it would be pretty simple to illustrate them. The laws are so simple, in fact, that they only used about six lines of programming. I don't want to scare you with equations or anything, so I'll start with the blog post with cool animations!

Some tips on viewing these:

  1. Refresh your page so you can synchronize them and watch for differences
  2. Pay close attention to differences in paths taken as time goes on


Clip 1: the standard setup



Clip 2: itsy bitsy change in initial conditions (-0.01)



Clip 3: small change in initial conditions (-0.2)



Here is the code I wrote with about two hours of testing to make all this happen:
In case you're interested in reading it, the green indicated numbers, the red is writing that's put on the screen, purple texts is commands, and black letters are variables with numbers corresponding to each one. This works because the differential equations shown below are traced by the function in lines 24 to 40 of the code.



No comments:

Post a Comment