How a hash becomes a landscape
Every landscape here is a function of 256 bits. Text goes in, SHA-256 turns it into a hash, and the hash is read, field by field, as the shape of a ridge, the fork of a branch, the angle of the sun. Nothing is random and nothing is trained: the same words always draw the same picture, byte for byte.
The nine works below show the core of the method, one formula at a time. Each figure is drawn by this page, from the formulas on its placard, with fixed values in place of hash bits. The edge cases live in the full specification.
The ridge
Constrained midpoint displacement · Mountains, bits 48–135
A ridge starts as three points. Then every segment AB is split at its midpoint M, and the midpoint is pushed sideways, perpendicular to AB, by an amount the hash chooses. Each level halves the segments and adds finer detail: the coarse bits set the mountain, the fine bits its texture.
The push is bounded to a tenth of the segment, and narrowed on steep segments so the new point stays between its parents. The ridge can never fold back over itself. The bits are mapped into the allowed range rather than clamped after, so two hashes never collapse to one ridge.
- The push, perpendicular to AB. With r = 0.1, |t| ≤ 1 keeps P within 10% of the segment's length, with no square root.
- On steep segments the range narrows, so P stays strictly between A and B from left to right (γ = 0.5).
- The b bits for this point, read as a number v, spread evenly across the allowed range.
The split
The incoming slope · no bits; it follows the silhouette
A flat fill reads as a paper cutout. Real peaks have faces: the slope that catches the sun and the slope that turns away. So each sharp peak sends a line down into the mountain, toward the viewer, and that line splits the ridge into a lit half and a shaded half.
Only real peaks qualify: a rise into a fall that turns by more than 25°, tested without a square root. The cut always lies between the two slopes that meet at the peak; the peak's own height decides where.
- With u = b − a and v = c − b, the path turns at b by more than α (or u · v < 0). For peaks, α = 25°.
- The cut's direction: a blend of the two slopes, a − b and c − b, each scaled so its larger component is 1.
- Where between them, from the peak's height bh: kept away from both slopes, so a face never collapses to a sliver.
The facets
Triangulating the rock · no bits; the digits of π
Bare rock is faceted. Columns run down from the silhouette, leaning with the nearest peak's cut, and rows follow the silhouette down to the base, so the mesh lines up with the faces of Room II. Each cell splits into two triangles.
The points are nudged a little and given depth by the digits of π, so the mesh is irregular yet the same every time. Then each triangle is lit: a step lighter if it faces the sun, a step darker if it turns away, and left alone in between.
- How strongly a peak at px steers the column at x; a straight-down pull of weight 0.3 is added to the sum.
- The signed squared cosine between a triangle's normal n and the light: Lambert's law, with no square root. Above 0.4 a facet lightens; below 0.05 it darkens.
- The light comes from the sun's side and from above, using the sun of Room VI.
The tree
Recursive forks · Trees, bits 176–223
Every tree grows from a trunk by forks. A fork splits a branch into a large child, which carries on, and a small one, which turns away. The split ratio r sets their shares, and from it their angles and lengths: the more even the split, the wider the fork.
The first forks come from the hash. When its bits run out, the tree keeps growing by rule, stepping each new fork by the golden ratio so no two forks repeat in lockstep. The rotations themselves use a rational form of the angle, so no sine or cosine is ever computed.
- A rotation from t, the tangent of half the angle: exact, and with no trigonometry.
- The large child tilts by about 90°(1 − r), the small one by about 90°·r, to opposite sides. At r = 0.5 both are 45°.
- Fork k past the hash's own reuses an earlier fork's value u, shifted by the golden ratio; {·} keeps the fractional part.
The placement
Composition and scatter · Trees, bits 176–223; Vegetation, bits 224–247
Trees are not sprinkled at random. Their count and arrangement fix a composition, as a painter would: a leader at the center of a grove, members overlapping around it, one tree standing apart, and a straggler once the hill holds five or more. Open hillside is left on purpose.
Grass, petals, rosettes, or fallen leaves then fill the ground the trees leave. Each plant picks a gap between two trees, settles near its middle, and lands at a depth drawn so that more of them crowd the far rim, the way receding ground holds more in less space. Near ones grow larger, in the trees' perspective.
- The grove's center, from the arrangement bits a and the hill h. The isolated tree stands 0.38W away, on the side with more room.
- Across a gap between trees: the difference of two uniform draws peaks in the middle and thins to nothing at each trunk.
- Down the slope, from just below the rim R to the canvas bottom. The fourth power packs plants toward the rim and keeps the front open.
Sun and moon
An angle without trigonometry · Celestial, bits 40–47; Global, bits 0–1
Neither is ever drawn. Eight bits place the light, four for its direction around the ground and four for its height, and the scene shows it only through what it lights: faces, warm skies, and long shadows falling toward the viewer. In one scene in four it is night, and the moon takes the sun's place on the same angles: the same shadows and faces, in moonlit colors. By day, the two daylight bits nudge the sun on by thirds of a step.
Its angles are turned into vectors without sine or cosine. A line through (−1, 0) with slope q meets the unit circle at exactly the point at angle α, so a table of q values, given to four decimals, yields shadow directions of exactly unit length. The same answer comes out on every machine.
- Azimuth from the left, turning behind the scene, and elevation above the ground. The daylight value d is 0 to 2 by day; at night (d = 3) the moon keeps the plain steps.
- The shadow's direction on the ground, away from the sun: the circle's rational parametrization.
- Shadow length per unit of height, also from a table: 2.75 for the lowest sun, 0.47 for the highest.
The shadow
Casting onto a curved hill · no bits of its own; it reads the sun
The front hill is a surface, not a flat backdrop. At depth f = 0 it follows the crest; toward the bottom of the canvas it flattens out. Each tree stands somewhere on it, and its trunk and branches are cast onto it, point by point, along the sun's direction.
Every tree shares one direction and one length per unit of height, so on the ground all shadows are parallel. On the canvas they are not: a tree near the rim casts a steep shadow down the slope, a tree near the bottom a flat, sideways one.
- The ground's height at depth f, from the silhouette S: it hugs the crest at the top and settles toward the bottom.
- Where a point a height z above the tree's base lands. Its height on the canvas is H(x′, f′).
- A tree's base depth, solved by bisection: 50 halvings of the interval [0, 1].
The cloud
Five points, three refinements · Sky, bits 16–31
Sixteen bits set a trapezoid: where it sits, how wide and tall, how skewed. The top edge is always the longer, so clouds are flat-bottomed and wide. Five points are placed around its edge, one in each fifth of the way around.
Then the outline is refined three times. Between every pair of neighbors, four new points are dropped inside a narrow rhombus, so the edge gains billows at three scales without ever leaving the trapezoid. 5 points become 625, joined by smooth curves and softened by a blur.
- Point i's distance around the perimeter P, starting from the top left; ui is a fixed scramble of the bits.
- How far a new point, a fraction t of the way from A to B, moves sideways: at most 15% of |AB| in the middle, nothing at the ends. That is the rhombus.
- A Gaussian blur, scaled to the cloud's width W, melts the edge into the sky.
The palette
Color in a perceptual space · Mountains, Sky, Hills, Trees, Vegetation, Fog
Colors are chosen in OKLCH, a color space built so that equal steps look like equal steps: lightness L, chroma C, hue h. Each biome owns a family of hues: slate blues for Alpine, teal fading to blue for Temperate, lavender for Tundra, ochre and sand for Desert. A ridge's bits pick one shade within it.
Depth is kept by lightness alone. Each ridge has its own band, darkest in front and palest at the back, and the bands never overlap, so whatever the bits choose, the nearer mountain is darker, as haze makes it in the real world. And every one of the 256 shades must still be a distinct color once rounded to #RRGGBB, which the build checks.
- One of 8 even steps within the ridge's lightness band; hue takes 8 steps and chroma 4, for 8 × 8 × 4 = 256 shades.
- Disjoint bands, [0.30, 0.48], [0.51, 0.65] and [0.68, 0.77]: depth order survives every choice of bits.
- The sky: 8 bits make 256 light blues, from 2 bits of lightness l, 3 of chroma c and 3 of hue k. A low sun then warms them.
Notes
[1] Authorship: the design prompts behind these rooms
The algorithms in these rooms were designed by Hyunwook Shin, in conversation with Claude, an AI model by Anthropic, between October 18 and 21, 2026. The author set each rule: what the bits must preserve, how a ridge subdivides, how a tree forks, where the light comes from, how a cloud is built, and then judged every render and sent it back until it looked right. Claude worked out the remaining details, wrote the code and the wording of the specifications, and wrote this page. The full history is public in the commit log.
The author's prompts below are quoted verbatim, typos included, so the attribution can be checked. Long messages are excerpted; … marks a cut. They are a selection: the full exchange ran to about 250 messages.
The bits
I'd introduce an explicit entropy-preservation objective: 256-bit entropy preservation: BeautifulHash V0 aims to preserve all 256 bits of the input hash in its canonical SVG representation. Every namespace must account for its complete allocated bit width, including when optional visual features are absent. A namespace may redistribute its bits among its own subnamespaces, but may not discard them. …Oct 18, 2026
Room I · The ridge
… how I would tackle is have anchor points so we have that. Then between two anchor point create second layer subanchor points between two anchor points.. but the subanchor points cannot deviate from the vector connecting the two parent anchor points perpendicularly by 10%, and so on. repeat the process for those subanchor points, until full 88 bit is filled fractally …Oct 18, 2026
… Keep the 10% perpendicular displacement rule as the initial default, but separate fractal roughness from the overall vertical scale so different themes can produce different mountain profiles. Before finalizing the algorithm, specify how we guarantee left-to-right monotonicity, how each displacement is preserved through SVG serialization, and how the complete 88-bit mapping remains injective even when the third ridge is absent. Treat the 32/32/24 allocation as provisional until we've rendered sample landscapes. and it should be monotonic no pride rock from lion kingOct 18, 2026
… Rather than starting with two anchors alone, we'd derive a dominant summit position and elevation from the hash, then generate shoulders and secondary peaks around it. …Oct 18, 2026
ah got it we should make these horn like peaks for back moutains only, while front mountains have more points but not as crazy with peaks, otherwise it feels like we are in some volcanic placeOct 18, 2026
Room II · The split
… There is what we call incoming slope, which is same as a regular slope, but the slope that comes towards you.. How that works is this, whenever there is a peak (clear direction changes from rising / to descending \ , no plateaus) by at least more than 30 degree turn, we draw a line which is some function of the point's height modulo some number last rising slope and last descending slope (this line cannot swing more to the left than the rising and more to the right than the descending) that line is the inward slope (imagine a tripod with one leg coming twards you). Okay? Now there is another straight line which is cutoff slope, which is a slope which is crossing horizontally but not part of the ridge. how do we know where is the cutoff slope, look for the valleys which is same as peaks but flipped. it is a function of the valley's point (modulo same number) and the descending \ and ascending slope / immediate to it. Choose one line and keep extending (say descending) that line and the ascending slope forms an angle 180 - the angle of the valey. That is the cutoff slope. There can be two cutoff slope depending on what you pick. but here is the thing the cutoff slope can only extend as long as it meets the incoming slope forming sort of triangular pattern. That patch is what we call reflective surface. If that reflective surface is greater than 1/3 of the height of the peak then it is unrealistic reflective surface (cause mountains rarely has that large flat surface), but if it is less than that it is a realistic reflective surface. …Oct 20, 2026
1. Yes now there will be two sides the one to the left of the peak, and one to the right of the peak, the one that tilts away of the sun gets a slight shade (matching the mountain color scheme). For sun that tilts lower, the shade will be stronger, for sun that tilts so low, the bright side gets orangish/pinkish treatment, to indicate sunset.Oct 20, 2026
now let's make it high poly.. we have the two slopes we calculated it, we do a mini postprocess The triangle point stays, but along the line, follow the ridge (some function of the ridge) to bend the "walk down" so it is not just straight down..Oct 20, 2026
Room III · The facets
… I was thinking was triangulation. You draw 100x 100 micro dots plotted (imagine) in the front most mountain. The dot placement is a function of the ridge coordinate and pi, so it is not exactly a grid but pretty much randomly plotted points. then we join the dits forming trangles. now the triangles angled towards the sun (likely very narrow like 10 degrees swung to the left by at least 60 degrees) get bright treatment (sun reflectivity) the triangle angled away from the sun get much darker treatment. Not as many triangles as trees, but enough to not be able to make out the shape without squinting at it. …Oct 21, 2026
Make the triangulation much larger, and vertical, and precisely following the slope of the ridge and the half-cutting incoming ridge. and as it approaches the mountain in front of it gradient it away so the details brush off, providing a bit more contrast between two mountain textures. Also use the ridge height zones 1~20, 20~40 , 40~60.. as a way to remove certain patches, so it is not just triangulation everywhere.Oct 21, 2026
Room IV · The tree
… So you start from one base (whose girth is also determine by leading bits) then at height X. it branches (also bit-derived), how much of the base is split (7:3 6:4) is also bit derived, and the angle (so here is the important part, the angle is not bit derived, if the large portion of the tree is retained (such as 9:1 ratio) then the angle should be minimal (mostly straight up) and the smaller portion of the tree branch should be near perpendicular (imagine a twig offshoot from the side of the trunk) if it is 50:50 it should angle evenly forming a "Y". and keep going with the fractal until you run out of the bits. …Oct 19, 2026
… Make the branching recursive even after the bits run out. We don't need a new hash bit for every branch. Once we've consumed the allocated bits, we can continue subdividing using a deterministic recurrence based on the tree's existing parameters. That produces geometric detail without claiming additional entropy. …Oct 19, 2026
For deciduous trees (temperate) we mentioned how angle depends on the split size, well the winner branch (thicker) gets to angle even less so giving the main trunk more chance to "grow upward"Oct 19, 2026
Room V · The placement
… I'd rather see a small grove of overlapping trees, an isolated medium tree, and some open hillside. Ten trees don't have to mean ten equally prominent objects. …Oct 19, 2026
Actually here is the interesting thing we can do (and yes feel free to add desert plant) the vegetation should be a lot smaller individually, and for every season besides fall, it should be negative (i.e. away from trees) flipped from fall where they are near the treesOct 19, 2026
… For spring/summer, the density of the vegetation goes down as it gets more distant (towards the top crest edge of the hill) which is not realistic, there should be more densitiy as it nears the rim otherwise, it feels fake since near the rim I don't see as much..Oct 20, 2026
Room VI · Sun and moon
… Remember the sun? I don't plan to ever show sun here, but we have an implicit angle of the sun.. it will cause a shadow on the trees on the hills. The shadow will match the darkeset color on the hill and the angle and length of the shadow depends on where the sun will be. It will be 3D with angle starting from the left x axis (when image is flat/square with you) and another angle for vertical starting from the direction vector from the first angle. …Oct 20, 2026
… I do want 3/4 of the time its a day, and only 1/4 is night, and that too with some blue glow like dusk. I wonder if we could change the role of the sun to that of the moon, if it is in the night mode, and the face, instead of getting that "orangey" shade for evening, gets "whitish" shade, for that moon reflection. …Oct 21, 2026
I think the sun angle already controls the subdivision of the day, so we already have that (the sun location and part of the day are coupled). For night, it doesn't but moon position still matters for the shadows and lightingOct 21, 2026
Room VII · The shadow
… The shadow follows the contour of the hill but gets flatter as it nears the bottom edge of the canvas exactly how we calculated the "stripes" for the front hills. The shadow itself doesn't need to be fancy but it should at least cast the branching to the ground (not the leaves) and slightly thicker than usual.btw this is only for the front hillsOct 20, 2026
Room VIII · The cloud
For cloud I was thinking like this implement a trapezoid with two parallel lines running horizontally top part much longer than the far part (three points of trapezoid decided by the bits, fourth one decided by the bit but must be parallel so there is a constraint), but it is upto the algorithm, then make any five points along the trapezoid edges (so trapped inside it), pick a side (governed by some bit) and that side is sharp edge (where cloud moving towards) rest are hazy so forming a gradient which dissolves into the sky.. …Oct 20, 2026
… So I recommend between two points pick the four points again using the bits that fits inside a narrow rombus built between the two adjacent points, then the circular arc joins the points as a second order, and repeated by third order (i.e. do this two more times)Oct 20, 2026
… let's make the five points be the starting point for gradient. Also make the cloud a bit flat overall (not same size of course, but bound them to be flatter more) and make the edges around the cloud blend in more.. with slight darker shade of white (just tad shade) near the bottom of the cloud just to get the 3d effect …Oct 20, 2026
Room IX · The palette
… I'd actually propose 8 bits (256 colors) per ridge. Color matters enough to reserve a meaningful budget, and the difference is only two bits per ridge. Here's how I'd divide the 88-bit Mountains namespace: Component Bits Header (third ridge present) 1 Ridge 1 geometry 24 Ridge 1 color 8 Ridge 2 geometry 24 Ridge 2 color 8 Ridge 3 / redistributed detail 23 Total 88 For Ridge 3, I'd similarly reserve 8 of its 23 bits for color, leaving 15 for geometry. That means the optional ridge has less geometric detail, which is reasonable if it's farther away. One distinction, though: 256 color codes don't automatically guarantee 256 distinct rendered colors. Our theme-aware palette mapping and lighting transformation must preserve those distinctions if we're pursuing SVG injectivity. And I wouldn't divide the 8 bits equally into RGB channels. Instead, I'd use a theme-specific palette containing 256 coordinated colors, or a carefully designed mapping into a perceptual color space. …Oct 18, 2026
Shared color family. Let the theme determine a coherent palette, while each ridge's eight color bits select a distinct shade within that family. Preserve the 256 unique colors per ridge. …Oct 18, 2026
nice now the sky.. when the sun is lower we do want that pink, purple, orange gradient generally the warmer color near closest to the sun even if the sun is not visible, can you make in the gradient so the sky does look realisticOct 20, 2026