3 ms·
Great visualization! Can you please add a on-mouse-over so when i hover my mouse over a dot i can see the prime number it represents? Would we see new patterns
by Tepix 1y ago
Great visualization! Can you please add a on-mouse-over so when i hover my mouse over a dot i can see the prime number it represents?
Would we see new patterns emerge if the number of columns increases per row by X (X being constant or perhaps prime numbers ;-) )?
- susam 1y agoAdding mouseover text to every prime number slows down rendering on large grids (say, with a million or more numbers). So mouseover text is available as an optional feature. You can toggle it using the 't' button at the top: click once to enable the text, and click again to disable it.
- Tepix 1y agoThanks, that was fast! Here's an idea on how to implement it without the slowdown: https://jsfiddle.net/qpswztj8/ https://jsfiddle.net/qpswztj8/ Given that it's a preformatted text with a known number of columns, the number below the mouse pointer can be computed using the mouse position, character width and line height.