pointerpointer.com's use of voronoi, canvas, and javascript
Channel:Paul Irish · Length:3:44 · Published:2012-06-11 · Views:40373
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
- 8 Bit & '8 Bitish' Graphics-Outside the Box · GDC Festival of Gaming · 1:25:34
- What the heck is the event loop anyway? | Philip Roberts | JSConf EU · JSConf · 26:52
- The Beauty of Bézier Curves · Freya Holmér · 24:25
- Rich Harris - Rethinking reactivity · You Gotta Love Frontend · 36:45
- The Continuity of Splines · Freya Holmér · 1:13:50
- elevated by Rgba & TBC | 4k intro (FullHD 1080p demoscene demo) · Demoscene High-Quality Videos (Annikras) · 3:36
- Painting a Character with Maths · Inigo Quilez · 24:46
- Crockford on JavaScript - Volume 1: The Early Years · YUI Library · 1:42:08
- RailsConf 2016 - Turbolinks 5: I Can’t Believe It’s Not Native! by Sam Stephenson · Confreaks · 37:37
- The Real Story Behind Wayland and X - Daniel Stone (linux.conf.au 2013) · Mladen Mijatov · 45:35
- A Deep Dive into Nanite Virtualized Geometry · SIGGRAPH Advances in Real-Time Rendering · 1:09:59
- JavaScript: The Good Parts · Google TechTalks · 1:03:47
- Siggraph2019 Geometric Algebra · Bivector · 1:37:21
- Pete Hunt: React: Rethinking best practices -- JSConf EU · JSConf · 29:31
- Dan Abramov - Live React: Hot Reloading with Time Travel at react-europe 2015 · ReactEurope · 30:40
- Hey Underscore, You're Doing It Wrong! · InfoQ · 36:30