Week 3 Animation Assignment

For this project I wanted to create everything myself, without using any of the same code we used in class or trying to make anything similar to what we did in class. The principles of animation/life that I wanted to show were squash and stretch and timing. What I ended up creating was an animation of a ball bouncing from the left side of the screen to the right.

I actually struggled a lot with this project. My code was not very object oriented and I feel that I didn’t go about creating the layout in the best way.

I decided to correlate the xPosition of the ball with frameCount, which I figured was a good idea since in physics, by the laws of projectile motion, the velocity in the x Direction shouldn’t really change unless something acts upon it. However I made the decision to also connect the Y-Velocity to frameCount, thinking only of the first stage of the drop, where the velocity needs to pick up as the force of gravity acts upon it.

I decided to break up the animation into 3 stages: 1) the ball drops, 2)while on the ground, the ball experiences vertical compression and a horizontal stretch as it bounces, 3) the ball bounces back up into the air and out of the frame.

The flaws to this approach, at least in my execution was a disregard for later stages when focusing on the current stage, resulting in inconsiderate variable creation and design (i.e. yVelocity being directly correlated to frameCount). Because yVel is in direct correlation to frameCount, the ball exhibits this strange behavior where it bounces and leaves the ground with much more speed than it hit the ground with, as if charged with energy while on the ground.

Some areas for improvement on this project would be making it repeatable (not only executing once, but the animation restarting after completing the bounce), adding more bounces that are progressively lower, and fixing the velocities to mimic reality more closely. It would also be really cool to see this in 3D!

You can see the project here.