# Line Drawing Logo Animation

Motionboard shot name: Plotter-Drawn Logo

A low macro camera follows a plotter pen across paper: it draws a ring and a meridian, sketches each letter as a skeleton, a heavy pen fills them in, then the film cuts to the flat logo, which blurs while the date and URL type on below it.

- Position in a launch film: Ending
- Slug: line-drawing-logo-animation
- Preview video: https://media.motionboard.app/plotter-logo.mp4
- Recipe page: https://motionboard.app/recipes/line-drawing-logo-animation/
- License: MIT. Free to use in your own projects, including commercial launch films. https://github.com/krisyangdev/motionboard/blob/main/LICENSE

## How to use this recipe

You are a coding agent. The user wants this shot for their own product. Follow these steps.

1. **Know the product.** If the product is clear from the user's repo or conversation, ask nothing and start. Otherwise ask once for: product name, logo file, brand colors.
2. **Pick the output.** If the user's message says a video or their website, do that. Otherwise ask once which one they want.
   - **Video (HyperFrames).** Create a folder named `plotter-logo`. Download every file under "Source files" below with the curl commands, keeping relative paths. Adapt `index.html` (see "What to adapt"). Run `npx --yes hyperframes@0.8.209 check` on the untouched copy first and note its result. Preview with `npx --yes hyperframes@0.8.209 preview`, render an MP4 with `npx --yes hyperframes@0.8.209 render` (into `renders/`, named with a timestamp). The same commands are in `package.json` as `dev`, `check`, `render`; pass flags after `--`, as in `npm run render -- --quality draft`. Rendering needs network access for web fonts and GSAP.
   - **Website motion.** Port the GSAP timeline in `index.html` into the user's site, using their stack (React, Vue, Svelte, plain HTML). Build the same DOM structure, keep the timeline's durations, delays and easings exactly, and start it when the element scrolls into view (IntersectionObserver or ScrollTrigger). Respect `prefers-reduced-motion: reduce`: show the final frame as a static state and skip the movement.
3. **What to adapt.**
   - **Brand layer** (product name, logo, colors, fonts, copy): replace directly with the user's.
   - **UI layer** (the product screens, cards, windows, controls shown in the shot): rebuild the user's real UI as clean DOM, from their codebase (components, design tokens) or from a screenshot used as reference only. Never paste a screenshot into the shot.
   - **Motion** (timing, easing, camera moves, layering, stagger, order of events): keep exactly as in the source. This is what the recipe is.
   - The timeline targets UI elements by id and class, and camera moves land on fixed coordinates. Keep the ids the timeline uses, keep row counts and text lengths close to the source, and when the layout moves, update the target coordinates without changing the times.
4. **Fonts.** HyperFrames fetches Google Fonts such as Inter on its own. Some sources use macOS local fonts (PingFang, Songti via `local()`). Use the user's brand font when it can be bundled; for a system font such as SF Pro, use Inter. Check that text still fits its boxes.
5. **Verify.** Compare the render with the preview video above at the beat times in the Timing row. The beats, timing and camera should match; only brand and UI content differ.

## Spec

| Item | Value |
| --- | --- |
| Timing | Film 11s. Hard cuts at 1.9s, 3.4s and 4.7s, and to the flat logo at 5.8s. A thin pen draws the ring 0–2.6s (55% to closed) and a blue pen the meridian 2.3–3.2s. The 10 skeletons start from 3.0s to 4.78s, 0.16–0.22s apart, 0.3–0.55s each. The heavy pen fills 4.5–5.755s, characters 0.075s apart, 0.42s each. Flat logo 5.8–7.0s, defocus 7.0–7.9s, the lockup moves up 90px as it defocuses, date types from 7.75s, URL from 8.15s, held to 11s. The paper texture and guides are on screen from frame 0 with no fade-in |
| Easing | Ring pen `none` (constant speed); meridian and letter skeletons `power1.inOut`; heavy fill `power2.out`; guides `power2.out`; camera constant speed (`none`) in takes 1, 2 and 3, `power3.out` in take 4; logo defocus `power2.inOut`; date and URL `expo.out` (0.5s per character, 0.035s apart, each character rising 8px from below and going from 6px blur to sharp) |
| Camera | Perspective 1500px, the paper tilted about a horizontal axis. Take 1 zoom 5.2→4.4, tilt 58°→55°, roll −10°→−6°, the camera aimed 4° of arc ahead of the pen tip so the tip stays near the middle of the frame (about 45% of the frame height); take 2 zoom 2.5→2.2, tilt 50°→47°; take 3 zoom 1.9→1.75, tilt 55°→52°, the camera sliding right aimed about 25 units left of the letter being drawn, so the pen tip sits in the middle-right of the frame; take 4 zoom 1.15→0.78, tilt 52°→46°, pulling back and sliding right while the fill runs, with the whole mark inside the frame at its start and the right edge of the 6 about 280px inside the frame at the end. An extra 1.00→1.02 slow push runs across all four takes. Depth of field uses four identical copies of the plane blurred 0, 2.4, 6 and 12px, with a focus band half-width of 150, 190, 160 and 330px (takes 1 to 4) |
| Subject | Plane units: 1 unit = 2.8px, x-height 100 units (280px). Mark: an ink ring plus a blue meridian ellipse (radius 66, half-width 30 units); wordmark meridian plus a blue 26, 10 characters built from arcs and straight lines. Thin pen 0.7 units (about 2px), heavy pen 16 units (about 45px) for letters and 13 units for the ring and meridian. 36 guide strokes: 4 horizontal rulings, 3 concentric circles, 3 diagonals, 2 cross lines, the left and right edge of every character and the bounding circle of each round letter, plus baseline ticks every 6 units and registration crosses |
| Sync | Each character's guides are drawn 0.8–0.9s before its skeleton; each character's heavy stroke starts only after its own skeleton is done (the m skeleton ends at 3.55s and its fill starts at 4.66s; the 6 skeleton ends at 5.28s and its fill starts at 5.335s); strokes inside a character run one after another in both passes (m: stem, then the two arches; e: crossbar, then the bowl) and the character's total time stays the same; the i-dots fill 0.28s after the heavy stroke starts; the last character is filled at 5.755s and the film cuts to the flat logo at 5.8s, 0.045s later |
| Style | Paper base `#f3f4f6` with two multiply relief textures (256px and 1024px); ink `#0d0f13`, ultramarine accent `#2346ff` (meridian, 26, URL), guides `#7d838d`; a 256px grain tile jumped every frame (9% multiply, 3% screen) and a 30% vignette; date and URL Inter 500, 50px, centered (date text box top at y=600px, URL at y=680px), the URL in the accent color |

