Gallery › Generative and L-systems
Firefly Census
A meadow after dark in which every mark is placed by artkit's scatter, and none by hand.
How it is made
The star field is a weight procedure (a Milky Way band times coherent noise2), the hill's stipple is scattered into the silhouette's own outline captured with scpath, the meadow is minimum-spaced grass anchors whose height and tone come from their own height on the page, and the fireflies are two passes over one seed: halos first, then cores, so every core lands inside its own halo.
Details
- Category
- Generative and L-systems
- Tags
- landscape
- Libraries
- artkit
- Added
- 2026-08-30
- Built in
- issue #48
- Page size
- 640 × 800 points
Source
View source the whole program in a scrolling window, or read gallery/firefly_census.ps on GitHub. To draw it yourself, from a checkout of the repository:
pscat --page 640x800 gallery/firefly_census.ps
The first 40 of 208 lines of the source
%!PS-Adobe-3.0
%%Title: Firefly Census
%%BoundingBox: 0 0 640 800
%%Creator: Claude & a nostalgic LaserWriter fan
%%EndComments
% A summer field after dark, drawn entirely as distributions. Every
% mark on this page is placed by artkit's scatter (issue #48) -- not a
% single hand-positioned star, blade, or firefly anywhere -- so the
% piece is really a demonstration that the *shape* of a distribution
% carries as much of a picture as the marks in it do.
%
% Four scatters, each using a different one of scatter's controls:
%
% the sky a /Weight procedure: a Milky Way band (a soft
% falloff off a diagonal axis) multiplied by coherent
% noise2, so the star density thickens along the band
% and clumps within it instead of drifting evenly
% the hill scpath: the silhouette's own outline becomes the
% region, so its stipple texture stops exactly at the
% ridgeline with no clipping and no wasted candidates
% the meadow /MinSpacing: blade anchors are pushed apart so the
% grass reads as a stand of individual plants rather
% than a random pile, and each blade's height comes
% from its own y (nearer grass is taller)
% the flies /Seed plus a clustering weight: fireflies gather in a
% few drifting knots, and the halo pass and the core
% pass are two scatters sharing one seed, so every
% core lands exactly in the middle of its own halo
%
% One caveat worth knowing if you re-render the committed still: the
% hill's region comes from a *curved* silhouette, and flattenpath's
% tolerance is a fixed fraction of a device pixel, so capturing it
% under the gallery's 2x supersample yields a slightly different chord
% set than a 1x run does. Its stipple therefore lands in a slightly
% different (equally seeded, equally reproducible) arrangement at the
% two scales -- invisible among 6000 texture dots, but it means this
% one piece's still is not a strict pixel-doubling of its 1x render
% the way a straight-edged piece's is. Everything else on the page --
% the sky, the meadow, the fireflies -- scatters over rectangles and