Convex hull race
Build a convex hull algorithm race: four panels (a 2 x 2 grid, stacked on narrow screens) each run a different algorithm on its own copy of the same cloud of…
More
1 test · 4 finished runs (4 agent, 0 raw one-shot) · 4 live demos
The prompt
Build a convex hull algorithm race: four panels (a 2 x 2 grid, stacked on narrow screens) each run a different algorithm on its own copy of the same cloud of 120 random points: Graham scan, Jarvis march (gift wrapping), Quickhull and Andrew's monotone chain. Advance every panel one primitive step per tick (one orientation test, one push or one pop) so the speeds are honestly comparable. Draw the candidate hull growing as glowing edges, flash the point being tested, show rejected points dimming, animate stack pops as edges snapping away, and keep a live counter of orientation tests and stack operations per panel. When a panel finishes, fill its hull with a soft gradient, sweep a highlight around the perimeter and stamp its finishing place. Controls: point-set presets (uniform random, circle with noise, clustered blobs, points on a parabola, nearly collinear), a point-count slider (20 to 400), click or tap to add points, speed slider, play, pause, single step and reset. After each race show a small results table (steps, orientation tests, hull size). So the page is alive without input, on load it starts racing the uniform preset automatically, and after each finish it waits 3 seconds and races the next preset in turn, forever, until the user touches a control. Make it precise and beautiful, like a figure from a great algorithms textbook brought to life. Save it as index.html in the current directory: one self-contained file with inline CSS and JavaScript only, no libraries or frameworks, and no external requests of any kind (no CDNs, web fonts, images or audio files). It must work when opened directly from disk, fit any window from a 390 px wide phone to a desktop, and run without console errors. You may serve it locally and open it in headless chromium (/usr/bin/chromium, software WebGL, no GPU) to screenshot and inspect your own output, and iterate on your own before finishing. Close any browser you open as soon as you've taken your screenshot.
Same prompt, all models: step through 4 runsIn the gallery: one player, arrow keys or swipe.