Divide the screen into three sections vertically, each of which represents a kind of environment by drawing two rectangles.
Create three classes of ellipses that match with the three environments.
In the first section, I made some random balls that would follow the movement of the mouse to change their moving direction applying the positions of mouseX and mouseY to create vectors. I also added some forces that vary according to the range of the mouse’s positions.
In the second section, I applied coefficient and resistance to three balls, making them act differently while falling from the first to the second section. I also applied the positions of the mouse to create vectors and forces so that they can move with the mouse when they touch the ground of the second section.
In the third section, I used friction to make the three balls act differently when traveling through the second and the third section with also the force generated by mouse positions applied. I used coefficient and resistance in order to make the balls move slowly with certain difficulties to show the features and impacts this kind of environment has upon the balls.