Change to 1k granularity for points

This commit is contained in:
Evolvedexperiment 2021-03-02 19:11:17 +00:00
parent e4718a0844
commit cd4f69ef08
4 changed files with 39 additions and 7 deletions

View file

@ -615,7 +615,7 @@ function generateSeed() {
// Place points to calculate Voronoi diagram
function placePoints() {
TIME && console.time("placePoints");
const cellsDesired = 10000 * densityInput.value; // generate 10k points for each densityInput point
const cellsDesired = 1000 * densityInput.value; // generate 1k points for each densityInput point
const spacing = grid.spacing = rn(Math.sqrt(graphWidth * graphHeight / cellsDesired), 2); // spacing between points before jirrering
grid.boundary = getBoundaryPoints(graphWidth, graphHeight, spacing);
grid.points = getJitteredGrid(graphWidth, graphHeight, spacing); // jittered square grid