Physics is a physical world simulator and playground. You can add squares, circles, triangles, or draw your own shapes, and see them come to life with forces, friction, and inertia.
Physics is not part of the Sugar desktop, but can be added. Please refer to;
On Sugar desktop systems;
- use My Settings, Software Update.
On Debian and Ubuntu systems;
apt install sugar-physics-activity
(Unavailable on Ubuntu 24.04)
On Fedora systems;
dnf install sugar-physics
Physics depends on Python, Sugar Toolkit, Cairo, Telepathy, GTK+ 3, Pango, Box2d and Pygame.
Physics is started by Sugar.
Physics is packaged by Linux distributions;
- setup a development environment for Sugar desktop,
- install the dependencies, see below,
- clone this repository,
- edit source files,
- test in Terminal by typing
sugar-activity3
For development, install the Box2D library.
- Install
swig
,- On Ubuntu/Debian, run
sudo apt install swig
- On Fedora/RHEL systems, run
sudo dnf install swig
- On Ubuntu/Debian, run
- Install setuptools and pip,
- On Ubuntu/Debian, run
sudo apt install python3 python3-setuptools python3-pip python3-all-dev
- On Fedora/RHEL, run
sudo dnf install python3-pip python3-setuptools
- On Ubuntu/Debian, run
- Clone pybox2d and build, run
git clone https://github.com/pybox2d/pybox2d
cd pybox2d
# Make sure you have installed swig
python3 setup.py build
pip3 install . --break-system-packages