$ show prideout/par
par is a collection of single-file C libraries, stb-style, focused primarily on graphics, geometry, and utility functionality. The code is not an end-user application; each header is the unit of delivery. To use a library, a consumer defines the corresponding IMPLEMENTATION macro before including the header, which expands the implementation into one translation unit. This imposes a straightforward integration model for C and C++ projects. Core shipped capabilities include procedural mesh generation (par_shapes), triangulation of streamlines and curves (par_streamlines), blue-noise sampling via recursive Wang tiles (par_bluenoise), circle packing for hierarchical bubble diagrams (par_bubbles), camera controls, easings, file caching with optional LZ4 (par_filecache), string blocks, spatial pruning (par_sprune), and an experimental marching-squares image-to-mesh converter (par_msquares), which the README explicitly marks as unmaintained. The test suite is unusually thorough for a header library: it builds with CMake, runs under gcc and clang through Travis CI, checks C/C++ linkage, and uses vendored LodePNG, LZ4, SDS, and cgltf to validate outputs and exercise edge cases. Though not a data-research repository, several algorithms are grounded in published research (e.g., Kopf recursive Wang tiles, Wang circle packing) and are implemented with reusable, self-contained patterns. The main risks are drift in vendored third-party code, some POSIX assumptions that can hamper Windows portability, and the deprecated par_msquares component. Overall, the code demonstrates strong craftsmanship in the single-header genre.
The LLM identified 5 files worth highlighting for reuse:
Converts arbitrary line segments, streamlines, and cubic curves into triangle meshes with flatness-controlled tessellation. Includes Poisson disk sampling for seed placement and a dynamic array macro set. Self-contained and can be dropped into rendering, scientific visualization, or game projects with minimal modification.
Generates parametric surfaces, cylinders, spheres, boxes, rocks via simplex noise, and L-system plant geometries; provides welding, normal computation, AABB, and OBJ export. Widely reusable for 3D asset generation without external dependencies.
Implements recursive Wang tiles for real-time blue noise sample generation, based on Kopf et al. 2006. Self-contained, deterministic, and suitable for rendering, lighting, stippling, and other sampling-heavy graphics tasks.
Packs circles for hierarchical bubble charts using a Wang-style circle-packing algorithm, including smallest enclosing disk and Apollonius problem solvers. Supports culling and picking, making it reusable in data visualization toolkits and dashboard renderers.
Provides disk-backed file caching with optional LZ4 compression and simple retrieval APIs. Useful for asset pipelines, build tools, or any C project that needs a lightweight cache layer without pulling in a large framework.