Computer simulation in pygame

Today, we are going to … I’m going to talk about … I’m going to present you a computer simulation. It’s not just any simulation, it is a simulation of body acceleration in gravitational field. Wow, physics! Yes! 😎

In particular, it simulates how space shuttle should be accelerating near planet, and use it’s gravitational field to accelerate. I’m not a physician, so I won’t talk about physics theory, but it is good to know something about Newton’s three laws, Newton’s gravitation law (or formula of gravity),  Kepler’s laws, and conservation of energy. Ok, the last would be nice to know for analytic solution of body’s trajectory in gravitational field of a planet. Unless you are physician, or mathematician, you should use numerical solution for solving simulation problems, because it can be good enough 🙂 Enough, it you do your best do reduce error. In this simulation, that could be done reducing time step for numerical formula. Since reducing time step would shorten the path that object traverses, animation would be veeeery slow. I guess I could overcome this problem, but it is very appealing right now, or  appealing enough 🙂

The simulation lets you set body’s initial coordinates and initial velocity, when dragging mouse. When you release the left mouse button, body starts to move, by numerical formula, and you get yourself an animation 🙂 Real eye cookie 😎 You can turn on statistics monitor, and also a body’s velocity vector in it’s little coordinate system in down right place of the simulation. You can also change planets. All 9. You can say, well Pluto is no longer a planet. Ok, that’s true, but I have found a png images of a planets and Pluto’s was there, so I added it in 🙂 Yey, my simulation has 9 planets! Anyway, simulation has configuration file, where you can change masses of planets, since my masses are not very realistic, not even for comparing between two planets in solar system.

Software used for this simulation is Python 2.7 and PyGame library.

You can download it here.


Fedora mirror at Faculty of Natural Sciences, Kragujevac, Serbia

Hey hey, I wish you all a happy new 2012. year. Do not be scared, Mayans predicted end of old and start of a new epoch(!), not armageddon (not even a bible one). How could they predict that??? All we know, is that they were a great mathematicians and astrologists. Some would say barbarians, but look at the conquistadors and their way of being civilized. Enough said. It’s time for some techy talk.

There comes a time, when every programmer wants to contribute to community somehow. Some do it often, some rarely or not at all. And if you didn’t, try it. It can be exciting. Remember, it is not the goal that is most important, but the way and the road to get there! Woah 😎 some wise words. Anyway, since I’m in the mood for wise talk, I’m gonna cut to the real deal 🙂 This is it:

Fedora mirror at the Faculty of Natural Sciences in Kragujevac, Serbia. Check it out if you are near it (geographically, I mean 🙂 ). There’s a image/link at the right side of the text.

The thing with supporting distribution by providing a mirror is that is useful, and not hard to do it at all. Well, of course if you fulfill the requirements. In this case it is some outbound bandwidth (100 MBit/s) and minimum 1 TB of storage, for all ISO and RPM packages. The procedure and all that “papers”, is not very big problem. As a matter of fact, it goes very fast. You can become a public mirror in a couple of hours. If you use a RPM distro as a system on a mirror machine, that is even simpler. In this case, Debian is used. But that is not a big problem. Downloading mirror-manager software from git repository, configuring a config file with a data you enter at Fedora Accounting System, and rsyncing all data, you can start to provide a mirroring services to all people from the world 🙂 Yey! I even installed a ganglia monitoring system, so I could watch how much it is used. Here’s a network traffic ganglia graph:

Enjoy the holidays!