How Today's Rock Works
Today's Rock looks like a small 3D application, but the underlying project is deliberately simple. There is no 3D model waiting on a server and no API returning a rock of the day. The browser receives a static page and constructs the specimen itself.
The important property is determinism. The current UTC date is converted into a seed, and that seed controls the random-looking choices made while constructing the specimen. Two visitors running the same version of the program on the same UTC date therefore arrive at the same rock independently.
1. The date becomes the seed
The generator first represents the current day as a UTC date such as 2026-09-15. That date is combined with the project-specific string todays-rock:: and passed through the xmur3 hashing function used by the page. The resulting integer becomes the seed for a mulberry32 pseudo-random number generator.
From that point onward, the generator does not depend on ordinary non-deterministic randomness. Shape parameters, colour choices and placard selections are drawn in a fixed order from the seeded sequence. The same input therefore produces the same sequence of decisions.
2. Starting with an icosphere
A mathematically perfect sphere would be too regular for the intended object. The generator starts with an icosahedron and subdivides its triangular faces three times. Newly created edge points are normalised back onto the spherical surface, producing a fairly dense triangular mesh.
This gives the program a useful starting point: the topology is regular enough to render cleanly, while the vertices can then be displaced without needing a downloaded model.
3. Deforming the stone
Each vertex is sampled against deterministic three-dimensional value noise at two scales. A larger-scale noise field creates the broad irregularities that make the object lumpy; a smaller-scale field adds secondary variation so the result does not look like a simple low-poly sphere.
The generator also chooses independent squash factors for the three axes. The vertical factor is deliberately allowed to be smaller than the two horizontal factors, so the daily object tends to read as a stone rather than a floating ball.
The shape parameters themselves are seeded. For each date the program chooses the amplitude and frequency of the large and medium noise fields, along with three-dimensional offsets into the noise field. The offsets stop every day's rock from merely being a variation on the same noise sample.
4. Surface variation, colour and light
After the geometry is displaced, the renderer calculates another small noise value for each face. This produces a subtle mottle in the final shading rather than assigning exactly the same brightness to every triangular face.
The seed also chooses a restrained HSL colour. Saturation stays low and lightness is kept around a middle range, so the generated palette remains stone-like even when the hue changes between days.
Lighting is calculated directly in the renderer. Each triangular face gets a normal from its geometry, and that normal is compared with a fixed light direction using a simple Lambert-style diffuse term. The resulting value controls the face lightness. A soft radial gradient behind the rock and a ground shadow supply additional depth cues.
5. Rendering without a 3D engine
The final geometry is rendered onto an ordinary HTML canvas. The program rotates each point according to the current yaw and pitch, projects it into screen coordinates, orders the triangular faces by depth, and paints them from back to front.
This is a deliberate implementation choice. Today's Rock does not need a general-purpose 3D engine, a model file, a WebGL framework or a server-side rendering service. Keeping the renderer in the page makes the project small, portable and inspectable.
6. The fictional museum placard
The placard is generated from the same seeded random sequence as the rock. The program selects from curated lists of names, supposed compositions, temperaments, features and provenance statements.
The mass is a generated value between roughly 0.4 and 11.6 kilograms and is displayed as an approximation. The other fields are intentionally fictional: phrases such as “Basalt (probably)” and “Temperament: Stoic” are part of the site's museum fiction, not geological measurements.
Because the selections happen after the shape and colour parameters have been drawn, the placard is reproducible for a particular date. It is not a separate random text generator running independently of the specimen.
7. Why everyone gets the same rock
The generator does not use a visitor ID, browser fingerprint, location or account. Its meaningful input is the UTC date plus the fixed program. A visitor in Leeds and a visitor in Tokyo therefore have the same daily input even though their local clocks are different.
This is what makes the project a shared object rather than a collection of personalised procedural objects.
8. Midnight UTC
The page continually calculates the next UTC midnight and displays the remaining time in the placard. It also checks the current UTC date. When the date changes, the generator is run again and the placard is replaced with the next specimen.
There is no server-side job that creates the new rock. The browser notices that the date has changed and performs the calculation locally.
9. What is not stored
Today's Rock does not maintain a database of specimens. It does not download a daily model, save the generated geometry to an API, or build an online gallery. The site is intentionally stateless with respect to the artwork.
The source code can, in principle, deterministically reproduce a specimen from its date while the same version of the program is available. The public site nevertheless chooses not to expose that as an archive. That distinction is part of the project's design.
10. Source
The project is intentionally small enough that the implementation can be read rather than hidden behind a build system or a large framework. The source is published with the project for anyone who wants to inspect the generator, renderer and interaction code.