coal Solver Playground

live wasm View library on GitHub

The real coal::collide / coal::distance / coal::computeContactPatch — the exact GJK/EPA collision library (compiled to WebAssembly, running right here, no server) — for every pair of coal's primitive shapes. Pick two shapes, pose shape B in 6 DoF, hit Solve, and inspect the witness points/normal/signed gap-depth, the actual contact manifold when colliding (point, line, or 4-point surface patch), and (for GJK/EPA pairs) the exact final simplex the algorithm converged on.

Shapes

Body B pose

Translation
tx0.00
ty0.00
tz0.84
Rotation — roll / pitch / yaw (deg)
roll
pitch
yaw

Solve

Not solved yet.

GJK / EPA diagnostics

Solve a pair to see this.

shape A (solid) shape B (solid)

Solid bodies are the true pose. When colliding, red/blue dots show the actual contact manifold from coal's contact-patch solver, not just a single closest-point pair: a genuine point contact draws 1, an edge/line contact draws its 2 endpoints, and a face/face contact draws 4 points spanning the patch (the maximum-area 4-point subset of the true polygon) — with the same green normal at every one of them, since a patch has exactly one normal by construction. Separated pairs fall back to the single closest-point pair instead.

Yellow markers are the final GJK simplex's support points (each a pair: one on shape A, one on shape B, joined by a thin line) — up to 4 of them, exactly what GJK converged on. Violet marks EPA's closest polytope face (only appears when the pair is actually penetrating and EPA had to run). Plane/Halfspace pairs never show a simplex — coal resolves those in closed form, without GJK.

Drag to orbit · scroll or pinch to zoom.