Topics › Physics

Pygame particle simulation in 3D

Below is a video of my first attempt to move my Pygame particle simulation into the third dimension (thus combining it with my Pygame 3D tutorial). I meant to write about it a while ago, but got distracted trying to work out how to display an image rotated in three dimension (for the walls). I still haven't worked it out.

Solar system evolution

After running my solar system simulation several times I was interested to see how robust the system was. By this I mean that despite the fact that the particles start off randomly distributed, the progress of the simulation is quite similar each time. The details weren't exactly the same each times, but in general, a star formed at the centre of the universe at about the same time and ended up with a few satellites, while several particles were sent flying off into space.

Solar system simulation

[UPDATE: I've made a 3D version of this simulation using the Khan Academy programming environment.]

Project:

Pygame physics simulation (Tutorial)

A tutorial explaining how to use the Python module, Pygame, and some basic trigonometry to create a physics simulation.

Molecular dynamics simulation

I wanted to write about a Java molecular simulation that I made a while ago, before I became entranced by Python. The program is a simple 2D physics simulation, with circles representing billiard ball-style atoms. The idea before the simulation was initially an attempt to create a virtual lava lamp. In its first incarnation, there were two types of atom. Each atom was attracted to nearby atoms of the same type (with a force proportional one over distance squared). If the distance between any two atoms was below a threshold then the two atoms repel each other.

Simulating life and more

[Originally from my Wordpress blog, but with added links]

I'm still working out what categories to include on this blog. I intend to write about various simulations I have written, am in the process of writing or plan to write, but I'm not sure of the best way to categorise them. I could have a general science category as I do at the moment, or I could put them under programming. Or I could be more specific and have an Artificial Life category to complement an Artificial Intelligence (for Go) category. Or maybe it isn't important.