Pattern API

Main Functions

See Public API for blob_pattern.

Internal Functions

Blob Placement

BlobBoards.place_blobs — Function
place_blobs(rng::MersenneTwister, pattern_size::Size2{<:VgcQuantity}, blob_counts; kwargs...) -> Vector{Disc}

Place isotropic blobs without overlap using an R-tree for fast collision checks. Larger scales are placed first to improve packing. Returns a vector of placed blobs.

Internally uses an R-tree with index-only storage (like NMS) for efficient spatial queries.

Keyword arguments

  • α=1.2: sampling bias parameter
  • max_trials=20000: per-blob insertion trial cap
  • cutoff: Gaussian truncation radius multiplier (in units of σ)
  • raster_aligned=false: align blob centers to raster grid. This low-level default is NOT what patterns use: blob_pattern, PatternConfig and blob_board default to true (2026-07-28) and always supply it explicitly (as they supply max_trials, default 5000 there).
source

Scale Calculation

The following internal functions handle scale distribution:

  • calc_blob_scales(min_scale, max_scale; scales_per_octave = 3) - The scale ladder from the smallest to the largest σ (px), both exact, evenly spaced in log
  • calc_scale_counts(pattern_size, scales; ...) - Calculate blob counts per scale

Rendering

  • render_blob!(pattern, blob; extent) - Render a single Gaussian blob to the pattern image