Skip to content

Comment on Generating Voronoi diagrams using Fortune's algorithmparent

Comments

Build a 3D scene of distinctly colored right circular cones with their apexes at the 2D planar vertices, and their axes perpendicular to the plane.

Render a 2D orthographic view from 'above' the apexes.

The z-buffer will preserve pixels from the nearest apex.

(Yes, I now there are shadery ways to do this, but the classic 3D cones demo is trivial to understand and implement).

You don't have to use cones. Paraboloids work too.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.