Physics-based roller coaster loop simulations written in Python
Developed for Concurso PULSAR Jovens Investigadores (NFIST - Instituto Superior Técnico) during high school
Numerical simulations of roller coaster loops under different G-force profiles.
Explore the project »
Report Bug
·
Request Feature
Table of Contents
This repository contains Python simulations used to model and analyse roller coaster loop geometries.
The project compares different loop designs and evaluates their impact on physical quantities such as G-force distribution, velocity evolution, and trajectory behaviour.
Four main loop models were implemented:
- Circular loop (G Force graph only)
- Loop with constant centripetal acceleration
- Loop with constant G-force constraint
- Clothoid-based loop (smooth curvature variation)
- Cornu spiral (used for testing and geometric comparison)
The simulations combine classical mechanics with numerical integration to generate and analyse trajectories.
- Python
- NumPy
- Matplotlib
- SciPy
Clone the repository:
git clone https://github.com/itzhrqz/rollercoaster-loop-simulations.gitMove into the project directory:
cd Contest_PULSARInstall dependencies:
pip install -r requirements.txtEach script corresponds to a specific loop model or analysis.
Loop with constant G force:
python LoopsPULSAR-ConstantG.pyLoop with constant centripetal acceleration:
python LoopsPULSAR-ConstantAC.pyClothoid shape loop:
python LoopsPULSAR-Clothoid.pyG force graph for a circular loop:
python SimuladorForçaGPULSAR.pyExample of a Cornu Spiral graph (used for testing geometric behaviour):
python ExemploEspiralCornuPULSAR.pyAdditional notes:
- All scripts are standalone and can be executed independently
- A smaller step size
simproves numerical accuracy but increases computation time
The simulations generate graphical representations of roller coaster loops and their corresponding physical quantities.
Examples of generated outputs:
- Loop trajectory plots
- G-force distribution along the track
- Curvature evolution
- Comparative loop geometries
Example output:
Introduzir coordenada x inicial (m): 0
Introduzir coordenada y inicial (m): 0
Introduzir ângulo inicial (float): 0
Introduzir velocidade inicial (m/s): 20
Introduzir constante de força G desejada: 3.5
Introduzir tamanho de passo s: 0.01
The generated plots can be used for:
- Physics analysis
- Scientific reports
- Data interpretation
- Educational demonstrations
Implemented features throughout the project include:
- Circular loop modelling
- Clothoid loop generation
- Parametric curve analysis
- Numerical differentiation
- Real-time graph plotting
- Energy conservation verification
- Tangential and centripetal acceleration analysis
- G-force optimization studies
The project also includes experimental simulations exploring how loop geometry can minimize excessive forces on riders while preserving realistic roller coaster dynamics.
This project was developed for Concurso PULSAR Jovens Investigadores (NFIST - Instituto Superior Técnico).
It was completed while I was in high school (12th grade), and awarded 1st place in the competition.
The objective was to study the physics and mathematics of roller coaster loops using computational methods, focusing on how different geometric designs affect G-force profiles and motion behaviour.
The simulations show clear differences between loop geometries:
- Circular loops produce high peak G-forces at the bottom
- Constrained-force designs distribute acceleration more evenly
- Clothoid/Cornu spirals provide smoother transitions in curvature
Developed by:
- Henrique Carvalho (@itzhrqz)
This project is shared for portfolio and educational purposes.
All rights reserved.
No permission is granted to use, modify, distribute, or reproduce this work without explicit consent from the author.


