Skip to content
v0.17.0 npm

Corpus

95 graphs, every one a file you can cook

Every graph in graphs/, cooked in the editor and shot from the frame it draws into. 77 basics, 10 examples, 8 pipeline. Each file teaches one thing and cooks from JSON alone — pcg cook graphs/<name>.json reproduces what you see here from the seed the file carries, on any machine and in any cook order.

Hover a card for the node graph behind the frame. Click to open it in the editor and change it live. The files themselves are in graphs/; the same index in prose is graphs.md.

basics · 77 graphs

One concept per file, cooked from JSON alone. These are what the node reference points at when it says a param takes a field.

basics-a-draw-that-survives-a-move cooked in the editor: keep a random draw when the point moves — 0 points, 64 instancesbasics-a-draw-that-survives-a-movekeep a random draw when the point moves12 nodes · 64 inst basics-attribute-from-noise cooked in the editor: write an attribute from a noise field — 600 pointsbasics-attribute-from-noisewrite an attribute from a noise field2 nodes · 600 pts basics-attribute-remap cooked in the editor: rescale an attribute to a new range — 400 pointsbasics-attribute-remaprescale an attribute to a new range3 nodes · 400 pts basics-colonnade cooked in the editor: a colonnade spaced along the arc, not along the parameter — 3,230 pointsbasics-colonnadea colonnade spaced along the arc, not along the parameter14 nodes · 3,230 pts · 4,160 prims basics-compose-primitives cooked in the editor: compose several primitives into a scatter — 0 points, 541 instancesbasics-compose-primitivescompose several primitives into a scatter4 nodes · 541 inst basics-connect-by-reach cooked in the editor: connect a cloud by each point's own reach — 220 pointsbasics-connect-by-reachconnect a cloud by each point's own reach4 nodes · 220 pts · 672 prims basics-copy-to-points cooked in the editor: give every copy the attributes of the point it landed on — 216 points, 216 instancesbasics-copy-to-pointsgive every copy the attributes of the point it landed on7 nodes · 216 pts · 216 inst basics-curve-shaping cooked in the editor: a mask, a decay and a compression — 6,348 pointsbasics-curve-shapinga mask, a decay and a compression7 nodes · 6,348 pts basics-density-along-a-path cooked in the editor: place an exact number of points along a path, bunched where a density says — 570 pointsbasics-density-along-a-pathplace an exact number of points along a path, bunched where a density says11 nodes · 570 pts · 1 prims basics-even-spacing cooked in the editor: enforce a minimum distance between points — 248 pointsbasics-even-spacingenforce a minimum distance between points2 nodes · 248 pts basics-extrude-polygon cooked in the editor: turn a footprint into massing — 49 pointsbasics-extrude-polygonturn a footprint into massing2 nodes · 49 pts · 25 prims basics-field-params cooked in the editor: read a field's shaping numbers from a knob — 576 pointsbasics-field-paramsread a field's shaping numbers from a knob1 node · 576 pts basics-field-shaping cooked in the editor: shape one falloff six ways — 5,766 pointsbasics-field-shapingshape one falloff six ways13 nodes · 5,766 pts basics-filter-by-attribute cooked in the editor: keep points by an attribute comparison — 79 pointsbasics-filter-by-attributekeep points by an attribute comparison3 nodes · 79 pts basics-filter-by-density cooked in the editor: thin a cloud by the density attribute — 769 pointsbasics-filter-by-densitythin a cloud by the density attribute3 nodes · 769 pts basics-filter-by-expression cooked in the editor: keep points with a predicate expression — 391 pointsbasics-filter-by-expressionkeep points with a predicate expression2 nodes · 391 pts basics-filter-primitives-by-attribute cooked in the editor: keep whole primitives by an attribute comparison — 140 pointsbasics-filter-primitives-by-attributekeep whole primitives by an attribute comparison3 nodes · 140 pts · 334 prims basics-fit-runs cooked in the editor: fit a line through each row of props, and catch the row that only looks straight — 442 pointsbasics-fit-runsfit a line through each row of props, and catch the row that only looks straight13 nodes · 442 pts · 6 prims basics-flatten-and-remember cooked in the editor: flatten a cloud onto a plane and keep the height it lost — 2,601 pointsbasics-flatten-and-rememberflatten a cloud onto a plane and keep the height it lost4 nodes · 2,601 pts basics-foreach-per-group cooked in the editor: treat each group on its own — 1,800 pointsbasics-foreach-per-grouptreat each group on its own5 nodes · 1,800 pts basics-gabriel-cells cooked in the editor: three ways to connect the same cloud — 420 pointsbasics-gabriel-cellsthree ways to connect the same cloud7 nodes · 420 pts · 1,936 prims basics-gather-by-index cooked in the editor: two hundred props each pick one of five kinds, by drawing its number — 5 points, 200 instancesbasics-gather-by-indextwo hundred props each pick one of five kinds, by drawing its number7 nodes · 5 pts · 200 inst basics-gather-on-path cooked in the editor: gather evenly spaced points into clumps along a curve — 120 pointsbasics-gather-on-pathgather evenly spaced points into clumps along a curve2 nodes · 120 pts · 1 prims basics-inline-field-params cooked in the editor: put a field's shaping numbers on knobs without a wrapper — 6,561 pointsbasics-inline-field-paramsput a field's shaping numbers on knobs without a wrapper2 nodes · 6,561 pts basics-instance-channels cooked in the editor: carry named per-instance channels to the host — 0 points, 240 instancesbasics-instance-channelscarry named per-instance channels to the host4 nodes · 240 inst basics-jitter-points cooked in the editor: break up a lattice with deterministic jitter — 256 pointsbasics-jitter-pointsbreak up a lattice with deterministic jitter2 nodes · 256 pts basics-mask-by-species cooked in the editor: let a string attribute drive a field — 600 pointsbasics-mask-by-specieslet a string attribute drive a field4 nodes · 600 pts basics-merge-points cooked in the editor: concatenate two clouds into one — 184 pointsbasics-merge-pointsconcatenate two clouds into one3 nodes · 184 pts basics-merge-primitives cooked in the editor: join an authored path to a generated network — 98 pointsbasics-merge-primitivesjoin an authored path to a generated network4 nodes · 98 pts · 82 prims basics-mesh-from-field cooked in the editor: a rock nobody modelled — 144,624 pointsbasics-mesh-from-fielda rock nobody modelled1 node · 144,624 pts · 48,208 prims basics-mesh-primitive cooked in the editor: build a mesh a saved graph can cook — 81 pointsbasics-mesh-primitivebuild a mesh a saved graph can cook1 node · 81 pts · 128 prims basics-neighborhood-count cooked in the editor: measure how crowded each point is — 700 pointsbasics-neighborhood-countmeasure how crowded each point is2 nodes · 700 pts basics-neighborhood-varying-radius cooked in the editor: measure a neighbourhood at each point's own scale — 1,200 pointsbasics-neighborhood-varying-radiusmeasure a neighbourhood at each point's own scale5 nodes · 1,200 pts basics-orient-along-path cooked in the editor: turn a path's own points to follow it — 16 pointsbasics-orient-along-pathturn a path's own points to follow it5 nodes · 16 pts · 1 prims basics-orient-along-vector cooked in the editor: turn each point to face a direction — 300 pointsbasics-orient-along-vectorturn each point to face a direction2 nodes · 300 pts basics-partition-by-attribute cooked in the editor: split one cloud into labelled groups — 300 pointsbasics-partition-by-attributesplit one cloud into labelled groups3 nodes · 300 pts basics-path-resample cooked in the editor: even out the spacing along a path — 28 pointsbasics-path-resampleeven out the spacing along a path3 nodes · 28 pts · 1 prims basics-path-segments cooked in the editor: draw a curve as solid geometry — 47 points, 47 instancesbasics-path-segmentsdraw a curve as solid geometry3 nodes · 47 pts · 47 inst basics-paths-by-group cooked in the editor: cut one cloud into several separate paths — 40 pointsbasics-paths-by-groupcut one cloud into several separate paths3 nodes · 40 pts · 4 prims basics-phyllotaxis cooked in the editor: the golden angle packs a disc — 1,600 pointsbasics-phyllotaxisthe golden angle packs a disc6 nodes · 1,600 pts basics-point-grid cooked in the editor: place points on a regular grid — 144 pointsbasics-point-gridplace points on a regular grid1 node · 144 pts basics-points-to-path cooked in the editor: build a path from a point cloud — 12 pointsbasics-points-to-pathbuild a path from a point cloud2 nodes · 12 pts · 1 prims basics-primitive-ref cooked in the editor: reference a shipped primitive by name — 409 pointsbasics-primitive-refreference a shipped primitive by name1 node · 409 pts basics-promote-attribute cooked in the editor: move an attribute between domains — 49 pointsbasics-promote-attributemove an attribute between domains3 nodes · 49 pts · 72 prims basics-props-along-a-path cooked in the editor: space props evenly along a curve — 0 points, 17 instancesbasics-props-along-a-pathspace props evenly along a curve3 nodes · 17 inst basics-quota-rebalance cooked in the editor: hold a population to a stated mix — 0 points, 400 instancesbasics-quota-rebalancehold a population to a stated mix5 nodes · 400 inst basics-radial-on-curve cooked in the editor: aim things radially around a curve — 120 points, 120 instancesbasics-radial-on-curveaim things radially around a curve3 nodes · 120 pts · 120 inst basics-repeat-until-settled cooked in the editor: run a body until it settles — 600 pointsbasics-repeat-until-settledrun a body until it settles2 nodes · 600 pts basics-report-to-the-host cooked in the editor: what a graph hands back that is not geometry — 1,681 pointsbasics-report-to-the-hostwhat a graph hands back that is not geometry7 nodes · 1,681 pts basics-reseed-a-noise cooked in the editor: make a saved noise re-roll with the graph seed — 1,936 pointsbasics-reseed-a-noisemake a saved noise re-roll with the graph seed2 nodes · 1,936 pts basics-runs-along-a-path cooked in the editor: measure distance since the last gate, and to the next one, around a closed lap — 244 pointsbasics-runs-along-a-pathmeasure distance since the last gate, and to the next one, around a closed lap10 nodes · 244 pts · 1 prims basics-scatter-along-a-path cooked in the editor: scatter a lap with as many markers as its own length asks for — 128 points, 35 instancesbasics-scatter-along-a-pathscatter a lap with as many markers as its own length asks for5 nodes · 128 pts · 35 inst basics-scatter-in-bounds cooked in the editor: scatter points in a box — 500 pointsbasics-scatter-in-boundsscatter points in a box1 node · 500 pts basics-scatter-in-world cooked in the editor: scatter points anchored to the world, not to the box — 320 pointsbasics-scatter-in-worldscatter points anchored to the world, not to the box1 node · 320 pts basics-self-similar-frond cooked in the editor: a frond made of smaller fronds — 8,420 pointsbasics-self-similar-fronda frond made of smaller fronds7 nodes · 8,420 pts · 421 prims basics-shift-along-a-path cooked in the editor: draw the chain between scattered beads, from nothing but each one's successor — 96 points, 24 instancesbasics-shift-along-a-pathdraw the chain between scattered beads, from nothing but each one's successor8 nodes · 96 pts · 24 inst basics-sightline-cull cooked in the editor: clear a line of sight by moving the props, not by deleting them — 110 points, 371 instancesbasics-sightline-cullclear a line of sight by moving the props, not by deleting them12 nodes · 110 pts · 371 inst basics-signed-distance cooked in the editor: a signed distance field, and which side of it — 12,321 pointsbasics-signed-distancea signed distance field, and which side of it3 nodes · 12,321 pts basics-six-fold cooked in the editor: one arm, six times over — 180 pointsbasics-six-foldone arm, six times over14 nodes · 180 pts · 90 prims basics-spawn-by-species cooked in the editor: spawn a different asset per point — 0 points, 400 instancesbasics-spawn-by-speciesspawn a different asset per point3 nodes · 400 inst basics-spawn-instances cooked in the editor: turn points into instance batches — 0 points, 250 instancesbasics-spawn-instancesturn points into instance batches3 nodes · 250 inst basics-spiral-stair cooked in the editor: treads winding up a helix — 504 pointsbasics-spiral-stairtreads winding up a helix7 nodes · 504 pts · 252 prims basics-stations-on-a-path cooked in the editor: read a lap's own frame and width at thirty arbitrary stations, and place markers there — 64 points, 30 instancesbasics-stations-on-a-pathread a lap's own frame and width at thirty arbitrary stations, and place markers there9 nodes · 64 pts · 30 inst basics-subgraph-exposed-params cooked in the editor: wrap a graph as one node with its own knobs — 134 pointsbasics-subgraph-exposed-paramswrap a graph as one node with its own knobs1 node · 134 pts basics-surface-sample cooked in the editor: scatter points over a mesh surface — 800 pointsbasics-surface-samplescatter points over a mesh surface2 nodes · 800 pts basics-suspension-bridge cooked in the editor: the cable sets every hanger — 196 pointsbasics-suspension-bridgethe cable sets every hanger17 nodes · 196 pts · 35 prims basics-sweep-profile cooked in the editor: put a real surface on a curve — 790 pointsbasics-sweep-profileput a real surface on a curve2 nodes · 790 pts · 1,281 prims basics-tile-an-arc cooked in the editor: tile a repeated piece over three stretches of one lap, choosing the piece once per stretch — 64 points, 48 instancesbasics-tile-an-arctile a repeated piece over three stretches of one lap, choosing the piece once per stretch10 nodes · 64 pts · 48 inst basics-tiling-a-field cooked in the editor: tile a field across the origin — 14,641 pointsbasics-tiling-a-fieldtile a field across the origin3 nodes · 14,641 pts basics-transfer-attribute cooked in the editor: read a value off a surface below each point — 400 pointsbasics-transfer-attributeread a value off a surface below each point4 nodes · 400 pts basics-transform-points cooked in the editor: move, turn and size a whole cloud — 100 pointsbasics-transform-pointsmove, turn and size a whole cloud2 nodes · 100 pts basics-two-kinds-of-bounds cooked in the editor: two things called bounds, and they are not the same thing — 131 pointsbasics-two-kinds-of-boundstwo things called bounds, and they are not the same thing4 nodes · 131 pts · 612 prims basics-under-cover cooked in the editor: measure what runs under cover, where the route passes close to itself — 384 points, 22 instancesbasics-under-covermeasure what runs under cover, where the route passes close to itself11 nodes · 384 pts · 22 inst basics-volume-scatter cooked in the editor: fill a box with points, then carve it — 0 points, 1,275 instancesbasics-volume-scatterfill a box with points, then carve it5 nodes · 1,275 inst basics-voronoi-plots cooked in the editor: a scatter becomes plots, and the plots become massing — 3,969 pointsbasics-voronoi-plotsa scatter becomes plots, and the plots become massing4 nodes · 3,969 pts · 1,971 prims basics-worley-cells cooked in the editor: colour and lift a Voronoi cell — 17,117 pointsbasics-worley-cellscolour and lift a Voronoi cell5 nodes · 17,117 pts basics-worley-feature cooked in the editor: draw the answer: every point reaches for its own cell — 4,232 pointsbasics-worley-featuredraw the answer: every point reaches for its own cell5 nodes · 4,232 pts · 2,116 prims

examples · 10 graphs

Whole scenes rather than single ideas — each one exists because something in the library only shows up at that size.

pipeline · 8 graphs

One settlement in five stages, plus three edit variants. Each stage is the previous file plus nodes and nothing removed, so the earlier stages cook bit-identically inside the later ones.