Falling Sand Simulation

Simulation Demo

Overview

This Falling Sand simulation is implemented using p5.js, providing an interactive environment where particles mimic the behavior of falling sand. Users can interact with the simulation, changing parameters, adding or removing sand, and toggling the simulation on/off.

Features

  • Interactive Canvas: Users can draw and manipulate sand particles on the canvas using the mouse.
  • Sand Logic: The simulation follows a basic sand logic where particles fall and may spread horizontally upon obstacles.
  • User Controls: Users can change simulation parameters, and brush size, and toggle the simulation on/off.
  • Visual Feedback: The grid is visually represented with different hues, providing a dynamic and visually appealing display.

Getting Started

Prerequisites

  • Web browser with JavaScript support

Running the Simulation

  1. Clone the repository:

    git clone https://github.com/realbakari/Falling-Sand-simulation.git