Skip to content
/ spawn2d Public

Uniform sampling in combined shapes with overlap handling and distance constraints. (~300 LOC, C11)

License

Notifications You must be signed in to change notification settings

Geolm/spawn2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Uniform sampling in combined shapes with overlap handling and distance constraints. (~300 LOC, C11)

Topics

Resources

License

Stars

Watchers

Forks