# gpu-io Examples

gpu-io is a GPU-accelerated computing library for physics simulations and other mathematical calculations. This page contains a series of interactive examples applications that demonstrate key capabilities of the library.

gpu-io source code: github.com/amandaghassaei/gpu-io

examples source code: github.com/amandaghassaei/gpu-io/examples

## Grid-Based Simulations

### Reaction Diffusion

This app simulates a simple reaction-diffusion system, where two virtual chemicals interact to create dynamic patterns. Similar systems were proposed by Alan Turing in 1952 as a mechanism for pattern formation in plants and animals. This reaction-diffusion system is particularly sensitive to two parameters: K (varies along x-axis) and F (varies along y-axis). You can interactively explore regions of K,F parameter space by zooming and panning across the screen.

## Particle + Grid Simulations

### Physarum Transport Network

This app simulates the network effects of a multicellular slime mold (Physarum polycephalum), based on a 2010 paper by Jeff Jones: "Characteristics of pattern formation and evolution in approximations of Physarum transport networks" and work by Sage Jenson. In this simulation, simple particle "agents" interact with an underlying field of chemical attractants to form complex, emergent behaviors.

### Fluid Simulation

This simulation solves the Navier-Stokes equations for incompressible fluids. The fluid visualization includes thousands of Lagrangian particles that follow the velocity field and leave behind semi-transparent trails as they move.

## ThreeJS

### 2D Wave Equation

This app simulates the 2D wave equation and renders the resulting height field as a 3D mesh Additionally, it simulates realtime caustics formed by light shining through the 3D surface and renders the result as a texture (method described in more detail by Evan Wallace). All computations are performed in gpu-io and the results are passed to Threejs without ever leaving the GPU.

## Simple Examples

### Conway's Game of Life

The 1-bit cellular automaton Conway's Game of Life.

### Julia Set Fractal

This app renders 2D Julia set fractals for a variety of input parameters.