Three.js Science and Simulation Examples

Interactive 3D is a powerful way to understand science. These simulations cover astronomy (the solar system, Saturn's rings, N-body galaxy collisions and black-hole lensing), chemistry (atoms, molecules, crystal lattices and the periodic table) and biology (DNA, proteins, ecosystems and neurons).

You will also find mathematics and complex systems, including fractals, the Lorenz attractor, reaction-diffusion, cellular automata, fluid and heat simulation, erosion and traffic flow. Each page explains the equations behind the model and lets you change its parameters to see what happens, which makes them useful for teaching as well as learning three.js.

Most viewed in scientific & educational

All scientific & educational demos

28 Demos
Three.js Solar System Simulation preview
Explore Demo →

Three.js Solar System Simulation

Educational Three.js solar system simulation featuring orbital motion, planet scaling relationships, moon systems, and sun-driven dynamic lighting for space visualization.

science
Three.js DNA Double Helix (Interactive Molecular Model) preview
Explore Demo →

Three.js DNA Double Helix (Interactive Molecular Model)

Interactive Three.js DNA double helix with complementary A–T / G–C base pairs, sugar-phosphate backbones, adjustable twist and rise, and an animated unzipping strand separation.

science
Three.js Atomic Structure (Bohr Model Electron Shells) preview
Explore Demo →

Three.js Atomic Structure (Bohr Model Electron Shells)

Interactive Bohr-model atom in Three.js with a packed proton/neutron nucleus, tilted electron shells filled in aufbau order, orbiting electrons, and an optional probability cloud.

science
Three.js Crystal Lattice Viewer (SC, BCC, FCC, NaCl, Diamond) preview
Explore Demo →

Three.js Crystal Lattice Viewer (SC, BCC, FCC, NaCl, Diamond)

Explore cubic crystal lattices in Three.js — simple cubic, body-centered, face-centered, rock salt, cesium chloride and diamond — with nearest-neighbour bonds, unit-cell outline and an exploded view.

science
Three.js Wave Interference (Double-Slit Ripple Tank) preview
Explore Demo →

Three.js Wave Interference (Double-Slit Ripple Tank)

GPU ripple tank in Three.js showing constructive and destructive interference from multiple coherent point sources, with adjustable wavelength, separation, phase, damping and an intensity view that reveals nodal lines.

science
Three.js Magnetic Field Lines (Bar Magnet Visualizer) preview
Explore Demo →

Three.js Magnetic Field Lines (Bar Magnet Visualizer)

Trace magnetic field lines around bar magnets in Three.js with numerical integration, compare attracting, repelling and quadrupole arrangements, and watch particles flow from north to south.

science
Three.js Saturn Ring System (120k Keplerian Particles) preview
Explore Demo →

Three.js Saturn Ring System (120k Keplerian Particles)

Saturn's rings in Three.js as 120,000 GPU-animated particles following Kepler's third law, with the C, B and A rings, the Cassini division, the Encke gap, shepherd moons and the planet's shadow across the rings.

science
Three.js Black Hole Gravitational Lensing (Ray-Traced Shader) preview
Explore Demo →

Three.js Black Hole Gravitational Lensing (Ray-Traced Shader)

Real-time ray-traced Schwarzschild black hole in Three.js, with bent light paths, a photon ring, a Doppler-beamed accretion disk and a lensed starfield, all computed per pixel in a fragment shader.

science
Three.js Fractal Explorer (Mandelbrot, Julia, Burning Ship) preview
Explore Demo →

Three.js Fractal Explorer (Mandelbrot, Julia, Burning Ship)

Interactive GPU fractal explorer in Three.js with smooth-colored Mandelbrot, Julia and Burning Ship sets, pointer-anchored zoom, drag to pan, preset locations and a live Julia constant.

science
Three.js Molecule Viewer (PDB Ball-and-Stick) preview
Explore Demo →

Three.js Molecule Viewer (PDB Ball-and-Stick)

Three.js molecular viewer with a PDB parser, automatic covalent-radius bond detection, CPK coloring and ball-and-stick, space-filling and stick styles, with built-in molecules from water to C₆₀ and an α-helix.

science
Three.js 3D Periodic Table (118 Elements) preview
Explore Demo →

Three.js 3D Periodic Table (118 Elements)

Interactive 3D periodic table in Three.js with all 118 elements as atlas-textured tiles, category highlighting, hover details, and animated transitions between table, sphere, helix and grid layouts.

science
Three.js 3D Function Plotter (z = f(x, y, t)) preview
Explore Demo →

Three.js 3D Function Plotter (z = f(x, y, t))

Type any expression and plot z = f(x, y, t) as an animated 3D surface in Three.js, with a safe built-in expression parser, height-based color ramp, contour lines and classic presets like Peaks and the monkey saddle.

science
Three.js Fibonacci Spiral & Golden Angle Phyllotaxis preview
Explore Demo →

Three.js Fibonacci Spiral & Golden Angle Phyllotaxis

Golden-ratio phyllotaxis in Three.js — grow a sunflower head, pinecone and sphere from the 137.5° golden angle, color the Fibonacci parastichies, and build the golden-rectangle spiral.

science
Three.js Lorenz Attractor & Chaos Visualizer preview
Explore Demo →

Three.js Lorenz Attractor & Chaos Visualizer

RK4-integrated strange attractors in Three.js — Lorenz, Rössler, Aizawa and Thomas — with fading trails and several nearby trajectories that show sensitive dependence on initial conditions.

science
Three.js Fluid Simulation (Stable Fluids, Navier–Stokes) preview
Explore Demo →

Three.js Fluid Simulation (Stable Fluids, Navier–Stokes)

Real-time 2D Navier–Stokes fluid in Three.js using Jos Stam's Stable Fluids with vorticity confinement, three colored dye channels and a 3D height-field, plus shift-drag to stir.

science
Three.js Predator–Prey Ecosystem Simulation preview
Explore Demo →

Three.js Predator–Prey Ecosystem Simulation

Agent-based ecosystem in Three.js where rabbits graze regrowing grass and foxes hunt them, producing Lotka–Volterra-style population cycles shown on a live chart.

science
Three.js Traffic Flow Simulation (Phantom Traffic Jams) preview
Explore Demo →

Three.js Traffic Flow Simulation (Phantom Traffic Jams)

Ring-road traffic in Three.js using the Intelligent Driver Model, where tiny perturbations grow into stop-and-go phantom jams, shown with speed-colored cars and a live space–time diagram.

science
Three.js Spiking Neural Network (Leaky Integrate-and-Fire) preview
Explore Demo →

Three.js Spiking Neural Network (Leaky Integrate-and-Fire)

3D spiking neural network in Three.js built from leaky integrate-and-fire neurons, with excitatory and inhibitory cells, distance-based wiring and action potentials traveling along axons at finite conduction speed.

science
Three.js Genetic Algorithm (Evolving Smart Rockets) preview
Explore Demo →

Three.js Genetic Algorithm (Evolving Smart Rockets)

Watch a genetic algorithm evolve 3D rockets to fly through obstacles to a target in Three.js, using fitness-proportional selection, single-point crossover, mutation and elitism.

science
Three.js Conway's Game of Life 3D (Cellular Automata) preview
Explore Demo →

Three.js Conway's Game of Life 3D (Cellular Automata)

Cellular automata in Three.js — Conway's Game of Life stacked through time as a 3D sculpture, plus true 3D Life rules (Bays 4555, 5766, Clouds, crystal growth) over a 26-cell neighbourhood.

science
Three.js Reaction–Diffusion (Gray–Scott on the GPU) preview
Explore Demo →

Three.js Reaction–Diffusion (Gray–Scott on the GPU)

GPU Gray–Scott reaction–diffusion in Three.js using ping-pong render targets, with coral, mitosis, maze and soliton presets, an F × k parameter map, paint-to-seed and a seamless torus display.

science
Three.js Diffusion-Limited Aggregation (Fractal Growth) preview
Explore Demo →

Three.js Diffusion-Limited Aggregation (Fractal Growth)

3D diffusion-limited aggregation in Three.js where random walkers stick to a growing cluster, producing frost-, coral- and lightning-like fractals from a point, a ground plane, a disc or a line seed.

science
Three.js N-Body Gravity Simulation (Galaxy Collision) preview
Explore Demo →

Three.js N-Body Gravity Simulation (Galaxy Collision)

Direct-summation N-body gravity in Three.js with leapfrog integration and Plummer softening, covering colliding disk galaxies, a rotating disk, an equilibrium Plummer sphere and cold collapse, with live energy and virial diagnostics.

science
Three.js LIDAR Point Cloud Viewer (LAS, PLY, XYZ) preview
Explore Demo →

Three.js LIDAR Point Cloud Viewer (LAS, PLY, XYZ)

Point cloud viewer in Three.js with a synthetic airborne LIDAR scan and local LAS, PLY and XYZ loading, offering elevation, ASPRS classification, intensity and RGB coloring, class filters and height clipping on the GPU.

science
Three.js Vector Field Streamlines (Tornado, ABC Flow, Double Gyre) preview
Explore Demo →

Three.js Vector Field Streamlines (Tornado, ABC Flow, Double Gyre)

General 3D vector-field tracer in Three.js with RK4 streamlines, flowing dash animation, arrow glyphs and advected particles, covering a Burgers vortex, chaotic ABC flow, point charges, the time-dependent double gyre and a linear saddle.

science
Three.js Heat Diffusion Simulation (Heat Equation PDE) preview
Explore Demo →

Three.js Heat Diffusion Simulation (Heat Equation PDE)

Heat equation simulation in Three.js with spatially varying conductivity across copper, steel, insulators and air, Dirichlet or insulated boundaries, isotherms, a 3D temperature relief and shift-drag painting.

science
Three.js Hydraulic Erosion Terrain Simulator preview
Explore Demo →

Three.js Hydraulic Erosion Terrain Simulator

Particle-based hydraulic erosion in Three.js where hundreds of thousands of raindrops carve gullies and lay down sediment fans on a procedural heightmap, with thermal slumping and visible droplet paths.

science
Three.js Protein Molecular Surface (Marching Cubes) preview
Explore Demo →

Three.js Protein Molecular Surface (Marching Cubes)

Molecular surface of a synthetic folded protein in Three.js, built as a Gaussian density isosurface with MarchingCubes and colored by electrostatic potential or hydrophobicity from a 3D texture, with a rainbow backbone inside.

science