That's a neat approach! So basically something like this: https://editor.p5js.org/spyrja/sketches/eYt7H36Ka
EDIT: Plotting it out as a point cloud seems to confirm your suspicion.
Without scaling: https://editor.p5js.org/spyrja/sketches/7IK_RssLI
Scaling fixed: https://editor.p5js.org/spyrja/sketches/kMxQMG0dj