Flag: "Chladni" vibration patterns on a 2D square plate. Auto 0: alter m and n yourself to get different patterns. Auto 1: m, n, & resulting patterns change automatically. Try different color multipliers. Spacebar: hides variables. "b" to draw violin bow to vibrate plate.
Keeping code simple, plate vibrations at each point: cos(n * x) * cos(m * y) - cos(m * x) * cos(n * y) That works if you range x from -180 to 180. Otherwise, use fractions (vary to get different plate sizes). Chladni patterns are typically shown as particles on a vibrating square plate. A violin bow or sound underneath makes it plate vibrate. Particles end up in the places where harmonics cancel (zero vibration): cos(n * x) * cos(m * y) - cos(m * x) * cos(n * y) = 0 Those x and y coordinates where the above equals zero are where harmonics cancel, shown as white (or any single color one chooses). That one color, say white, represents the particles, like sand, that go to spots that don't vibrate. That's how I did it in a previous project. But in this project, I just show the vibration amplitudes with color (no white, nor any emphasis on zero amplitude). My older version: https://turbowarp.org/624866307 With that older version, I also had used Leopard to translate to javascript: https://yh2on.csb.app/ Compare with: https://demonstrations.wolfram.com/ChladniFigures/