Free Interactive Voronoi Diagram Generator & Lloyd's Algorithm Tool—
gemini-3.0-flash
Generate beautiful centroidal Voronoi diagrams online. Interactive tool for Lloyd's algorithm relaxation, geometric art creation, and data point distribution.
What This App Does
Generate beautiful centroidal Voronoi diagrams online. Interactive tool for Lloyd's algorithm relaxation, geometric art creation, and data point distribution. — generated by gemini-3.0-flash and published by @Akhenaten on Slopstore. Categorized under Utility, this app is part of Slopstore's curated collection of AI-generated tools and experiments. Run it free in your browser. No installation needed.
AI Generation Prompt
Technical Specification: Interactive Voronoi Diagram & Lloyd's Relaxation Tool
Overview
A high-performance, single-file, browser-based utility for generating Voronoi diagrams and applying Lloyd's Algorithm to achieve Centroidal Voronoi Tessellation (CVT). The tool prioritizes a clean, minimalist aesthetic, focusing on smooth interactivity and instant visual feedback.
Core Functionality
- Dynamic Point Placement: Users click on the canvas to add seeds. Dragging existing seeds updates the diagram in real-time.
- Lloyd's Algorithm Relaxation: A 'Relax' button that executes the algorithm iteratively, shifting points toward the center of their Voronoi cells.
- Configurable Settings:
- Iteration Count (for animation loop).
- Point Density Controls.
- Color Palette/Stroking toggles.
- Export: Generate high-resolution PNG or vector-ready SVG files of the current state.
UI/UX Design
- Layout:
- Header: Contains the app title and an "About" modal trigger.
- Toolbar (Top): Responsive container holding Action Buttons (Add, Clear, Relax, Export) and Settings (Slider for iterations, Toggle for showing/hiding seeds).
- Canvas Area: Large, central focus area with a subtle drop-shadow and rounded corners. Must handle resizing.
- Aesthetic:
- Color Palette: Off-white backgrounds (#F9FAFB), crisp borders (#E5E7EB), vibrant accent colors for seeds (#4F46E5 - Indigo), and dark slate for text (#111827).
- Animations: CSS transitions on button hover (0.2s ease), smooth fading for modal interactions, and fluid canvas updates using requestAnimationFrame.
Implementation Directives
- Architecture: Single file (HTML/CSS/JS). Use
<script>tags for D3.js or similar libraries if needed to handle Voronoi triangulation math. - Constraints:
- No Storage: Do not use
localStorage. State management must be handled entirely in volatile memory. - Sandbox Compatibility: No
alert(),confirm(), orprompt(). Create custom CSS-based modals for user interactions. - Browser Compatibility: Must use pure Vanilla JavaScript for event handling and DOM manipulation.
- Performance: Use Canvas API for rendering high volumes of points. Optimize the relaxation loop to run 60FPS where possible.
- No Storage: Do not use
- Responsiveness: Implement a flexible grid system. The canvas should fill available space while maintaining aspect ratio or scaling to fit the mobile device's viewport.
Developer Checklist
- Ensure all assets are linked via CDN (no local files).
- Verify no
localStorageusage. - Test on Chrome, Firefox, and Safari for responsive canvas behaviors.
- Ensure clean, descriptive HTML semantic tags (e.g.,
<main>,<header>,<nav>).
Spread the word
Files being used
Frequently Asked Questions
Everything you need to know about using this application.
What is Lloyd's algorithm?
Lloyd's algorithm, also known as Voronoi iteration, is a mathematical process used to calculate Centroidal Voronoi Tessellation. It repeatedly moves the seed points of a Voronoi diagram to the geometric centroid of their respective cells, resulting in a more uniform distribution of points. The algorithm produces patterns that are widely used in computer graphics, urban planning, and biological modeling. By smoothing out irregularities in initial point placement, it creates an aesthetically pleasing and balanced layout that mimics natural distributions like cellular structures.
How do I export my Voronoi diagram?
This application includes an integrated export feature located in the top toolbar. You can save your generated artwork directly as a scalable vector graphics (SVG) file, which preserves high quality for print or further editing, or as a raster PNG file for immediate web usage. Because the tool operates entirely in your browser using client-side rendering, you do not need to upload any files to a server. Simply click the export button, select your preferred format, and the file will download automatically to your device without external processing delays.
Is this Voronoi generator free to use?
Yes, this tool is completely free and accessible without any usage limits or subscriptions. We built it to be a high-quality utility for students, designers, and researchers to experiment with geometric algorithms directly in the browser without requiring any installation or software sign-up. All processing is performed locally on your machine, ensuring that your work remains private and secure. There are no hidden fees, watermarks, or premium features locked behind paywalls, making it an ideal resource for academic projects or creative prototyping.
Can I use this for artistic projects?
Absolutely. Many artists and designers utilize Lloyd's algorithm to create abstract generative art, floor plans, and unique stipple patterns. By manipulating the point distribution and running the relaxation iterations, you can achieve complex, organic-looking geometric textures that are difficult to create manually. The responsive nature of the interface allows you to experiment with different point densities and arrangements in real-time. Whether you are generating background textures or structural layouts, the tool provides the precise control needed to produce professional-grade geometric visuals for your design portfolio.
Related Applications

Free EDI X12 Syntax Highlighter & Parser Tool
Easily visualize and parse complex EDI X12 files with our free syntax highlighter. Analyze ISA, GS, ST, and SE segments instantly with an intuitive web interface.

Free Online Payment Processing Fee & Reverse Fee Calculator
Calculate payment processing fees and reverse fees instantly. Determine exactly how much to charge to receive your target net amount with this free tool.

Free Specific Heat Capacity & Calorimetry Calculator
Calculate heat energy, mass, specific heat, and temperature change instantly. Use our free thermodynamics calculator for physics and chemistry calorimetry problems.

Free Online XML Sitemap Index Generator
Generate a valid XML sitemap index file by combining multiple sitemap URLs. A fast, browser-based, and private tool for SEO optimization and web indexing.
Discover more free AI apps on Slopstore — the community platform for hosting AI-generated web applications.