Media Computation Skills Lab

MTEC 1003

Lab 13 / Part 3 - Animation

Here in Part 3, you will be creating the following programs together in class:

  1. circle-boundary
  2. circle-bounce

You will then have the choice of completing any 1 out of the 2 additional programs on your own:

  1. circle-boundary-all
  2. circle-bounce-2

circle-boundary

Write a program that draws a circle that moves horizontally from left to right, but whenever it hits the right or left wall, it changes direction.

If video doesn't display above, download it here.


circle-bounce

Write a program that draws a circle that falls vertically by using velocity and acceleration… and bounces after it hits the bottom boundary. Eventually, the circle will stop bouncing.

// if your velocity is less than some minimum value
if (Math.abs(dy) < min_dy_val) {
	// zero out acceleration and velocity
	dy = 0
	acc = 0
}

If video doesn't display above, download it here.


Complete any 1 of the 2 additional programs below on your own & submit before this week's deadline:


circle-boundary-all

Write a program that draws a circle that moves horizontally and vertically, but whenever it hits the right, left, top, or bottom wall, it changes direction.

If video doesn't display above, download it here.


circle-bounce-2

If video doesn't display above, download it here.


Summary: Week 13 Labs

At the end of Part 3 and before the deadline, you should have the following files committed and pushed to your remote repository:

  1. square
  2. five squares (in a row)
  3. additional lab #1 (from Part 1)
  4. additional lab #2 (from Part 1)
  5. Four By Seven
  6. Checkerboard
  7. additional lab #1 (from Part 2)
  8. additional lab #2 (from Part 2)
  9. circle-boundary
  10. circle-bounce
  11. additional lab (from Part 3)
  12. Just like last week, add a brainstorming text file. Call this file events.txt. Now that you know how to do canvas drawing, animation, drawing events, and click events, describe how you will design your website with some of these methods. What would you like to animate? Or, what kind of click event will you use? Remember, some of these are REQUIRED on your final website, and you can't simply copy the code from our labs. You must use your own colors and shapes, so describe how you will adapt these labs to make something that is creatively your own.

MTEC 1003 - Media Computation Skills Lab