Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 586 Bytes

File metadata and controls

23 lines (16 loc) · 586 Bytes

spawn2d

Uniform sampling in combined shapes with overlap handling and distance constraints.

demo


Features

  • Uniform sampling in aggregated shapes (combination of multiple shapes)
    • discs
    • axis-aligned bounding boxes (AABB)
    • oriented bounding boxes (OBB)
    • ellipses
  • Exclusion shapes
  • Optional minimum-distance constraint
  • Uniform sampling along a Catmull-Rom spline with adjustable width
  • Deterministic RNG (SplitMix32)
  • C11, no dynamic allocation, no external dependencies
  • Only two functions in the API