My Code:
https://editor.p5js.org/wallflower/sketches/Z0zgNt2UT
For this simulation assignment, I designed patterns using the Chladni Wave algorithm. Chladni patterns emerge when small particles, like salt or sand, are sprinkled onto a vibrating metal plate. As the plate vibrates at different frequencies, the particles gather at points of minimal vibration, forming intricate geometric patterns.
These patterns were first discovered by Ernst Chladni, an 18th-century German scientist, who demonstrated that sound waves create visible geometric shapes. By changing the frequency of vibration, the shapes also change, revealing the connection between sound and physical form.
How Do These Patterns Emerge?
Standing waves are waves that remain stationary within a medium instead of traveling through space. They form when two waves of the same frequency and amplitude move in opposite directions and interfere with each other. This interference creates:
• Nodes – Points of no motion where particles accumulate.
• Antinodes – Points of maximum motion where particles are pushed away.
In the context of Chladni patterns, the vibrating plate generates standing waves, guiding the particles to settle along nodal lines, resulting in the complex and mesmerizing designs characteristic of Chladni figures.
function chladni(x, y) {
let L = 1;
return cos(n * PI * x / L) * cos(m * PI * y / L) -
cos(m * PI * x / L) * cos(n * PI * y / L);
}
N and M are the variables that effect the frequency of the wave in opposite directions and L is the normalization factor to scale the calculation.