This repository contains scientific computing projects completed in the 1st and 2nd years of Natural Sciences Cambridge.
collision modelling simulates one-dimensional elastic collisions between multiple particles with varying masses. Particles move along a line and interact through pairwise collisions governed by conservation of momentum and kinetic energy. Two extremely massive boundary particles act as fixed walls, confining the system.
View the collision animation produced here: https://riothomas234.github.io/Physical-Modelling/collision_modelling/animation.html
planetary motion simulates the motion of a particle in a two-dimensional gravitational field using numerical integration methods. The equations of motion for a central inverse-square force are solved using Euler, Leapfrog (Verlet), and Runge–Kutta (RK4) methods. The code explores how different numerical schemes affect orbital trajectories, energy conservation, and momentum conservation. Multiple initial velocities and positions are tested to demonstrate circular, elliptical, and perturbed orbits, as well as sensitivity to initial conditions. Time evolution of total energy, kinetic energy, gravitational potential energy, and angular momentum is also analysed and visualised.