Skip to content

Add standalone Mandelbrot set renderer in JavaScript - #1683

Open
Copilot wants to merge 1 commit into
mainfrom
copilot/mandelbrot-set-renderer
Open

Add standalone Mandelbrot set renderer in JavaScript#1683
Copilot wants to merge 1 commit into
mainfrom
copilot/mandelbrot-set-renderer

Conversation

Copilot AI commented Aug 6, 2026

Copy link
Copy Markdown

Summary

Adds a small, dependency-free Mandelbrot set renderer using plain JavaScript and the HTML5 Canvas API.

What it does

  • Renders the Mandelbrot set with smooth (continuous) coloring
  • Interactive zoom via scroll wheel or click (shift+click to zoom out)
  • Drag-to-pan navigation
  • Iteration budget auto-increases when zooming in for finer detail
  • Cardioid / period-2 bulb early-out checks for faster rendering of interior regions
  • "Reset View" and "Save PNG" buttons

Usage

Open examples/mandelbrot/index.html directly in a browser - no build step needed.

Testing

  • Verified core escape-time math logic in isolation (in-set points reach max iterations, out-of-set points escape quickly, boundary points behave as expected)
  • Syntax-checked the extracted JS with node --check
  • Could not run a full headless-browser visual screenshot in this sandbox (Playwright browser download stalled on network), but the algorithm and interaction logic were verified directly.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Includes a dependency-free HTML5 canvas renderer with smooth coloring,
interactive zoom/pan, and PNG export.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants