← Back
Home › Systems › Games

physics-engine

real-time physics engine

Box2D, Jolt, PhysX

SystemTechniques · 8Primitives · 25 physics-engine Convex hull quickhullgeometry · medium: Quickhull in 2D and 3D: robust convex hulls for collision shapes and geometryGraph coloringgraphs · medium: Greedy/DSatur colouring for conflict-free assignment such as radio channelsContact manifold generationphysics · medium: Build persistent contact point sets from collision normals by clipping, with feature IDs for warm startsContinuous collision detectionphysics · medium: Time-of-impact via conservative advancement or swept shapes to stop tunnelingJoint constraintsphysics · medium: Hinge, ball, slider and motor constraints as Jacobian rows for impulse solversSequential impulse solverphysics · medium: Iterative contact solver applying impulses one constraint at a time with accumulated clamping and warm starting; the standard solver for stacking and friction in real-time physics engines.›Soft constraints substeppingphysics · medium: Soft constraints with spring-damper parameters plus substepping (TGS, Box2D soft step) for stable stacksGJK and EPAphysics · low: GJK decides whether (and how far apart) two convex shapes are from their support functions alone; EPA expands its simplex into penetration depth and normal.›Separating axis theoremphysics · low: Convex shapes are disjoint iff some axis separates their projections; testing face normals and edge crosses gives overlap, depth and contact normal.›Bounding volume hierarchyphysics · low: Binary tree of nested bounding boxes; prunes overlap and ray queries to O(log n) for any size distribution, and supports cheap insert/remove for moving objects.›Sweep and prunephysics · low: Sort box endpoints along an axis and sweep: only intervals that overlap on that axis are tested; near-linear per frame thanks to temporal coherence.›Quaternion rotationsgeometry · low: Unit quaternions as 3D rotations: 4 floats, cheap composition, no gimbal lock, plus the conversions, interpolation choices and numerical care needed in practice.›Rigid-body dynamicsphysics · low: Advance one 3D rigid body per step from force and torque: semi-implicit Euler for position, an inertia tensor in the body frame, and quaternion orientation updated by the exponential map.›Simulation islands sleepingphysics · low: Group touching bodies into islands, solve them independently and put resting islands to sleepSemi-implicit Eulernumerics · low: Update velocity from forces first, then position with the new velocity: explicit Euler cost, but symplectic and stable; the default game-physics integrator.›Ray primitive intersectiongeometry · low: Ray-triangle (Moller-Trumbore, watertight), ray-AABB slab and ray-sphere testsUnion-findgraphs · low: Disjoint-set forest with union by size and path compression; merges sets and answers same-set queries in effectively constant time.›SIMD programminghardware-os · low: Process 4-16 lanes per instruction with AVX2, AVX-512 or NEON via Rust std::arch, with runtime dispatch and a portable fallback.›Spatial hashingphysics · low: Uniform grid stored in a hash table: bucket objects by cell, test only neighbouring cells; O(n) neighbour search for many similar-sized objects such as particles.›Exact geometric predicatesgeometry · low: Robust orient and incircle tests with adaptive-precision floats (Shewchuk) or exact arithmeticFloating-point errornumerics · low: How IEEE 754 rounding error accumulates and how to contain it: compensated (Kahan/Neumaier) and pairwise summation, error-free transformations with FMA, ULP comparisons.›d-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›BFS and DFSgraphs · low: The two basic graph traversals; BFS gives hop distances and levels, DFS gives discovery/finish order for cycles, components and topological order.›+ 1 more techniques+ 9 more primitives

Similar systems

Share the most building blocks with this one.