I came across a previous question regarding how soundproof foam absorbs sound: How does foam "absorb" sound? where the answer explains the properties of the foam itself rather than the shape.
However, in analyzing audio spectrogram images (and messing around with Chrome Music Lab), I noticed a similarity in structure between acoustic foam and 3-dimensional spectrograms. The first two images are spectrograms and the latter two are two different acoustic foam designs.
It appears that, depending on the kinds of soundwaves (music recording, conversation, etc.), the foam would be designed to replicate similar shapes and fit together almost like a puzzle piece.
My question is: Are soundfoam shapes designed to sort of "mirror" the incoming soundwaves?