SandTable Simulator is a Python-based application using pygame to simulate a sand table with customizable paths and ball animations.
- Display paths read from .thr files in a graphical interface.
- Smooth animation of a ball following the displayed paths.
- Option to display paths using RGB colors based on polar coordinates.
- Python 3.x
- pygame library
-
Clone the repository:
git clone https://github.com/your-username/sandtable-simulator.git
-
Install pygame:
If you haven't installed pygame yet, you can install it using pip:
pip install pygame
-
Run the application:
Navigate to the project directory and run
main.py:cd sandtable-simulator python main.py
- Upon running the application, it will display a pygame window showing paths and a ball animation.
- Paths are read from .thr files located in the specified
input_folder. - The ball follows the paths with smooth animation, adjusting speed and appearance based on configuration variables in
constants.py.
- Adjust configuration variables in
constants.pyto customize screen dimensions, colors, ball speed, and more. - Set
use_rgb_pathtoTrueto display paths using RGB colors derived from polar coordinates.
sandtable-simulator/
│
├── main.py # Main entry point of the application
├── constants.py # Configuration variables
├── utils.py # Utility functions (polar/cartesian conversions, file operations)
└── drawing.py # Drawing functions (path rendering)