Hidden Clockwork Mechanism Design
Design document for the skeuomorphic shadow mechanism connecting the latitude picker to the rotating moons in “Regolith with Latitude.”
Overview
A subtle visual hint that there’s physical clockwork hidden beneath the paper surface, mechanically connecting the latitude line slider to the moon rotation. The mechanism appears as faint shadows in the right margin, barely perceptible at rest, stirring to life when the reader interacts with the latitude control.
Concept
The reader experience:
When the page loads, the right margin contains barely-perceptible shadows - so faint they might be imperfections in the paper. A curious reader might notice them; most won’t.
When the reader drags the latitude line, the shadows stir. The hidden mechanism reveals itself through motion:
- At the map level: A cam rotates, with a follower pin tracing its edge
- Rising through the margin: A rack with teeth shifts vertically, fading as it ascends
- Near the moons: A pinion gear converts the linear motion to rotation
When the reader releases the latitude line, the shadows settle back to stillness.
Emotional beat: “Wait - did that move? Is there something under there?” followed by deliberate interaction and the reward of confirmation: “The page is an instrument.”
Mechanical Logic
Cam and Follower (at latitude picker)
The cam-and-follower converts rotational motion to linear motion (or vice versa). An eccentric disc (the cam) rotates; a follower pin riding its edge translates that rotation into vertical displacement.
This is the “input translator” - the most visible part of the mechanism.
Rack and Pinion (connecting rod + moon rotation)
A rack (rod with teeth) runs vertically through the margin. At the top, a small pinion gear engages the rack teeth. As the rack moves up/down, the pinion rotates, tilting the moon assembly.
This is mechanically honest - it’s actually how you’d convert linear latitude motion to rotational moon-tilting in a real instrument.
Fallback
If the cam-and-follower proves too visually complex, simplify to pure linkage rods (straight connecting lines suggesting direct mechanical connection).
Visual Specifications
Placement
- Right margin - the “mechanical gutter”
- Mechanism hugs the content edge, peeking from beneath
- Asymmetric visibility: more visible at cam (bottom), fading through rack, subtle pinion at top
Color and Opacity
Paper-matched shadows using mix-blend-mode: multiply:
- Sample page background tone (warm cream)
- Shadow artwork in neutral warm grey (~
#8a8078) - Multiply blend darkens existing texture naturally
- Paper fiber pattern shows through shadows
Opacity levels (starting points, tune by eye):
| Element | At rest | During interaction |
|---|---|---|
| Cam | 12-15% | 16-20% |
| Rack | 8-10% → 4-5% (fading) | 12-15% → 6-8% |
| Pinion | 6-8% | 10-12% |
Shadow Softness
Diffuse edges like shadow cast by something 2-3mm beneath paper held to light. Not crisp vector edges, not blurry fog. Think: paperclip shadow beneath a single sheet.
Scale
- Cam: ~40-50px diameter, at right edge of mercator map
- Rack: ~8-10px wide, ~200-300px vertical travel
- Pinion: ~20-25px diameter, at right edge of moon assembly
Technical Implementation
File Structure
editorial/articles/regolith-with-latitude/assets/figures/
├── mechanism.js # Ornament module
├── mechanism/
│ ├── cam.svg # Cam, follower, pivot (animatable)
│ ├── rack.svg # Rack with teeth (translates)
│ ├── pinion.svg # Pinion gear (rotates)
│ └── shadow-texture.png # Soft texture overlay
SVG Structure
Each SVG contains vector paths with:
- fill: warm grey (will multiply down)
- opacity: per-element starting values
- filter: optional feGaussianBlur for softer edges
- transform-origin: set at pivot points for animation
Hybrid Rendering
SVG layer: Structure and animation (transforms applied via JS)
PNG layer: Soft texture overlay for organic shadow quality, composited over SVG
DOM Structure
<div data-ornament="mechanism" aria-hidden="true">
<div class="mechanism-shadows">
<img class="mech-cam" src="mechanism/cam.svg" alt="">
<img class="mech-rack" src="mechanism/rack.svg" alt="">
<img class="mech-pinion" src="mechanism/pinion.svg" alt="">
<div class="mech-texture"></div>
</div>
</div>
CSS
.mechanism-shadows {
position: absolute;
right: 0;
top: 0;
bottom: 0;
width: var(--margin-width);
mix-blend-mode: multiply;
pointer-events: none;
--mech-opacity: 0.12;
}
.mechanism-shadows img {
position: absolute;
opacity: var(--mech-opacity);
transition: opacity 400ms ease-out;
}
.mechanism-shadows.interacting {
--mech-opacity: 0.18;
transition: opacity 100ms ease-in;
}
Animation Logic
Triggering
Hook into existing latitude picker pointer events:
pointerdown/touchstart→ mechanism wakespointermove/touchmove→ mechanism animates in syncpointerup/touchend→ mechanism settles
Transform Calculations
function updateMechanism(latitude) {
// latitude ranges from -90 to +90
// Cam rotates (full range = ~180° rotation)
const camRotation = (latitude + 90);
camEl.style.transform = `rotate(${camRotation}deg)`;
// Rack translates vertically
const rackTravel = (latitude + 90) * (maxTravel / 180);
rackEl.style.transform = `translateY(${-rackTravel}px)`;
// Pinion rotates based on rack travel
const pinionRotation = rackTravel * (360 / pinionCircumference);
pinionEl.style.transform = `rotate(${pinionRotation}deg)`;
}
Wake and Settle Effect
On interaction start: - Bump shadow opacity (0.12 → 0.18) - Quick ease-in (~100ms)
On interaction end: - Fade back (0.18 → 0.12) - Slower ease-out (~400ms)
The mechanism “relaxes” back to stillness.
Mechanism Element Details
The Cam (bottom)
Snail-shell or heart-shaped cam profile - the classic shape for linear-to-rotary conversion. Include:
- Cam disc (irregular curved profile, not circular)
- Central pivot point (small dark dot)
- Follower pin on cam edge (small circle)
Position: ~60% visible, ~40% “under” the mercator map edge.
The Rack (middle)
Vertical rod with subtle teeth along inner edge (facing content). Teeth should be:
- Small (2-3px tall)
- Slightly irregular (hand-drawn feel)
- Fading in definition as rack rises
Include 2-3 “shadow pools” - darker nodes suggesting hidden pivot points or guide brackets.
The Pinion (top)
Small gear, 6-8 teeth visible, engaging rack from the left. Include:
- Gear teeth (meshing with rack)
- Central axle point
- Faint suggestion of mounting bracket toward moons
Position: just beneath/behind moon assembly’s right edge.
Framework Integration
New Concept: Ornaments
Ornaments are decorative elements that participate in pub/sub but live outside content flow. They share capability-based architecture with figures but have different rendering semantics.
Manifest Extension
{
"figures": {
"three-moons": { ... },
"latitude-picker": { ... },
"moon-timeline": { ... }
},
"ornaments": {
"mechanism": {
"module": "./mechanism.js",
"subscribes": ["latitude"],
"publishes": []
}
}
}
Module Interface
// mechanism.js
export const meta = {
name: 'mechanism',
description: 'Hidden clockwork connecting latitude picker to moons',
version: '1.0.0',
};
export function setup(container, { subscribe, assets }) {
// Load SVG elements
// Apply PNG texture overlay
// Position elements in margin
subscribe.latitude((lat, meta) => {
if (meta?.interacting) {
wake();
updateMechanism(lat);
} else {
settle();
}
});
return () => { /* cleanup */ };
}
Runtime Modification
Add to runtime.js after figure initialization:
document.querySelectorAll('[data-ornament]').forEach(el => {
const name = el.dataset.ornament;
const config = manifest.ornaments?.[name];
if (config) {
loadAndSetup(el, config);
}
});
Latitude Topic Enhancement
Extend latitude publish to include interaction state:
// In latitude-picker.js
publish.latitude(value, { interacting: true }); // during drag
publish.latitude(value, { interacting: false }); // on release
Backward compatible - existing subscribers ignore second argument.
HTML Placement
<!-- In article.md -->
<div data-ornament="mechanism"></div>
Place once, near the figures it connects. CSS positions it to span the right margin between latitude-picker and three-moons.
Implementation Sequence
- Extend runtime.js to support
[data-ornament]elements - Extend manifest.json with
ornamentskey - Modify latitude-picker.js to publish interaction metadata
- Draw mechanism SVG artwork (cam, rack, pinion)
- Create shadow-texture.png for softness overlay
- Implement mechanism.js module
- Add CSS for positioning and blend mode
- Tune opacity and timing by eye
- Test across browsers and interaction modes
What This Achieves
- Rewards attentive readers with a delightful discovery
- Reinforces the “page as scientific instrument” metaphor
- Connects disparate interactive elements into a coherent whole
- Extends the figures framework with a reusable ornament concept
- Stays true to Almanack’s aesthetic: subtle, crafted, slightly mysterious