r/programming • • Dec 23 '12

Simulating a solar system with Python

http://users.softlab.ntua.gr/~ttsiod/gravityRK4.html
244 Upvotes

72 comments sorted by

View all comments

Show parent comment

4

u/celoyd Dec 23 '12

I like this except that it’s sometimes a convenient optimization to have a squared variable around. For example, I was doing some stuff with the Mandelbrot set, where x2 appears a couple times around the innermost loop, and it was natural to call that xx. Not a dealbreaker, just an observation.