Image of My Model
Description
Step 1: I created a grid of points using a code block, and then duplicated this by adding a height parameter to create the top of the cylinder. I used these two stacked grids to create the initial cylinders. I then created a pebble location using two sliders for x and y
Step 2: I determined the distance from the pebble to the cylinders using the pebble location point and the cylinder.bypoints.radius.
Step 3: I created a sine wave. I used a # of waves, offset, and amplitude slider to control the sine wave. I multiplied the angle value (distance from pebble to cylinders) by the number of waves, and fed this value into the Math.sin code block.
Step 4: I took the absolute value of the Math.sin block to ensure the ripples stayed above 0.
Step 5: to reduce the amplitude as the ripple extends, I multiplied it by the (Max Distance/Distance) and used that as the base offset value
Step 6: I adjusted the cylinder height. I used the initial grid block points for x, a slider for y, and basoffset * sine value * amplitude for z (aka cylinder height)
Step 7: I incorporated this code into revit by placing cylinder elements with the Cylinder:Cylinder family type, and used a number slider and cylinder height blocks as the values for radius and height.