Skip to content
DakshSharma304Public

About

cool sand

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

SandScene

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.


Features

  • 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

Hardware

  • Raspberry Pi Pico 2 W
  • MPU6050 Accelerometer/Gyroscope
  • Android phone running IP Webcam

Software

  • C++20
  • SDL3
  • SDL3_image
  • OpenCV
  • AprilTag
  • CMake

Building

macOS

Install the dependencies.

brew install sdl3 sdl3_image opencv cmake

Clone the repository.

git clone <repo-url>
cd SandScene

Build.

cmake -S . -B build
cmake --build build -j

Run.

./build/SandScene

Controls

Calibration

Move the physical cup to the requested positions during startup so the application can calibrate the camera tracking.

Creating Art

  • 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.

Repository Structure

assets/
    sand.wav
    themes/
        sakura/
        ocean/
        aurora/
        desert/

src/
    main.cpp
    SandWorld.cpp
    SandWorld.hpp
    AprilTagInput.cpp
    AprilTagInput.hpp
    PicoInput.hpp
    Theme.hpp

Future Improvements

  • Additional themes
  • Improved artwork and cup assets
  • More sand behaviors
  • More export options
  • Packaged desktop releases
  • Performance optimizations

License

This project was created for Hack the Arts 2026.

See ATTRIBUTIONS.md for third-party libraries and assets.

About

cool sand

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages