Ballz is a simulation of two balls on an elastic band. It should visualize problem 11 of the 2022 IYPT problems.
- If not already installed, install git.
- If you are on windows, download here
- On linux, just use your standard package manager
- Clone this repository
git clone https://github.com/Qrashi/ballz.git
- cd into the
ballz
directory - Run
python ballz.py
The ballz.py file will automatically update the project and install dependencies for you.
Try running git fetch origin
and git pull origin
to update to the newest version
Allows you to customize various aspects about the simulation
- enable_git_auto_update: (true | false) Wether to enable auto downloading new updates
- font: ("font name") Font to use
- max_performance: (true | false) Enable / disable max_performance mode
- disable_log: (true | false) disable or enable data logging
If you would like to run the simulation with different constants or different input parameters, change the contents of
the scenarios.json
file.
In order to add a new scenario to which you can switch using the arrow keys, please add another "block of data" like
that:
{
"scenarios": [
{
#
The
predefined
scenario
},
#
Add
a,
and
put
your
new
scenario
in
the
lines
below
{
#
Put
the
values
for
your
simulation
here
(look
at
the
default
to
see
which
values
you
have
to
provide.)
}
]
}