Monday, October 29, 2012

Programming with Processing: Processing Exercise


            For this assignment, we created a screen drawing using a background image of a tree as well as a simple leaf shape in a simple yellow color. We first had an ellipse draw for the leaf but decided to make it more detailed with the leaf shape which is a png image.
            We used variables to parameterize the characteristics of our design such as the background color, size, image, mouse position and direction. This way, the choices can be changed at the top of the file instead of searching through the code to find replacements.
            We developed an algorithm for changing the direction the leaf is “floating”. If the down arrow is pressed, the y position increases and the x position increases making the leaf go towards the bottom right corner. If the other arrows are pressed, the leaf increases and decreases the x and y positions in the correct direction to change the leaf’s location across the page. When the mouse is clicked, the leaf is given the x and y position of the mouse. 





Problems:

While creating our animation, we had difficulty getting the leaf to our desired shape. One way to create a more leaf like image would be to use vertex() and connect multiple points together with noStroke().

No comments:

Post a Comment