Collection of physics programs done for the INFO2058/2059 courses, given by Pr. Boigelot and Bertrand Cornélusse, ULiège. The final mark for the projects is 15/20 for the mechanics section and 20/20 for the electromagnetism section.
Note : No copying (even partial) of this code within the scope of the INFO2058/2059 course will be tolerated.
-
spaceship.py
: Spaceship simulation. The program simulate the thurst of a spaceship and the gravity exercised by a planet on the spaceship.
- Press
Left
/Right
to adjust the ship nozzle orientation. - Press
Up
to light up the nozzle. - Press
Left-click
to add a planet. - Press
Right-click
to remove a planet. - Press
Q
to quit.
- Press
-
gesture.py
: Vertical gesture detection program. The acceleration in shown in red, the velocity in green. A vertical and slow gesture from bottom to top to bottom increases the counter.
-
complex_movement.py
: Simulation of the movement of a mobile object. The simulation takes place on a curve with frictions tkane into account and with an initial high potential energy position.
-
balistic.py
: Balistic simulation calculating the right timing to drop a bomb on a target. The y velocity and acceleration is shown in the top left of the screen.
- Press
A
to drop a bomb automatically (the plane should no be moved on the Y axis after being armed). - Press
B
to drop a bomb manually.
- Press
-
balistic1.py
: Balistic simulation calculating the right timing to fire a projectile on a target.
- Press
Right-click
to position the red indicator. - Press
A
to initialize the automatic fire. - Press
Left-click
to fire. - Alternatively, press
Up
/Down
to adjust initial speed,Left
/Right
to adjust the canon position to try and aim for the indicator.
- Press
-
field.py
: Simulation displaying the electrical field between electrical charges. Red is positive, Black is negative.
- Press
Left-click
to add a positive charge. - Press
Right-click
to add a negative charge. - Press
Middle-click
to remove a charge.
- Press
-
mobile_charge.py
: Simulation of the trajectory of a mobile negative charge between fixed charges. The potential and kinetic energy of the mobile charge and the mouse position are shown in the top left of the screen.
- Press
Left-click
to add a positive charge. - Press
Right-click
to add a negative charge. - Press
Middle-click
to remove a charge. - Press
N
to place a mobile charge.
- Press
-
cyclotron.py
: Simulation of the trajectory of a mobile positive charge in a cyclotron. The magnetic field is facing outward from the screen.
- Press
Up
to increase the vertical component of the electrical field. - Press
Down
to decrease the vertical component of the electrical field. - Press
PgUp
to increase the magnetic field. - Press
PgDn
to decrease the magnetic field. - Press
C
to automatically handle the magnetic and electrical fields to create a cyclotron. - Press
Spacebar
to reset the simulation.
- Press
-
motor.py
: Simulation of a direct current motor. The motor is composed at its center of a rotor of 1000 spires. The stator is composed of two permanent magnets, the magnetic field go from left to right. The winding inductance is not taken into account.
- Press
Spacebar
to close the circuit.
- Press
- Simon Gardier (Co-author)
- Lei Yang (Co-author)