JSFiddle - React, Tailwind, and code Playground
HTML
<canvas id=canvas width=500 height=500
JavaScript
var ctx = canvas.getContext('2d');
for (var i=0; i<10000000; i++) {
var x = Math.random()*2-1, y = Math.random()*2-1, z = 2+Math.random()*2-1;
x = (.5 + .5*x/z) * canvas.width;
y = (.5 + .5*y/z) * canvas.height;
ctx.fillRect(Math.floor(x), Math.floor(y), 1, 1);
}