## Why it works

Macro paper with depth of field makes a few thin lines the subject, so the viewer sees how the logo is drawn before seeing the finished mark. Four camera positions cut at 1.9s, 3.4s and 4.7s, each showing one thing (ring, meridian, letters, fill), and the three cut points set the rhythm. After the hard cut to the flat logo it defocuses into the paper over 0.9s (moving up 90px) and the date and URL type on below it once the defocus has finished, so the two never overlap and the eye does not have to move. The whole film has one accent color, used only for the meridian, the 26 and the URL.

## Prompt

> Build a closing shot called Plotter-Drawn Logo for an event, 11 seconds, 1920×1080, 30fps. Use one paper plane (base #f3f4f6 with relief texture) that carries the whole logo: a mark made of an ink ring and a blue (#2346ff) meridian ellipse, plus a lowercase wordmark meridian built from arcs and lines and a blue 26, 10 characters in all, x-height 100 units = 280px. The camera is a low macro with 1500px perspective, and depth of field comes from four identical copies of the plane blurred 0, 2.4, 6 and 12px with a focus band half-width of 150–330px. Draw every stroke with stroke-dashoffset and set pathLength to 10000 (GSAP rounds CSS lengths to whole numbers, so a pathLength of 1 makes strokes jump). 0–1.9s take 1 (zoom 5.2→4.4, tilt 58°→55°, constant speed): the paper texture and gray guides (cross lines, concentric circles, diagonals, horizontal rulings) are on screen from frame 0 with no fade-in, and a thin pen (about 2px) draws the ring at constant speed from 55% to 79% while the camera is aimed 4° of arc ahead of the pen tip, so the tip stays in the middle of the frame. At 1.9s hard cut to take 2 (zoom 2.5→2.2, tilt 50°→47°): the ring closes at 2.6s, a blue pen draws the meridian ellipse over 0.9s (power1.inOut), and from 3.0s the m appears at the right edge. At 3.4s hard cut to take 3 (zoom 1.9→1.75, tilt 55°→52°, constant speed): the 10 character skeletons start in turn at 3.0, 3.22, 3.44, 3.62, 3.78, 3.98, 4.14, 4.34, 4.56 and 4.78s, 0.3–0.55s each with power1.inOut, the strokes inside a character drawn one after another, each character's edge lines and bounding circle start drawing 0.8–0.9s earlier; the camera slides right, aimed about 25 units left of the letter being drawn, so the pen tip sits middle-right in the frame. At 4.7s hard cut to take 4 (zoom 1.15→0.78, tilt 52°→46°, power3.out, the camera pulling back and sliding right), opening with the whole ring mark inside the frame and ending with the right edge of the 6 about 280px inside the frame: a heavy pen (letters 16 units, about 45px; ring 13 units) traces over every skeleton, ring at 4.5s, meridian at 4.58s, characters from 4.66s every 0.075s, 0.42s each (power2.out), the strokes inside a character drawn one after another (m: stem, then the two arches; e: crossbar, then the bowl), the i-dots filling 0.28s later. At 5.8s hard cut to the flat paper: the logo is 1480px wide and centered, pushing 1.00→1.03 until 7.0s, then over 0.9s (power2.inOut) it defocuses to 16px blur, 18% opacity and scale 1.10 while moving up 90px, and keeps drifting to 1.14. From 7.75s the date "16 Dec 2026" (Inter 500, 50px, text box top at y=600px, below the defocused logo) types in character by character, 0.5s each with expo.out, 0.035s apart, rising 8px from below and going from 6px blur to sharp; from 8.15s the URL "meridian26.com" (text box top at y=680px) types in the same way in the accent color; hold to 11s. Finish with a per-frame jumping grain tile and a vignette. Build it with HTML/SVG + GSAP.

## Often confused with

- [Logo Wordmark Reveal](https://motionboard.app/r/logo-wordmark-reveal.md): Mark-to-Wordmark Unfold pushes the wordmark out of an existing mark in one 1.3s move; Plotter-Drawn Logo draws the mark and wordmark stroke by stroke on blank paper with a moving camera and ends on a date and URL.
- [Outline-to-Solid Reveal](https://motionboard.app/r/outline-to-solid-reveal.md): Outline to Solid lights a product outline and fills it in place on a fixed camera; Plotter-Drawn Logo draws the strokes one by one on paper with a moving macro camera.

## Source files

Runnable HyperFrames project, 3 files.

- https://motionboard.app/source/plotter-logo/hyperframes.json (318 B)
- https://motionboard.app/source/plotter-logo/index.html (23.6 KB)
- https://motionboard.app/source/plotter-logo/package.json (301 B)

Download all of them:

```sh
curl -fsSL --create-dirs -o "plotter-logo/hyperframes.json" "https://motionboard.app/source/plotter-logo/hyperframes.json"
curl -fsSL --create-dirs -o "plotter-logo/index.html" "https://motionboard.app/source/plotter-logo/index.html"
curl -fsSL --create-dirs -o "plotter-logo/package.json" "https://motionboard.app/source/plotter-logo/package.json"
```

## index.html

```html
<!doctype html>
<html lang="en" data-resolution="landscape">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=1920, height=1080" />
    <script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
    <style>
      :root {
        --paper: #e9eaed;
        --ink: #0d0f13;
        --acc: #2346ff;
        --guide: #7d838d;
        --font-ui: "Inter", sans-serif;
      }
      * { margin: 0; padding: 0; box-sizing: border-box; }
      html, body { width: 1920px; height: 1080px; overflow: hidden; background: var(--paper); }
      #root { position: relative; width: 1920px; height: 1080px; overflow: hidden; background: var(--paper); font-family: var(--font-ui); color: var(--ink); -webkit-font-smoothing: antialiased; }
      .full { position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; }

      /* ---------- depth of field: four copies of the same plane, blurred in screen space ---------- */
      #dof { --ang: 178; --c: 570; --w: 150; }
      .lay { overflow: hidden; }
      .L1 { filter: blur(2.4px); }
      .L2 { filter: blur(6px); }
      .L3 { filter: blur(12px); }
      .L0 {
        -webkit-mask-image: linear-gradient(calc(var(--ang) * 1deg), transparent calc(var(--c) * 1px - var(--w) * 1px - 60px), #000 calc(var(--c) * 1px - var(--w) * 1px), #000 calc(var(--c) * 1px + var(--w) * 1px), transparent calc(var(--c) * 1px + var(--w) * 1px + 60px));
        mask-image: linear-gradient(calc(var(--ang) * 1deg), transparent calc(var(--c) * 1px - var(--w) * 1px - 60px), #000 calc(var(--c) * 1px - var(--w) * 1px), #000 calc(var(--c) * 1px + var(--w) * 1px), transparent calc(var(--c) * 1px + var(--w) * 1px + 60px));
      }
      .L1 {
        -webkit-mask-image: linear-gradient(calc(var(--ang) * 1deg), transparent calc(var(--c) * 1px - var(--w) * 1px - 170px), #000 calc(var(--c) * 1px - var(--w) * 1px - 100px), #000 calc(var(--c) * 1px + var(--w) * 1px + 100px), transparent calc(var(--c) * 1px + var(--w) * 1px + 170px));
        mask-image: linear-gradient(calc(var(--ang) * 1deg), transparent calc(var(--c) * 1px - var(--w) * 1px - 170px), #000 calc(var(--c) * 1px - var(--w) * 1px - 100px), #000 calc(var(--c) * 1px + var(--w) * 1px + 100px), transparent calc(var(--c) * 1px + var(--w) * 1px + 170px));
      }
      .L2 {
        -webkit-mask-image: linear-gradient(calc(var(--ang) * 1deg), transparent calc(var(--c) * 1px - var(--w) * 1px - 320px), #000 calc(var(--c) * 1px - var(--w) * 1px - 230px), #000 calc(var(--c) * 1px + var(--w) * 1px + 230px), transparent calc(var(--c) * 1px + var(--w) * 1px + 320px));
        mask-image: linear-gradient(calc(var(--ang) * 1deg), transparent calc(var(--c) * 1px - var(--w) * 1px - 320px), #000 calc(var(--c) * 1px - var(--w) * 1px - 230px), #000 calc(var(--c) * 1px + var(--w) * 1px + 230px), transparent calc(var(--c) * 1px + var(--w) * 1px + 320px));
      }
      .stage { perspective: 1500px; perspective-origin: 960px 540px; }
      .rot { transform-style: flat; }
      .cam { position: absolute; left: 960px; top: 540px; width: 0; height: 0; }

      /* ---------- the paper plane (cam coordinates, 1 unit = 2.8 px) ---------- */
      .plane {
        position: absolute; left: -6000px; top: -4400px; width: 12000px; height: 9000px;
        background-color: #f3f4f6;
        background-image:
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='r' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.11' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='0.7' diffuseConstant='1.05'%3E%3CfeDistantLight azimuth='225' elevation='60'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23r)'/%3E%3C/svg%3E"),
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1024' height='1024'%3E%3Cfilter id='r' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='4' seed='5' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='3' diffuseConstant='1.05'%3E%3CfeDistantLight azimuth='215' elevation='58'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='1024' height='1024' filter='url(%23r)'/%3E%3C/svg%3E");
        background-size: 256px 256px, 1024px 1024px;
        background-blend-mode: multiply, multiply;
      }
      .plane svg { position: absolute; left: 0; top: 0; width: 12000px; height: 9000px; overflow: visible; }

      .pl .t, .pl .f, .pl .gd { stroke-dasharray: 10000 20000; stroke-dashoffset: 10010; }
      .pl .fd, .gs { opacity: 0; }
      .gd { fill: none; stroke: var(--guide); stroke-width: 0.28; opacity: 0.8; }
      .gs { fill: none; stroke: var(--guide); stroke-width: 0.28; }
      .gl .t, .mk .t { fill: none; stroke: var(--ink); stroke-width: 0.7; }
      .gl .f, .mk .f { fill: none; stroke: var(--ink); stroke-width: 16; stroke-linejoin: miter; stroke-miterlimit: 3; }
      .mk .f { stroke-width: 13; }
      .gl .fd { fill: var(--ink); }
      .ac .t, .ac .f { stroke: var(--acc); }
      .ac .fd { fill: var(--acc); }

      /* ---------- flat shot ---------- */
      #flat { opacity: 0; }
      .paperF {
        background-color: #f3f4f6;
        background-image:
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='r' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.12' numOctaves='3' seed='11' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='0.4' diffuseConstant='1.05'%3E%3CfeDistantLight azimuth='225' elevation='62'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='128' height='128' filter='url(%23r)'/%3E%3C/svg%3E"),
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='512' height='512'%3E%3Cfilter id='r' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.012' numOctaves='4' seed='5' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='3' diffuseConstant='1.08'%3E%3CfeDistantLight azimuth='215' elevation='62'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='512' height='512' filter='url(%23r)'/%3E%3C/svg%3E");
        background-size: 128px 128px, 512px 512px;
        background-blend-mode: multiply, multiply;
      }
      #lockF { position: absolute; left: 0; top: 0; transform-origin: 50% 50%; }
      #lockF svg { display: block; overflow: visible; }
      .fx { fill: none; stroke: var(--ink); stroke-width: 16; stroke-linejoin: miter; stroke-miterlimit: 3; }
      .fxm { stroke-width: 13; }
      .fxd { fill: var(--ink); }
      .fxa { stroke: var(--acc); }
      .fxda { fill: var(--acc); }

      /* ---------- finishing layers ---------- */
      #light { z-index: 4; pointer-events: none; background: radial-gradient(ellipse 85% 75% at 30% 28%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 70%), linear-gradient(to bottom, rgba(40, 44, 56, 0) 55%, rgba(40, 44, 56, 0.10) 100%); }
      #grain { z-index: 5; pointer-events: none; opacity: 0.09; mix-blend-mode: multiply; background-size: 256px 256px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E"); }
      #grainL { z-index: 5; pointer-events: none; opacity: 0.03; mix-blend-mode: screen; background-size: 256px 256px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='256' height='256' filter='url(%23n)'/%3E%3C/svg%3E"); }
      #vig { z-index: 6; pointer-events: none; background: radial-gradient(ellipse 80% 80% at 50% 48%, rgba(30, 34, 44, 0) 55%, rgba(30, 34, 44, 0.30) 100%); }

      #txt { z-index: 3; }
      .tx { position: absolute; left: 0; width: 1920px; text-align: center; font-size: 50px; line-height: 58px; font-weight: 500; letter-spacing: -0.012em; color: var(--ink); white-space: pre; }
      .tx.ac { color: var(--acc); }
      .ch { display: inline-block; opacity: 0; }
    </style>
  </head>
  <body>
    <div id="root" data-composition-id="main" data-start="0" data-duration="11" data-width="1920" data-height="1080">
      <div id="dof" class="clip full" data-start="0" data-duration="11" data-track-index="0" data-layout-allow-overlap>
        <div class="lay full L3" data-layout-ignore><div class="stage full"><div class="rot full"><div class="cam"><div class="plane"></div></div></div></div></div>
        <div class="lay full L2" data-layout-ignore><div class="stage full"><div class="rot full"><div class="cam"><div class="plane"></div></div></div></div></div>
        <div class="lay full L1" data-layout-ignore><div class="stage full"><div class="rot full"><div class="cam"><div class="plane"></div></div></div></div></div>
        <div class="lay full L0" data-layout-ignore><div class="stage full"><div class="rot full"><div class="cam"><div class="plane"></div></div></div></div></div>
      </div>

      <div id="flat" class="clip full" data-start="0" data-duration="11" data-track-index="1" data-layout-allow-overlap>
        <div class="paperF full"></div>
        <div id="lockF" data-layout-ignore></div>
      </div>

      <div id="txt" class="clip full" data-start="0" data-duration="11" data-track-index="2" data-layout-allow-overlap>
        <div id="d1" class="tx" style="top:600px"></div>
        <div id="d2" class="tx ac" style="top:680px"></div>
      </div>

      <div id="light" class="clip full" data-start="0" data-duration="11" data-track-index="3" data-layout-ignore></div>
      <div id="grain" class="clip full" data-start="0" data-duration="11" data-track-index="4" data-layout-ignore></div>
      <div id="grainL" class="clip full" data-start="0" data-duration="11" data-track-index="5" data-layout-ignore></div>
      <div id="vig" class="clip full" data-start="0" data-duration="11" data-track-index="6" data-layout-ignore></div>
    </div>

    <script>
      const EXPO = "expo.out";
      const K = 2.8;                        // plane px per drawing unit
      const S = 16, h = S / 2, R = 50 - h;  // pen weight, half weight, bowl radius (all in units, x-height = 100)
      const N = 10000;                      // pathLength of every drawn stroke (GSAP rounds CSS lengths to whole numbers, so fractions need this scale)
      const f2 = (n) => Math.round(n * 100) / 100;
      const rad = (d) => (d * Math.PI) / 180;
      const circ = (cx, cy, r) => "M" + (cx + r) + " " + cy + "A" + r + " " + r + " 0 1 0 " + (cx - r) + " " + cy + "A" + r + " " + r + " 0 1 0 " + (cx + r) + " " + cy;

      /* ---------- Meridian lockup: ring mark, "meridian", "26" ---------- */
      const BOWL = "M" + (100 - h) + " 50A" + R + " " + R + " 0 1 0 " + h + " 50A" + R + " " + R + " 0 1 0 " + (100 - h) + " 50";
      const E_END = [f2(50 + R * Math.cos(rad(42))), f2(50 + R * Math.sin(rad(42)))];
      const GLY = {
        m: { w: 144, d: ["M" + h + " 100V0", "M" + h + " 40A32 32 0 0 1 " + (h + 64) + " 40V100", "M" + (h + 64) + " 40A32 32 0 0 1 " + (h + 128) + " 40V100"] },
        e: { w: 100, d: ["M" + h + " 50H99.5", "M" + (100 - h) + " 50A" + R + " " + R + " 0 1 0 " + E_END[0] + " " + E_END[1]] },
        r: { w: 60, d: ["M" + h + " 100V0", "M" + h + " 50A" + R + " " + R + " 0 0 1 " + (h + R) + " " + h + "H60"] },
        i: { w: 16, d: ["M" + h + " 100V0"], dot: [h, -31, 10] },
        d: { w: 100, d: [BOWL, "M" + (100 - h) + " 100V-46"] },
        a: { w: 100, d: [BOWL, "M" + (100 - h) + " 100V0"] },
        n: { w: 100, d: ["M" + h + " 100V0", "M" + h + " 50A" + R + " " + R + " 0 0 1 " + (100 - h) + " 50V100"] },
        "2": { w: 100, d: ["M16 2A34 34 0 0 1 84 2C84 40 " + h + " 55 " + h + " " + (100 - h) + "H" + (100 - h)] },
        "6": { w: 100, d: ["M" + h + " 50C" + h + " 5 28 -32 72 -32", BOWL] },
      };
      const WORD = [["m", 0], ["e", 0], ["r", 0], ["i", 0], ["d", 0], ["i", 0], ["a", 0], ["n", 0], ["2", 1], ["6", 1]];
      const GAPS = [12, 12, 16, 12, 20, 12, 20, 56, 12];
      const GX = [];
      let cur = 190;
      WORD.forEach((g, i) => { GX[i] = cur; cur += GLY[g[0]].w + (GAPS[i] || 0); });
      const END_X = cur;                                        // right edge of the lockup in units
      const CX = 73, CY = 27.5, RM = 66, RX = 30, A0 = 128;       // ring mark: centre, ring radius, meridian half width, pen start angle
      const ringD = (() => {
        const p = (a) => f2(CX + RM * Math.cos(rad(a))) + " " + f2(CY + RM * Math.sin(rad(a)));
        return "M" + p(A0) + "A" + RM + " " + RM + " 0 1 1 " + p(A0 + 180) + "A" + RM + " " + RM + " 0 1 1 " + p(A0);
      })();
      const ellD = "M" + CX + " " + (CY - RM) + "A" + RX + " " + RM + " 0 1 1 " + CX + " " + (CY + RM) + "A" + RX + " " + RM + " 0 1 1 " + CX + " " + (CY - RM);

      /* flat or drawing version of the lockup (same paths) */
      function lockup(flat) {
        let s = "";
        const path = (d, a) => flat ? '<path class="fx' + (a ? " fxa" : "") + '" d="' + d + '"/>' : '<path class="t k0" d="' + d + '" pathLength="10000"/><path class="f k0" d="' + d + '" pathLength="10000"/>';
        s += flat ? "" : '<g class="mk ell ac">' + path(ellD) + "</g>";
        s += flat ? '<path class="fx fxm fxa" d="' + ellD + '"/>' : "";
        s += flat ? '<path class="fx fxm" d="' + ringD + '"/>' : '<g class="mk ring">' + path(ringD) + "</g>";
        WORD.forEach((g, i) => {
          const gl = GLY[g[0]];
          let inner = "";
          gl.d.forEach((d, j) => { inner += flat ? '<path class="fx' + (g[1] ? " fxa" : "") + '" d="' + d + '"/>' : '<path class="t k' + j + '" d="' + d + '" pathLength="10000"/><path class="f k' + j + '" d="' + d + '" pathLength="10000"/>'; });
          if (gl.dot) inner += flat ? '<circle class="fxd' + (g[1] ? " fxda" : "") + '" cx="' + gl.dot[0] + '" cy="' + gl.dot[1] + '" r="' + gl.dot[2] + '"/>' : '<circle class="t k' + gl.d.length + '" cx="' + gl.dot[0] + '" cy="' + gl.dot[1] + '" r="' + gl.dot[2] + '" pathLength="10000"/><circle class="fd" cx="' + gl.dot[0] + '" cy="' + gl.dot[1] + '" r="' + gl.dot[2] + '"/>';
          s += '<g class="gl g' + i + (g[1] ? " ac" : "") + '" transform="translate(' + GX[i] + ' 0)">' + inner + "</g>";
        });
        return s;
      }

      /* ---------- construction guides: [path, start, duration, initial progress] ---------- */
      const G = [];
      const gd = (d, t0, dur, p0) => G.push({ d, t0, dur, p0: p0 || 0 });
      // around the mark
      gd("M-40 " + CY + "H200", 0, 1.1, 0.7);
      gd("M" + CX + " -96V160", 0, 1.3, 0.7);
      gd(circ(CX, CY, 74), 0, 1.4, 0.55);
      gd(circ(CX, CY, 96), 0, 1.8, 0.45);
      gd(circ(CX, CY, 128), 0.1, 2.0, 0.35);
      gd("M-90 -70L250 120", 0, 1.8, 0.5);
      gd("M-60 160L180 -90", 0.1, 1.8, 0.4);
      gd("M-120 70L300 8", 0.3, 1.6, 0);
      // rulings across the word
      [[-46, 0.2], [0, 0.32], [100, 0.44], [146, 0.56]].forEach((r) => gd("M-300 " + r[0] + "H1500", r[1], 2.4, 0.1));
      // glyph boxes and bowl circles, just ahead of each pen stroke
      const PEN = [3.0, 3.22, 3.44, 3.62, 3.78, 3.98, 4.14, 4.34, 4.56, 4.78];
      const PDUR = [0.55, 0.45, 0.4, 0.3, 0.5, 0.3, 0.5, 0.5, 0.5, 0.5];
      WORD.forEach((g, i) => {
        const x = GX[i], w = GLY[g[0]].w;
        gd("M" + x + " -62V164", PEN[i] - 0.9, 0.7);
        gd("M" + (x + w) + " -62V164", PEN[i] - 0.8, 0.7);
        if ("eda6".indexOf(g[0]) >= 0) gd(circ(x + 50, 50, 50), PEN[i] - 0.9, 0.7);
      });
      // ruler ticks on the baseline and registration crosses
      let ticks = "";
      for (let x = -120; x <= 1420; x += 6) ticks += "M" + x + " 100v" + (x % 30 === 0 ? 9 : 4);
      let regs = "";
      GX.forEach((x) => { regs += "M" + (x - 5) + " 100h10M" + x + " 95v10"; });
      const STATICS = [ticks, regs];

      function planeSVG() {
        let s = '<svg viewBox="-6000 -4400 12000 9000" xmlns="http://www.w3.org/2000/svg"><g transform="scale(' + K + ')">';
        G.forEach((q, i) => { s += '<path class="gd gd' + i + '" d="' + q.d + '" pathLength="10000"/>'; });
        STATICS.forEach((d, i) => { s += '<path class="gs gs' + i + '" d="' + d + '"/>'; });
        s += '<g class="pl">' + lockup(false) + "</g></g></svg>";
        return s;
      }
      const PLANE = planeSVG();
      document.querySelectorAll(".plane").forEach((p) => { p.innerHTML = PLANE; });

      /* flat lockup */
      const FW = 1480, FS = FW / (END_X + 20);
      const LW = (END_X + 20) * FS, LH = 230 * FS;
      const lockF = document.getElementById("lockF");
      lockF.style.width = LW + "px";
      lockF.style.height = LH + "px";
      lockF.style.left = 960 - LW / 2 + "px";
      lockF.style.top = 520 - (27 + 64) * FS + "px";
      lockF.innerHTML = '<svg width="' + LW + '" height="' + LH + '" viewBox="-10 -64 ' + (END_X + 20) + ' 230" xmlns="http://www.w3.org/2000/svg"><defs><filter id="ink" x="-3%" y="-6%" width="106%" height="112%"><feTurbulence type="fractalNoise" baseFrequency="0.55" numOctaves="2" seed="4" result="t"/><feDisplacementMap in="SourceGraphic" in2="t" scale="1.3" xChannelSelector="R" yChannelSelector="G"/></filter></defs><g filter="url(#ink)">' + lockup(true) + "</g></svg>";

      /* date and URL, one span per character */
      const chars = (id, text) => { document.getElementById(id).innerHTML = text.split("").map((c) => '<span class="ch">' + (c === " " ? "&nbsp;" : c) + "</span>").join(""); };
      chars("d1", "16 Dec 2026");
      chars("d2", "meridian26.com");

      /* ---------- timeline ---------- */
      const tl = gsap.timeline({ paused: true });
      function F(target, from, to, at) { tl.fromTo(target, from, Object.assign({ immediateRender: false }, to), at); }
      const gl = (a) => Math.abs(1920 * Math.sin(rad(a))) + Math.abs(1080 * Math.cos(rad(a)));
      const band = (a, off, w) => ({ "--ang": a, "--c": gl(a) / 2 + off, "--w": w });

      gsap.set(".cam", { transformOrigin: "0px 0px" });
      gsap.set(".rot", { transformOrigin: "960px 540px" });
      gsap.set("#dof", band(178, 20, 150));
      gsap.set("#lockF", { filter: "blur(0px)" });

      // camera: frames are {t, target (cam px), zoom, tilt, roll}; one tween per pair of frames
      const U = (ux, uy) => [ux * K, uy * K];
      function cam(frames, ease) {
        for (let i = 0; i < frames.length - 1; i++) {
          const a = frames[i], b = frames[i + 1], d = b.t - a.t;
          F(".cam", { x: -a.c[0] * a.z, y: -a.c[1] * a.z, scale: a.z }, { x: -b.c[0] * b.z, y: -b.c[1] * b.z, scale: b.z, duration: d, ease: ease }, a.t);
          F(".rot", { rotationX: a.tilt, rotation: a.roll }, { rotationX: b.tilt, rotation: b.roll, duration: d, ease: ease }, a.t);
        }
      }
      const ringPt = (a) => U(CX + RM * Math.cos(rad(a)), CY + RM * Math.sin(rad(a)));

      // take 1 (0 - 1.9): extreme macro, camera aims 4 degrees of arc ahead of the pen tip so the tip stays mid-frame
      cam([
        { t: 0, c: ringPt(330), z: 5.2, tilt: 58, roll: -10 },
        { t: 0.95, c: ringPt(373), z: 4.8, tilt: 56.5, roll: -8 },
        { t: 1.9, c: ringPt(416), z: 4.4, tilt: 55, roll: -6 },
      ], "none");
      // take 2 (1.9 - 3.4): wider, ring closes and the meridian is drawn in blue
      tl.set("#dof", band(177, 10, 190), 1.9);
      cam([{ t: 1.9, c: U(78, 40), z: 2.5, tilt: 50, roll: 4 }, { t: 3.4, c: U(116, 36), z: 2.2, tilt: 47, roll: 1 }], "none");
      // take 3 (3.4 - 4.7): letter macro, camera slides right with the pen, about 25 units left of the letter being drawn
      tl.set("#dof", band(176, 30, 160), 3.4);
      cam([
        { t: 3.4, c: U(365, 50), z: 1.9, tilt: 55, roll: -4 },
        { t: 3.64, c: U(463, 49), z: 1.87, tilt: 54.4, roll: -3.8 },
        { t: 4.03, c: U(587, 47), z: 1.83, tilt: 53.6, roll: -3.3 },
        { t: 4.39, c: U(735, 45), z: 1.79, tilt: 52.8, roll: -2.7 },
        { t: 4.7, c: U(933, 42), z: 1.75, tilt: 52, roll: -2 },
      ], "none");
      // take 4 (4.7 - 5.8): pull back while the heavy pen fills every letter; the 6 ends about 280 px inside the right edge
      tl.set("#dof", band(178, 0, 330), 4.7);
      cam([{ t: 4.7, c: U(120, 40), z: 1.15, tilt: 52, roll: -2 }, { t: 5.8, c: U(900, 40), z: 0.78, tilt: 46, roll: 0 }], "power3.out");

      // guides
      G.forEach((q, i) => { F(".gd" + i, { strokeDashoffset: (1 - q.p0) * N }, { strokeDashoffset: 0, duration: q.dur, ease: "power2.out" }, q.t0); });
      tl.set(".gs0", { opacity: 0.8 }, 0);
      F(".gs1", { opacity: 0 }, { opacity: 0.9, duration: 0.8, ease: "power1.out" }, 1.0);

      // thin pen: ring, meridian, then the letters
      F(".ring .t", { strokeDashoffset: 0.45 * N }, { strokeDashoffset: 0.21 * N, duration: 1.9, ease: "none" }, 0);
      tl.to(".ring .t", { strokeDashoffset: 0, duration: 0.7, ease: "none" }, 1.9);
      F(".ell .t", { strokeDashoffset: N }, { strokeDashoffset: 0, duration: 0.9, ease: "power1.inOut" }, 2.3);
      // strokes inside a character run one after another (half-overlapped) and all finish at start + total
      const seq = (n, total) => { const dur = total / (1 + 0.5 * (n - 1)); return { dur, step: dur / 2 }; };
      WORD.forEach((g, i) => {
        const n = GLY[g[0]].d.length + (GLY[g[0]].dot ? 1 : 0), q = seq(n, PDUR[i]);
        for (let j = 0; j < n; j++) F(".g" + i + " .t.k" + j, { strokeDashoffset: N }, { strokeDashoffset: 0, duration: q.dur, ease: "power1.inOut" }, PEN[i] + j * q.step);
      });

      // heavy pen: fills the skeleton
      F(".ring .f", { strokeDashoffset: N }, { strokeDashoffset: 0, duration: 0.5, ease: "power2.out" }, 4.5);
      F(".ell .f", { strokeDashoffset: N }, { strokeDashoffset: 0, duration: 0.5, ease: "power2.out" }, 4.58);
      WORD.forEach((g, i) => {
        const at = 4.66 + i * 0.075;
        const n = GLY[g[0]].d.length, q = seq(n, 0.42);
        for (let j = 0; j < n; j++) F(".g" + i + " .f.k" + j, { strokeDashoffset: N }, { strokeDashoffset: 0, duration: q.dur, ease: "power2.out" }, at + j * q.step);
        if (GLY[g[0]].dot) F(".g" + i + " .fd", { opacity: 0 }, { opacity: 1, duration: 0.18, ease: "power1.out" }, at + 0.28);
      });

      // slow residual push on the whole drawing
      F("#dof", { scale: 1 }, { scale: 1.02, duration: 5.8, ease: "none" }, 0);

      // hard cut to the flat lockup
      tl.set("#dof", { opacity: 0 }, 5.8);
      tl.set("#flat", { opacity: 1 }, 5.8);
      F("#lockF", { scale: 1 }, { scale: 1.03, duration: 1.2, ease: "none" }, 5.8);

      // rack focus: the lockup drops out of focus into the paper
      tl.to("#lockF", { scale: 1.1, y: -90, filter: "blur(16px)", opacity: 0.18, duration: 0.9, ease: "power2.inOut" }, 7.0);
      tl.to("#lockF", { scale: 1.14, duration: 3.1, ease: "none" }, 7.9);

      // date, then URL, type on below the ghost lockup once the defocus has finished (7.9 s)
      F("#d1 .ch", { opacity: 0, y: 8, filter: "blur(6px)" }, { opacity: 1, y: 0, filter: "blur(0px)", duration: 0.5, ease: EXPO, stagger: 0.035 }, 7.75);
      F("#d2 .ch", { opacity: 0, y: 8, filter: "blur(6px)" }, { opacity: 1, y: 0, filter: "blur(0px)", duration: 0.5, ease: EXPO, stagger: 0.035 }, 8.15);

      // film grain: jump the noise tile every frame
      for (let f = 0; f < 330; f++) {
        const pos = ((f * 97) % 256) + "px " + ((f * 61 + 37 * (f % 5)) % 256) + "px";
        tl.set("#grain", { backgroundPosition: pos }, f / 30);
        tl.set("#grainL", { backgroundPosition: ((f * 43 + 11) % 256) + "px " + ((f * 89) % 256) + "px" }, f / 30);
      }

      tl.set({}, {}, 11);
      window.__timelines = window.__timelines || {};
      window.__timelines["main"] = tl;
    </script>
  </body>
</html>
```
