Get the latest tech news
Visualizing distributions with pepperoni pizza and JavaScript
javascript) Monday, August 18, 2025 There's a pizza shop near me that serves a normal pizza. I mean, they distribute the toppings in a normal way.
The colloquial understanding of "random" is kind of the Platonic ideal of a pizza: slightly chaotic but things are more or less spread out over the whole piece in a regular way. (It's an outrageous amount of very small pepperoni, chosen in both axes for ease of visualizing the distribution rather than realism.) We'll do this by passing in the center and generating coordinates around those, while still checking that we're within the bounds of the circle formed by the crust of the pizza.
Or read this on Hacker News