Skip to content

Substrate (Tarbell Crack Growth) #61

Open

Description

@jasonwebb

Here is a standardized section for the Substrate Algorithm, formatted to fit directly into your Growth Algorithms section alongside models like Differential Growth, DLA, and Physarum.


A procedural 2D line-drawing algorithm created by Jared Tarbell that simulates crack propagation and stress relief. Crack fronts travel across a plane in straight or slightly drifting lines until they intersect an existing crack line, at which point they stop, form a perpendicular $90^\circ$ T-junction, and trigger new cracks to spawn along their path.

Key Characteristics & Behaviors:

  • Path Termination: Cracks stop propagating immediately upon colliding with another crack line, naturally generating enclosed polygonal cells (craquelure/dry glaze aesthetic).
  • Perpendicular Spawning: New crack branches emerge at right angles ($90^\circ$) from existing lines, mimicking mechanical shear relief along structural weakness planes.
  • Non-Physical Heuristic: Does not calculate stress tensors or continuum physics; relies purely on directional vectors, spatial lookup grids, and collision queries for blazingly fast execution.

Algorithmic Definition:

  1. Initialization:
    1. Create a 2D spatial lookup grid (or canvas pixel map) to track cracked vs. uncracked space.
    2. Seed an initial array of crack agents with a 2D position $(x, y)$ and a direction angle $\theta$. Mark their starting positions as cracked in the spatial grid.
  2. Per-Tick Agent Update (for each active crack tip):
    1. Calculate the next candidate step position: $\vec{p}_{next} = \vec{p} + \begin{bmatrix} \cos(\theta) \\ \sin(\theta) \end{bmatrix} \cdot v$ (where $v$ is step velocity/step size)*.
    2. (Optional) Add a small amount of angular drift ($\theta \leftarrow \theta + \Delta\theta$) to introduce organic curvature or simulate local material grain.
    3. Query the spatial grid at $\vec{p}_{next}$:
      • If uncracked: Mark $\vec{p}_{next}$ as cracked in the spatial grid, update agent position $\vec{p} \leftarrow \vec{p}_{next}$, and draw a segment line.
      • If cracked (Collision Detected): Terminate the active crack agent (stop updating it).
  3. Branching & Spawning (Per-Tick or Event-Driven):
    1. Select a random previously drawn crack line point $\vec{p}_{source}$.
    2. Check if the maximum number of simultaneous active cracks has been reached. If not, spawn a new crack agent at $\vec{p}_{source}$.
    3. Set the new agent's direction angle $\theta_{new}$ to be perpendicular to the tangent of the parent line at $\vec{p}_{source}$ ($\theta_{parent} \pm 90^\circ$).
  4. Optional Constraints & Variations:
    • Sand Painting / Color Infill: As crack tips move, draw fine perpendicular color gradient lines extending sideways to shade the "cracked regions" (the classic Jared Tarbell visual style).
    • Variable Angle Deviation: Allow spawning angles to fluctuate around $120^\circ$ instead of $90^\circ$ to emulate uniform shrinkage networks (drying mud/basalt columns).
    • Curved Substrates: Map the 2D grid/collision lookups onto UV space or 3D mesh surfaces to simulate organic surface cracking on complex volumes.

Here is a curated collection of key links, open-source repositories, influential generative artworks, and environment-specific add-ons for the Substrate Algorithm and procedural crack/fracture simulation.

Key Links & Articles:

Code Repositories & Implementations:

Notable Art Projects:

Add-ons & Libraries for Creative Coding Environments:

  • Processing (Java)
    • HE_Mesh (by WBLUT) — High-performance 3D mesh library for Processing; includes native support for Voronoi cell slicing, dynamic plane clipping, and mesh fragmentation.
    • toxiclibs — Includes toxi.geom.mesh for splitting 3D geometries and toxi.physics for mass-spring lattices that break under tension.
  • p5.js / JavaScript
    • d3-delaunay — Blazingly fast 2D Voronoi and Delaunay calculations used to generate instant impact fractures and polygonal tiles.
    • Matter.js — Standard 2D physics engine for JS; pair it with procedural crack paths to break single rigid bodies into interactive physics-driven shards.
  • Houdini
  • Blender
    • Blender Cell Fracture Addon — Built-in Blender addon that uses Voronoi noise and point clouds to shatter meshes into distinct 3D fragments.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions