💥 Solid Body Fracture — Voronoi Impact

Click anywhere on the solid to strike it with an impactor. The object shatters along Voronoi cell boundaries — the natural way to partition space into nearest-seed regions — and each fragment flies away carrying the impulse from the impact point. The technique (pre-fracture using Voronoi + rigid-body dynamics) is the industry standard for real-time destruction in video games and visual effects.

🇺🇦 Українська

Setup

Shape & Material

Controls

Click on solid to fracture

Stats

StateIntact
Fragments
KE total
Time
Voronoi fracture:
1. Generate N seeds
2. Assign each pixel to nearest seed
3. Extract cell polygons
4. On impact: apply outward impulse ∝ 1/r²
5. Fragment RBD step

Physics of Brittle Fracture

Brittle fracture occurs when the local stress intensity factor K exceeds the material's fracture toughness KIc. Cracks propagate along paths of maximum tensile stress, releasing stored elastic strain energy. The Griffith criterion states that a crack of length 2a grows when σ ≥ √(2Eγ / πa), where γ is the surface energy. Voronoi pre-fracture gives statistically isotropic crack patterns that mimic random microstructural grain boundaries in polycrystalline materials.

About this simulation

This simulator fractures a virtual solid with a raster-based Voronoi tessellation: N seed points are scattered inside the chosen shape (rectangle, circle or hexagon), then every pixel of a fine grid is assigned to its nearest seed, carving the solid into convex cell regions. Each cell's boundary pixels are turned into a polygon fragment with a monotone-chain convex hull algorithm. Clicking the intact solid fires a single impact: every fragment receives an outward impulse imp = force / (0.002·d² + 1), where d is its distance from the impact point, plus a small random spin and a slight upward kick. Freed fragments then fall under adjustable gravity until they drop far enough below the canvas to be removed.

🔬 What it Shows

A Voronoi-tessellated solid in one of three materials — glass (many fine cells), stone (fewer, chunkier cells), and metal (the fewest, plate-like cells) — that instantly shatters into its constituent polygon fragments the moment it is struck, each one flying outward from the impact point at a speed set by its distance and the impact force.

🎮 How to Use It

Click the intact solid to fracture it, or click again once it has broken to reset. Use Fragments N, Gravity, Restitution and Impact force to tune the setup, and the Shape and Material dropdowns to change the outline and crack style before pressing New geometry to regenerate the Voronoi seeds.

💡 Did You Know?

The mathematical basis for brittle fracture used in the sidebar equation — the Griffith criterion, σ ≥ √(2Eγ/πa) — was published by A. A. Griffith in 1921 after he tested glass fibres and found that thinner fibres were disproportionately stronger, because they contained fewer of the microscopic flaws from which cracks start.

Frequently asked questions

How is the Voronoi fracture pattern generated without a mesh library?

The simulator scatters N random seed points inside the chosen outline, then rasterises a fine grid (up to 160×140 cells) and assigns every grid cell to whichever seed is nearest, using plain squared-distance comparisons. Grid cells on the border between two different seeds' regions are collected as boundary points for that seed, and a monotone-chain convex hull algorithm turns those boundary points into the polygon used to draw and move each fragment. This raster approach avoids implementing a full geometric Voronoi algorithm like Fortune's sweep-line method while still producing convincing cell shapes.

Why do glass, stone, and metal shatter into different numbers of pieces?

The Fragments N slider sets a base seed count, but each material scales it down before building the tessellation: glass keeps the full N seeds (many small shards), stone uses roughly N/3 (fewer, chunkier pieces), and metal uses roughly N/4 (the fewest, largest plate-like fragments). This mirrors how brittle materials with different microstructures tend to break into characteristically different fragment sizes.

What formula controls how far each fragment flies after impact?

On impact every fragment computes its squared distance d² from the click point and receives an outward impulse imp = force / (0.002·d² + 1), scaled by a random factor between 0.7 and 1.3 so fragments do not all move in lockstep. That impulse is split into vx and vy components along the line from the impact point to the fragment's centre, with a fixed additional upward kick (−0.2×force) subtracted from vy so debris tends to fly up and out rather than only sideways.

Do fragments collide with each other or the ground after they break free?

They bounce off the ground, but not off each other. Each fragment is an independent rigid body: gravity accelerates it downward, it spins at the rate set at the moment of impact, and when its lowest rotated vertex reaches the floor line the contact applies Newton’s restitution law — the normal velocity reverses and is multiplied by the Restitution coefficient e, so each bounce keeps a fraction e² of its vertical kinetic energy (e = 1 perfectly elastic, e = 0 fully plastic), plus a tangential loss that slows sliding and spin. Fragment-fragment collision detection is still not modelled, so pieces resting on the floor can overlap each other.

How does this relate to the Griffith criterion for brittle fracture?

The sidebar equation σ ≥ √(2Eγ/πa) is the Griffith criterion: a crack of half-length a in a material with Young's modulus E and surface energy γ will grow once the applied stress σ reaches that threshold, because propagating the crack releases more stored elastic energy than it costs to create new crack surface. The simulator does not solve this equation directly — instead its pre-computed Voronoi cell boundaries stand in for the statistically random microcrack network a real brittle material would follow once the Griffith threshold is exceeded at the impact point.