silly-demos
Small geometry and simulation sketches. The math runs in Rust compiled to WebAssembly; the browser only draws.
- Boids A flock that emerges from three local steering rules: keep your distance, match heading, stay together.
BoidsSim::step - Collision lab Pick two shapes and compare the collision tests that fit them: clamping, separating axes, GJK and EPA, with their costs.
CollisionLab::run - Inverse kinematics A jointed arm reaching for a target, solved with FABRIK, CCD or the Jacobian, with the error and iterations each needs.
IkChain::solve - Point to segment The shortest distance from a point to a line segment, and which side of the line the point is on.
GeometryTests::point_line_test - Rover exploration A rover with a laser scanner maps a floor plan it has never seen, clearing the fog of war frontier by frontier, then drives home.
RoverLab::step - Voronoi / Delaunay Moving points with their Delaunay triangulation and the Voronoi diagram it implies.
VoronoiTests::voronoi_edges