Create a progressive sinusoidal surface inside a circle in Grasshopper

Hello everyone,

I want to create a sinusoidal surface in Grasshopper similar to the image below:

The surface has regular waves in X and Y, like this function:
z=A⋅sin⁡(kx)⋅sin⁡(ky)z = A \cdot \sin(kx) \cdot \sin(ky)z=A⋅sin(kx)⋅sin(ky)
where A is the amplitude and k is the frequency.

Goals:

  • Generate a grid of points (X,Y,Z) where Z is calculated with the sinusoidal function.

  • Rebuild the surface from these points.

  • Keep adjustable parameters (amplitude, frequency, resolution).

  • Important: The surface should fit inside a circle → all points outside the circle should return to the same height (for example Z = 0) so the surface ends in a circular shape.

  • Ideal: The sinusoidal waves should be progressive, higher in the center of the circle and gradually flatten toward the edge, ending in a smooth flat surface.

Questions:

  1. What is the best way to create this surface in Grasshopper?

  2. Should I use Graph Mapper, Expression, or a Python/C# script?

  3. How can I make the transition to the circle smooth and progressive?

  4. What is the best way to rebuild the surface (Surface from Points or another method)?

Thanks in advance for your help! If you have an example Grasshopper definition (.gh), that would be great

sin wave v0.gh (83.0 KB)

I think this topic is discussed numerous times, search this forum with key word sine wave or cosine wave.

4 Likes

Wow, so many custom user objects!