Free Voronoi Diagram Generator for Stained Glass Art Patterns

Create beautiful, custom stained glass patterns with this free online Voronoi diagram generator. Easily design geometric polygon art, customize lines, and export SVG.

Built by@Akhenaten

AI Generation Prompt

Technical Specification: Voronoi Stained Glass Pattern Generator

Overview

A high-performance, single-file browser application that allows users to generate, edit, and export Voronoi diagrams tailored for stained glass art. The app uses the Delaunay triangulation algorithm (via Voronoi calculation) to create intricate polygon mosaics.

Core Features

  • Interactive Canvas: Click to add points, drag to move points, and watch the Voronoi pattern update in real-time.
  • Customizable Solder Lines: Adjust the stroke width and color of the Voronoi edges to simulate different solder/came thickness.
  • Color Palette Studio: Assign random or custom colors to individual cells or regions.
  • SVG Export Engine: One-click download of the current pattern as a clean, production-ready SVG file.
  • Responsive Controls: Sidebar-based control panel that collapses on mobile devices, ensuring the drawing canvas takes priority.
  • Randomization: One-click "Scatter" function to create organic, non-uniform distributions of points.

UI/UX Design

  • Aesthetic: A premium, light-themed SaaS look. Crisp, high-contrast, professional sans-serif typography (e.g., Inter or System-UI).
  • Layout:
    • Top Navigation: Title and primary action buttons (Export, Clear, Reset).
    • Main Area: A centered, full-viewport responsive <canvas> element surrounded by a drop-shadow container.
    • Sidebar: Floating control panel with sliders for point count, gap thickness, and color preset selectors.
  • Animations: Subtle CSS transitions on buttons (hover states) and smooth fade-ins when elements are generated or deleted.

Color Palette (Light Mode)

  • Background: #F9FAFB (Soft light grey)
  • Primary Surface: #FFFFFF (Pure white)
  • Accent Color: #3B82F6 (Vibrant electric blue)
  • Text: #1F2937 (Dark slate)
  • Border/Dividers: #E5E7EB (Subtle grey)

Technical Implementation Directives

  • Architecture: All logic contained within a single index.html. CSS and JS will be embedded in <style> and <script> tags.
  • State Management: All application state (points array, settings) must be stored in standard JavaScript objects. Strictly NO use of localStorage, sessionStorage, or cookies due to sandboxed environment requirements.
  • Dependencies: Use a CDN-linked lightweight Voronoi calculation library (e.g., d3-delaunay or a standalone Voronoi.js script).
  • Performance: Ensure the requestAnimationFrame loop is efficient to prevent lag when users drag points on large point sets.
  • Compatibility: Application must handle window resizing events to re-center or adjust the canvas coordinate system dynamically.
  • Security: Ensure all external resources are loaded via HTTPS. No eval() or dynamic script injection.
  • Interaction: Custom modals for "How to use" or "Export Options" to avoid the use of blocked alert() or prompt() methods.

Spread the word

3Total Views
gemini-3.0-flashAI Model

Files being used

index.html
11.7 KB
#Voronoi diagram generator#stained glass pattern maker#geometric polygon art creator#tessellation design tool#free SVG pattern generator#custom polygon art software

Frequently Asked Questions

Everything you need to know about using this application.

What is a Voronoi diagram and how does it relate to stained glass?

A Voronoi diagram is a mathematical partitioning of a plane into regions based on distances to a specific set of points. In the context of stained glass, these regions act as the individual glass pieces, while the edges of the Voronoi cells represent the lead came or solder lines that hold the glass together. By manipulating these points, designers can create organic, irregular, or structured geometric patterns that mimic the natural beauty of handcrafted stained glass. This tool simplifies the complex geometry calculations, allowing users to focus entirely on the artistic composition of their pieces.

Can I export these patterns to use with a laser cutter or plotter?

Yes, the tool is designed to generate clean, scalable vector graphics (SVG) which are the industry standard for computer-aided manufacturing. Once you have generated your perfect pattern, you can use the built-in export function to save your design as an SVG file. This file can be opened directly in vector software like Adobe Illustrator or Inkscape, or sent straight to a laser cutter, CNC machine, or vinyl plotter for precise stenciling. Since the output is vector-based, you will not experience pixelation regardless of the print size.

How do I customize the colors and thickness of the lead lines?

The user interface includes a dedicated sidebar for styling your pattern. You can adjust the 'gap' or 'stroke' width, which simulates the thickness of the solder joints between glass pieces. A thinner line creates a more modern, minimal look, while a thicker line provides a more traditional aesthetic. Coloring your glass pieces is as simple as clicking on a cell and selecting a color from our curated, vibrant palette. Because this tool runs entirely in your browser, your color choices are reflected instantly, allowing for rapid iteration of your stained glass masterpiece.

Are there any requirements for my browser to run this tool?

This application is built using modern HTML5 and Canvas technology, meaning it runs best on any standard, up-to-date web browser like Chrome, Firefox, Edge, or Safari. Because the app is completely self-contained, it does not require any plugins, flash players, or external software installations. Furthermore, the application is designed to be fully mobile-responsive. Whether you are working on a large desktop monitor to see fine details or using a tablet to sketch out quick ideas, the interface will adapt to your screen size without losing functionality or performance.

Related Applications