creative-algs

Compute Voronoi diagrams and shape helpers in pure TypeScript.

4|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/AvneeshSarwate/avTools --skill creative-algs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: creative-algs
Source: https://github.com/AvneeshSarwate/avTools/tree/main/skills/creative-algs
Command: npx skills add https://github.com/AvneeshSarwate/avTools --skill creative-algs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a zero-dependency, pure TypeScript toolkit for computational geometry and data-structure utilities, enabling creative coding projects to run in both Deno and browser environments without external runtime requirements.

Core Features & Use Cases

  • Voronoi diagrams with polygon extraction and point utilities for creative coding.
  • Shape helpers for 2D geometry, polygon operations, and point-in-polygon testing.
  • VariationTree for live-coding explorations and algorithmic experimentation.
  • Finite sequence combiners (Zipper, RootLooper, Nester) for complex, reusable animation sequences.
  • Zero external dependencies; runs in browser, Deno, or Node.

Use cases include visualizing Voronoi diagrams in generative art, interactive sketches, and exploratory data-driven visuals across environments.

Quick Start

Import the library and compute a simple Voronoi diagram:

  • Import: import { Voronoi, getVoronoiPolygons, filterSimilarPoints } from '@avtools/creative-algs';
  • Create: const vor = new Voronoi();
  • Sites: const sites = [{ x: 100, y: 100 }, { x: 300, y: 200 }, { x: 200, y: 400 }];
  • Diagram: const diagram = vor.compute(sites, { xl: 0, xr: 800, yt: 0, yb: 600 });
  • Polygons: const polygons = getVoronoiPolygons(diagram, sites);

Frequently Asked Questions about creative-algs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I compute Voronoi diagrams in TypeScript for generative art?

To compute Voronoi diagrams in TypeScript, instantiate a Voronoi class, pass an array of site coordinates and bounding box dimensions to the compute method, then extract the resulting polygons using the getVoronoiPolygons helper utility.

Can I use a pure TypeScript geometry library in both browser and Node environments?

Yes, you can use this zero-dependency pure TypeScript geometry library in browser, Node, and Deno environments because it has no external runtime requirements and relies entirely on a cross-environment TypeScript API.

What is the best way to run point-in-polygon tests for 2D geometry without external dependencies?

The best way to run point-in-polygon tests without external dependencies is using built-in shape helpers that provide 2D geometry and polygon operations for creative coding entirely within a pure TypeScript implementation.

How do you generate complex animation sequences for interactive sketches?

You generate complex animation sequences for interactive sketches by using finite sequence combiners like Zipper, RootLooper, and Nester to build reusable algorithmic animation logic in TypeScript.

Are there limitations to using zero-dependency TypeScript algorithms for creative coding?

A limitation of using zero-dependency TypeScript algorithms is that you must manually integrate rendering logic with your environment's canvas or graphics API, as the toolkit focuses strictly on computational geometry and data structures rather than visual rendering.