Browser optics · Original projects

RAYMOSAIC: One light. Hundreds of mirrors. Your message.

Real local rendering — not a remote image service

Your text, sketches, mirror settings and exports stay in the browser unless you explicitly share a file or a link. No account, tracking script, analytics or image-processing API is needed.

In this article
  1. A small message, made of light
  2. How the mirrors make the image
  3. 448 Classic, 666 DOOM of Love, 1337 OVERDRIVE
  4. From a message to a GIF worth giving
  5. Keep the project, or choose what to share
  6. A useful model, with visible limits
  7. Try your own message

A name in warm light can be a surprisingly good reason to open an optics experiment. RAYMOSAIC lets you type a message or draw a motif, then watch individual mirrors align until their reflections form it on a wall. You can investigate the instrument, or take the light itself home as an animated GIF.

Current RAYMOSAIC interface with a golden heart, individual mirrors, a point light and creative controls
The instrument remains visible in the live experiment. Every light spot comes from a calculated reflection.

A small message, made of light

I like the moment when scattered reflections become something recognisable. In RAYMOSAIC that might be a heart, a name, or a few words for someone you care about. The result is also a way into the machinery: why does that mirror point there, and what happens if the lamp moves?

The browser handles the geometry. Choose a preset, write in the Text tab, or sketch with the drawing tools. Automatic mirroring adjusts the sampled target coordinates for the viewing direction, so you can write and draw normally. Your original sketch stays unchanged; a separate preview shows the reflected result.

How the mirrors make the image

The setup has three main parts: an ideal point light, an array of small planar mirrors, and a projection wall. Each mirror has its own position and surface normal, the vector perpendicular to its face. Changing that normal changes where its reflected ray goes.

First, the browser samples the desired text or drawing into target points on the wall. An inverse solver calculates a suitable normal for each mirror, using the direction from the source to the mirror and the direction from the mirror to its assigned target. The available mirror positions and tilt limit constrain what it can reach.

Then a separate forward calculation starts with the source position and mirror geometry. For an incident unit direction i and mirror normal n, the reflection law is r = i − 2(i · n)n. The angle of incidence equals the angle of reflection, measured from the normal. The browser intersects each outgoing ray with the wall and draws a light spot at that intersection. Center and corner rays approximate the footprint of each finite mirror.

This separation is what makes RAYMOSAIC an optical simulation rather than a graphics filter. The output renderer receives no text or drawing texture to paste onto the wall. Move the light source without recalculating: the incoming directions change while the normals stay fixed, and the image distorts. Recalculate the mirrors and they aim at the motif again. Reveal the rays or select a mirror to inspect the relationship.

448 Classic, 666 DOOM of Love, 1337 OVERDRIVE

  • 448 mirrors · Classic: the original 28 × 16 array, a good starting point for a simple motif.
  • 666 mirrors · DOOM of Love ❤️: a 37 × 18 array and a playful Easter egg, with no affiliation with the DOOM franchise.
  • 1337 mirrors · OVERDRIVE 🚀: exactly 1337 facets in a 51 × 27 lattice with 40 empty corner positions. The name tips its hat to 1337, or “leet”, culture.

These counts represent real, individually calculated mirrors. More facets give the motif more light samples. They do not remove every geometric limit or guarantee that a very detailed drawing will remain legible.

From a message to a GIF worth giving

The composer accepts up to 400 Unicode graphemes. Short words appear in one scene; longer messages become a sequence, split at words, punctuation and explicit line breaks. The three mirror modes fit up to 13, 15 or 17 graphemes per scene. Each part gets its own solved mirror orientations, and transitions animate those normals. Previous, pause and next let you inspect the complete message.

For a gift, choose Projection only (no instrument). This uses a dedicated rendering path that shows only the calculated reflected light on solid black. The mirrors, lamp and wall frame disappear. The actual forward ray intersections determine the framing, with comfortable space around the glow. All parts of a message share one center and scale, so the view does not jump between words.

Actual projection-only RAYMOSAIC GIF forming LOVE in warm reflected light on a black background, without mirror equipment
A genuine browser export in 666-mirror mode. The glow visualises computed light intersections; no text is overlaid on the animation.

Full-scene export keeps the optical equipment and its perspective view. Both modes support square, portrait and landscape GIFs, with an optional small RAYMOSAIC signature. The quick gift action selects a compact projection loop; longer messages automatically get enough time for all their scenes. Changing an export option clears the previous download so it cannot accidentally give you a file made with old settings.

The browser renders every frame and encodes the GIF in a Web Worker. Progress and cancellation remain available. PNG captures the current optical scene as a still, including the instrument; it does not contain the entire multipart message. No image-processing service receives your design.

Keep the project, or choose what to share

Local autosave is useful while experimenting. A downloaded .raymosaic project file is the longer-lived copy: it keeps the motif, drawing, light positions, camera, appearance, mirror mode and orientations. Clearing browser site data removes local saves, so keep a file for work you want to revisit.

A compact creation link stores validated project state in the URL fragment and recreates the motif in the receiving browser. Larger drawings may need a project file instead. Anyone with the complete creation link can see that motif. The separate Share RAYMOSAIC ❤️ action shares only the public laboratory URL.

Native GIF sharing is offered where the browser supports sharing files. Otherwise, download and send the GIF yourself. Messaging apps can convert animations or show them differently. External sharing services open only after you choose one; the lab needs no account, analytics or background upload.

A useful model, with visible limits

RAYMOSAIC uses geometrical optics with an ideal point source and perfect planar mirrors. Glow is an illustration, not a calibrated brightness measurement. The model omits diffraction, polarisation, self-shadowing, inter-mirror occlusion and global illumination. Emoji appearance depends on the fonts available in your browser.

The application renders through Canvas 2D. Higher mirror counts and longer, larger GIFs require more CPU time and memory. Automated Chromium and Firefox checks exercise rendering and export; simulated phone viewports do not establish physical Android or iPhone compatibility.

Try your own message

Open the RAYMOSAIC light laboratory. Type a name, watch the reflections align, then move the source and see why the image changes. Or leave the machinery behind in the export and send someone a little light.

For another hands-on exhibit, visit the Jurassic Park / SGI experience in my Computer Museum. The pleasure is related: being able to explore the system behind the picture.