/Physics-Simulator

Primary LanguageJupyter Notebook

README

This is the final capstone project for ME314 Machine Dynamics class at Northwestern University. The project was to create a physics simulation from scratch. The simulation was created using python on collab for two scenerios: The jack in the box and a trebuchet

Jack in the Box

The simulation was to replicate a die boouncing inside a box as a planar system. To replicate this, two external forces are applied on the box, a force in y to stop it from dropping and a rotational force to replicate shaking. The die falls under gravity and collides with different sides of the box.

The video of the jack in the box is as follows:

jack.mp4

Trebuchet

The simulation was to replicate a trebuchet. There are 5 variables tracked, the x,y and theta of the weight being thrown and theta1 and theta2 of the system. The simulation starts when the counterweight falls down which changes theta1 and theta2. The changes lead to the throwing weight reaching x=0 which is the condition for detachment and it follows a projectile trajectory.

The video of the trebuchet is as follows:

treb.mp4