Friday, May 24, 2013


Hi all!

This second programs is about a famous problem that Newton proposed because he couldn't find an analytical solution, and in fact there isn't any! The only way to calculate this movement is through computer simulations using numerical methods. Actually if you download the program you will see that the planets move in a crazy way! I's very difficult to find an stable solution as you have to fix it yourself by changing some parameters. If you find any interesting solution don't doubt to post a comment.


Red and blue planets are orbiting around the green one and all are moving upwards.

Friday, May 17, 2013

1. The bouncing ball

Hi all!

"The bouncing ball" consists basically in a simple red ball bouncing up and down. Also I've added a graphing function to plot the position over time where you can see the lost energy at every bounce.



Involved physics: 1D kinematics, differential equations (without solving them).

Needed python libraries: visual and visual.graph

Parameters: you can change the initial velocity, high, gravity, the elasticity of the bounce and friction with air.

Explaining the code: 

Wednesday, May 15, 2013



If you want to run the programs posted here you will need to have Python 2.7.4 interpreter, and VPython 5.12 (a 3D scientific library). Actually these are the versions which I work with, if you have newer or older ones you can try to run the modules anyway but be aware it won't always work.
I recommend you to install the IDLE programming environment because is specific for python. IDLE is very clean and useful because you can write scripts and talk to the interpreter directly among others... You can download easily all this software using the Synaptic package manager (in Ubuntu).
example: type "python visual" for VPython.

Interesting links:
VPython main web
Python official website

Tuesday, May 14, 2013


Hi! This is my first post in this blog!
My purpose here is to share my modules and to explain how them are build, their structure and what are them useful for. Because I think that programming is a fantastic way to learn physics, informatics and technology.
The language will be used is Python, you will need also to have installed visual python extension for 3D simulations. Finally say that I recommend you strongly to use Ubuntu and not windows because it's better for programming issues (later on I will explain exactly why).
See you!