- Install python 3.6 or later (needs format strings and type hinting)
- Set up a virtualenv:
virtualenv .venv
andsource .venv/Scripts/activate
- Install dependencies
pip install -r requirements.txt
- Run what you want (see below).
There are multiple files to run.
You can run a jupyter notebook for some graphs and lots of sample code: jupyter notebook
then open Test data.ipynb
.
Or run one of the three main files with python
: find_best_braking_factor.py
, plot_numerical_model.py
, obstacle_height_tester.py
.
A rendered version of Test data.ipynb can be found in Test data.html, so you don't need to run jupyter to see the results.
The braking factor is a coefficient used in acceleration to simulate drag and other sources of energy loss.
The ball is rolling, not sliding.
The track is represented with a parabola.
The goal was to elevate the center of the parabola to a certain height, where the ball could pass exactly twice.
Calculated values and a simulation: