parametric wave

I enjoyed watching a reel on instagram of a company that designs parametric objects like this one, and I was curious to see if it could be generated somewhat automagically on openscad. Had a blast cause I asked CHATGPT for help and I got something like this ... but never got the objects to clamp down on z-axis=0.
Still, it's a foundation for awesome 3d printing projects.