The environment that I have built in this sketch is a rock falling down from above onto the ice.
Based on the sketch we made last week in class, I added a condition to check the boundary of ice so that the rock can stop when it hits the ice. Originally, I intended to add a support force that was the opposite of the gravity, but that did not work. Moon suggested using restitution, flipping and decreasing the velocity after each collision.
With the wind function, one can move the rock on the ice based on the mouse X position. There is also the resistance of the ice so that the speed of the rock will gradually decrease.