To create the grid of points, I had an integer slider for each x, y, and z value for each coordinate point and flattened the list. I first started with a smaller 10 x 10 grid with spacing of 1 to minimize the computing run time.
To compute the width and height values of the cuboids, I added a formula dividing the number of points along one side of the grid by the spacing.
I created the attractor point with similar integer sliders for the x, y, and z coordinates and added the geometry distance node to get the distance between the origin points of the grid and the attractor point.
For the sine wave parameters, I added integer slides for number of waves, amplitude, base height (amplitude +1), and max distance. These were the inputs for the sine wave formula code block that was then the input for the height of the cuboids. At this point, I also played around with moving the attractor point, as well as the various sine wave parameters, to see the effects of each on the geometry.
To translate the cubes up to go only upwards from a z-value of 0, I added a code block that divided the outputs of the sine wave formula by 2 and translated the cuboid geometries up the z-direction by that much. Finally I hid the geometry of the original cuboids to only show the translated geometry.
Once I saw the geometry was working, I scaled up the number of points on the grid to 200 and adjusted the spacing to get a scale of cuboids that would reasonably show the effect of the sine wave function changing.
Some challenges I faced:
- Getting the scale of cuboids and scale of sine wave functions right to most clearly show the effects of the attractor point location on the geometry changes (sometimes, having too many waves made the effect look random)
- Figuring out how the width and length values based on the grid point inputs
- Understanding the various sine wave function inputs