Statistical Analysis Tool for Problem 8

Created in the course of solving problem 8 of the PROMYS India 2024 application set. More details here
I'm too lazy to create a UI - you must use your browser's console. Press Ctrl + Shift + J (Windows/Linux) or Cmd + Option + J (Mac) to open the console.

Interface (or the lack thereof)

Type the function calls directly into the console and press enter to execute them. For example, to create a 10x10 tile and display the third trace of (6, 2), execute drawLattice(10) followed by showTrace(6, 2, 3)