/WavesInABox

Primary LanguageCMIT LicenseMIT

WavesInABox

A wavefront simulator and artwork in one.

Animation

Description:

WavesInABox is an artwork that explores the border between chaos and order in a surface of water.Imagine a body of water enclosed in a box. If the water is touched a wave will be created. This wave will travel through the water until it hits the wall. When this happens it will reflect and interact with other waves. Will the result be orderly patterns or disorderly movement.

WavesInABox is a real-time wavefront simulator written from scratch. The simulation can be viewed in 3D. The simulation uses the finite difference method to simulate the wave equation in two dimensions. Solving the wave equation is gpu-accelerated using OpenGL compute shaders.

Interaction

Move camera using <a> <w> <s> <d>.

Increase/decrease Damping with <spacebar> / <backspace>

Add/remove wave source <left mouse> / <right mouse>

Building from source

To build the project for ubuntu:

  1. Install depedencies
sudo apt install libglfw3-dev libgles2-mesa-dev libegl1-mesa-dev libstb-dev libglm-dev
sudo apt install build-essential
  1. Install cglm library (https://github.com/recp/cglm)
  2. Build Source Code
cd WavesInABox
make

Dependencies