Collaborative code

Goals and collaboration

This week’s assignment was exciting and challenging.¬†I found it very helpful to work in a small group and share ideas about our codes. From the beginning, Emmanuel, Paula, and I each had one skill we wanted to practice. Rather than focusing on a visual outcome, we initially wanted to conquer our personal goals.

After being inspired by last week’s class, I really wanted to bounce balls on all sides of the screen. This began with one initially moving horizontally from the bottom left of the canvas toward the right. It took me some time to figure out how to restrict the ball within the canvas and ensure that it would continuously¬†move back and forth on its own. Then I added another ball on the top of the canvas also going horizontal. For this ball, I need to define its limits on the y-axis, in order to ensure it would only bounce toward the perimeter. I made the restriction from 0-200, using if-statements.

The most challenging part of this was to get the third ball to move along the y-axis. Initially the ball would bounce vertically down the page without moving on the x-axis at all. Eventually I understood the importance of having different speed variables for each ball.

Once I got all 4 balls moving, I reversed the shapes moving horizontally and then vertically.

Screen Shot 2015-09-23 at 12.07.51 AM

Screen Shot 2015-09-22 at 11.57.53 PM

I eventually I decided to add a basic slider to alter the color of the shapes.

Combining code

Paula’s main goal of this assignment was to practice rotating shapes. When we combined our code it created this amazing continuously changing image. We ended up with 4 sliders: rotation, diameter, count, and shape color.

Screen Shot 2015-09-23 at 12.26.19 AM

Screen Shot 2015-09-23 at 12.25.50 AM