Processing: Exploring the water cycle with a Processing program Peabody Charter 5th grade -‐-‐ Z. Wood & J. Wilcox & K. Davis Today we will work with an existing program about the water cycle to practice understanding the water cycle and to practice creating shapes in a specified location. Our goal is to practice modeling ellipses and triangles to create a specified picture and to apply our understanding of the water cycle to answer some questions about evaporation, condensation and precipitation. To start with you must figure out how to model an image of the sun, using two triangles (one upside down) and an ellipse. Important: Your sun should be centered at the coordinates (50, 50). The ellipse for the center of the sun, should be 80 pixels wide and the triangles should have edges approximately 100 pixels long (but you should draw the triangles first then the ellipse to make it look like a sun). Use “sunny colors”. The below images illustrate each shape that makes up the “sun”. The first triangle of the sun The second triangle to make the sun The final appearance of the sun, with an ellipse in the middle. TODO: Below on the grid, you must plot out the triangles you will draw – list the coordinates for each of the triangles vertices on the grid below. Recall that each grid line is 50 pixels away from its neighbors. |-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ x -‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐-‐ | | | | y | | | | v Now in the space below write the code that you plan to type into the Processing program: Recall that the shape commands are: • ellipse(x, y, width, height); • triangle(x1,y1, x2,y2, x3,y3); fill(_____________________________); triangle(_________________________); triangle(_________________________); fill(_____________________________); ellipse(__________________________); If you are interested, this program is based off a simple model of physics for a particle system. You can read more about particles systems on the web. They have been used in computer graphics to model fire, fireworks, dust, smoke and many other things. The general idea is that each “particle” is a small mass that has forces that act on the mass to move it around as the system progresses. This implementation uses a very simple forward method to model the application of forces to the particles. Name:__________________________________________ Water Cycle questions: 1) What color are the particles when they evaporate? __________________________________________ 2) What color are the particles as they are starting to condense? __________________________________________ 3) What color are the particles when precipitation begins? __________________________________________ 4) What color are the particles when they are a collection of water (the sea or lake)? __________________________________________
© Copyright 2026 Paperzz