oneshotlm
Compare all models on this prompt →

Mandelbrot explorer · ling-2.6-flash

Output generated Cost / run $0.0003 Runtime 45.0s

Prompt for this run

Render the Mandelbrot set with a smooth color gradient on a full-screen canvas, with click-and-drag to pan and mouse-wheel to zoom.

⛨ sandboxed Open in new tab ↗

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelling-2.6-flash
vendorinclusionai
harnesspi-agent
generated2026-08-01

METRICS

runtime45.0s
tokens in13k
tokens out4.7k
cached1.5k
cost / run$0.0003
Transcript · 6 messages
user

Render the Mandelbrot set with a smooth color gradient on a full-screen canvas, with click-and-drag to pan and mouse-wheel to zoom.

assistant

I'll create a single-file HTML app that renders the Mandelbrot set with smooth coloring, full-screen canvas, and interactive pan/zoom via click-drag and mouse wheel.

→ write /tmp/ws/index.html (11699 bytes)
toolResult

Successfully wrote 11699 bytes to /tmp/ws/index.html

assistant

The file has been created at `/tmp/ws/index.html`. Let me verify it's working properly.

→ bash {"command":"head -5 /tmp/ws/index.html && echo \"...\" && wc -l /tmp/ws/index.html && ls -lh /tmp/ws/index.html"}
toolResult

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> ... 371 /tmp/ws/index.html -rw-r--r--. 1 node node 12K Aug 1 17:49 /tmp/ws/index.html

assistant

The file has been created successfully. Here's a summary of what's included in `/tmp/ws/index.html`: ## Features 1. **Smooth Mandelbrot rendering** — Uses the continuous (smooth) escape-time algorithm with HSV-based smooth color gradients across 6 color segments (deep blue → cyan → green → yellow → red → purple). 2. **Full-screen canvas** — Automatically resizes to fill the viewport at device pixel ratio (up to 2x) and handles `resize` events. 3. **Click-and-drag panning** — Click on the canvas and drag to translate the view across the complex plane. 4. **Mouse-wheel zoom** — Scroll to zoom in/out centered on the cursor position. 5. **Progressive rendering** — First renders a low-resolution preview quickly, then refines to full quality on idle. 6. **Touch support** — Pinch-to-zoom and single-finger drag on touch devices. 7. **Double-click reset** — Double-click to reset the view to the default Mandelbrot region. 8. **Performance optimized** — Uses `putImageData` with `Uint32Array` pixel manipulation for fast drawing, and super-sampling (2x) for sharper views when zoomed in. You can open this file directly in any modern browser. No external dependencies or network requests are required.