Prompt template
Spiral Galaxy Particle Observatory — Single-File HTML Canvas Prompt
A detailed one-shot coding prompt for a self-contained HTML page that renders a rotating spiral galaxy of ~42,000 particles with differential rotation, additive glow, nebula dust, an observatory-style HUD and drag/zoom controls. The example video shows an unreleased Flash model's one-shot result. Shared by @MiaAI_lab.
Demo video
View caseStart from an example
Pick an example to load its exact settings, then make it yours.
Make it yours
Only the parts worth changing are shown. The prompt updates as you go.
Your prompt
Create a single self-contained HTML page that renders a rotating spiral galaxy made of tens of thousands of particles on a full-viewport 2D canvas, presented as a quiet astronomical observatory instrument. The page is pure black (#000000) with a very faint starfield and a dozen distant, softly blurred background galaxies (tilted ellipses drawn as radial gradients) pre-rendered to an offscreen canvas. A radial vignette darkens the corners. The galaxy itself is built from roughly 42,000 points (drop to ~14,000 when prefers-reduced-motion is set). Eighteen percent form a spherical bulge using Gaussian scatter; the remainder are distributed along two logarithmic spiral arms using r = a·e^(bθ) with b ≈ 0.28, an exponential density falloff in radius (mean 0.32 of the disk radius), and angular scatter that widens with radius so arms are crisp near the core and diffuse at the rim. Each particle stores radius, base angle, vertical height (disk thickness ~0.06 scaled by radius), size and brightness. Colors are mapped by radius: warm white/yellow in the core (#FFEBBE to #FFCD82), blue-white along the arms (#CDD7FF to #91C3FF), and faint red-magenta dust at the outer edge (#AA7882 to #D25058). About six percent of arm particles are "hot" oversized blue knots at full brightness. Rotation is differential: angular velocity ω = 0.35 / (0.25 + r), so the inner disk visibly outruns the outer arms and the spiral winds over time. Project the 3D disk to 2D with a yaw rotation about the disk normal followed by a tilt rotation about the screen X axis; depth slightly scales point size. Render with globalCompositeOperation "lighter" for additive glow, drawing every particle as a pre-rendered 32px radial-gradient sprite tinted per quantized color and cached in a Map. Above the disk, a "nebula dust" layer of ~90 large soft radial-gradient ellipses follows the arms (warm peach near the core, cobalt and wine-red farther out) at 6–9% alpha, plus a warm radial core glow. HUD typography: designation line in a tiny uppercase monospace with 0.32em tracking (#6D7787), the galaxy name "NGC 7741 Meridian" in a large serif (Iowan Old Style / Palatino / Georgia) with the word Meridian italic in amber (#FFD9A0) and a soft amber text-shadow, and an italic serif classification paragraph. The bottom-left stats strip (Particles, Distance in Mly, Diameter in kly, Tilt, Zoom) uses tabular monospace numerals with the first three counting up over ~3.2 seconds with a quartic ease-out. The HUD fades in over 2.4 seconds. Top-right holds a small SVG compass whose needle rotates with the yaw. Right edge has four round glass buttons (zoom in, zoom out, pause, reset) with blur backdrop, scaling to 1.12 on hover and glowing amber at the border. Interactions: pointer drag changes yaw (horizontal) and tilt (vertical, clamped between near face-on and near edge-on); mouse wheel and two-finger pinch zoom between 0.35× and 6× with eased approach; Space toggles rotation; reset returns to the default oblique view. The canvas must handle window resize and devicePixelRatio (capped at 2). Mood: contemplative, precise, slightly reverent — a planetarium display at midnight.
Click a highlighted part to change it.
When to use it
Use when you want to benchmark a coding model on a dense, spec-heavy creative-coding task or need a polished galaxy visualization page.
How to get the best result
- Change the galaxy name, particle count or mood line; keep the numeric spiral and color specs for a faithful result.
- Ask the model for a single self-contained file and open it directly in a browser to test.
Watch-outs
- Weaker models drop parts of the spec (HUD count-up, compass, pinch zoom); check each interaction.
- 42,000 additive sprites can be slow on low-end devices; lower the count if frames stutter.
Related templates
- Claude Motion 20s Explainer BriefUse when you have a report, notes or chart and want Claude Motion to produce a short on-brand explainer for a specific audience and placement.
- 空想美術館 — Turn Any Word Into an Imaginary Museum Interior (ChatGPT)Use when you want a striking, gallery-quality fantasy interior from a single word, e.g. a season, food, emotion or place.
- International City Travel Art Print — Hand-Drawn Doodle Poster (GPT Image 2.6)Use when you want a collectible, screen-print style city poster for wall art, merch or a travel post.
- キャラクター×休日AM7:00 — What Your Character Does at 7 AM on a Day Off (ChatGPT)Use when you want a cosy, in-character morning snapshot of your original or fictional character instead of a posed portrait.
- Photo to Abstract Symbol Design Poster — Swiss / Risograph Style (GPT Image 2.6)Use when you want an art-institution style poster or brand-mark style artwork derived from a place, object or scene photo.
- Photo to Layered Paper-Cut Diorama Split Poster (GPT Image 2.5)Use when you want to turn a travel or landscape photo into a keepsake-style poster that pairs the real moment with a paper-art version.
Source and attribution
- Example cases by
- Mia