pointerpointer.com's use of voronoi, canvas, and javascript

Channel:Paul Irish · Length:3:44 · Published:2012-06-11 · Views:40373

Watch on YouTube

Summary

Paul Irish explains how pointerpointer.com works. It uses a hidden canvas of colored Voronoi regions to look up which photo matches the cursor position.

Why HN recommends it

HN links it as the author's own breakdown of Pointer Pointer's inner workings.

Paul Irish did a breakdown of it quite a while ago — HN, 2020

Web development · Computer graphics & rendering · Creative coding & generative art

Subtitles (excerpt)

hey uh so my friend Mark sent me this site uh pointerpointer.com today uh and it's pretty rad so I'm going to show a little bit of how Works um first please remove your cursor place your cursor put it in there pun are located pointing uh do it again move my cursor you just wait a little bit and the person is pointing to where my cursor is uh I can repeat this for quite a while wow and uh they're all you know accurate and it's kind of creepy in a way um all right so I was like how did they do this um uh so let's find out so what I'm going to do is uh open up com Dev tools um first actually view Source um we got a pretty basic page but we do I do see a canvas down here um and if I go up uh we have functions. Js and said functions it's look like we have a little script loader we load in a jQuery bootstrap stats. JS grid uh veroni core varai grid colors Point flasher animator and then we kick off flasher okay looks like we are um app code is going to be so I'm G open that up real quick uh see flasher Okay cool so um um we got some initialization things and then here's where it kind of gets interesting we grab uh grid positions. Jason great okay so grid compositions at Jason is just a a big Jason list of X and Y

On Hacker News

Here's a picture of all the different regions: [LINK] For those curious if how it works, Paul Irish did a breakdown of it quite a while ago: [VIDEO] TL:DW - Vornoi Diagrams[1] and manual tagging, no machine learning needed. [1] [LINK] — Conlectus, 2020-12
Paul Irish explained the basics of how it works here: [VIDEO] I wonder if you could create something similar nowadays using generative AI but with the finger in a very specific location without pregenerating thousands of images. — petercooper, 2025-10
I made a quick video explaining how the webapp works: [VIDEO] Essentially, using the gridPositions.json to populate a Voronoi Grid (toggle display of the <canvas> in your browser). Then your cursor position is used against the grid to find which shape encloses it which maps back to the source JPEG which is then displayed. — paulirish, 2012-06

Related videos