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
Educational Three.js solar system simulation featuring orbital motion, planet scaling relationships, moon systems, and sun-driven dynamic lighting for space visualization.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.