SandScene is an interactive digital sand art installation built for Hack the Arts 2026.
Instead of drawing with a mouse, users create artwork by physically pouring colorful virtual sand using a real cup. Computer vision tracks the cup's horizontal movement while a Raspberry Pi Pico and MPU6050 track its tilt, allowing natural real-world motion to control a real-time particle simulation.
Once complete, finished artwork can be exported as a PNG.
- Real-time sand particle simulation
- Physical cup controller
- Computer vision tracking using AprilTags
- MPU6050 tilt sensing via Raspberry Pi Pico 2 W
- Multiple themed environments
- Dynamic sand pouring audio
- Theme-specific ambient soundscapes
- PNG export
- Automatic calibration
- Raspberry Pi Pico 2 W
- MPU6050 Accelerometer/Gyroscope
- Android phone running IP Webcam
- C++20
- SDL3
- SDL3_image
- OpenCV
- AprilTag
- CMake
Install the dependencies.
brew install sdl3 sdl3_image opencv cmakeClone the repository.
git clone <repo-url>
cd SandSceneBuild.
cmake -S . -B build
cmake --build build -jRun.
./build/SandSceneMove the physical cup to the requested positions during startup so the application can calibrate the camera tracking.
- Move the cup left and right to position the pour.
- Tilt the cup to control the flow of sand.
- Wait for the artwork to finish.
- Click Save to export a PNG.
- Click New to begin another piece.
assets/
sand.wav
themes/
sakura/
ocean/
aurora/
desert/
src/
main.cpp
SandWorld.cpp
SandWorld.hpp
AprilTagInput.cpp
AprilTagInput.hpp
PicoInput.hpp
Theme.hpp
- Additional themes
- Improved artwork and cup assets
- More sand behaviors
- More export options
- Packaged desktop releases
- Performance optimizations
This project was created for Hack the Arts 2026.
See ATTRIBUTIONS.md for third-party libraries and assets.