Question: The computer language is in processing. To create a program that will display a ball bouncing up and down on the screen. The movement of

The computer language is in processing.

To create a program that will display a ball bouncing up and down on the screen. The movement of the ball should be governed by "pseudo-physics." That is, for each frame (execution of draw() function) the new height (y-value) is calculated as follows.

velocity = velocity + timeStep * acceleration

height = height + timeStep * velocity

Tasks:

  1. Design a method (algorithm) to solve this problem using pseudocode or a flowchart.
  2. Translate your algorithm into an appropriate Processing program and test it.

Submit:

  • Pseudocode version of algorithm -or- flowchart version of algorithm
  • Processing program

Notes:

  • Remember: The positive direction for the y-axis in Processing is bottom to top.
  • The ball merely needs to bounce up and down; no horizontal (x) motion.
  • Be sure to include a program header (program name, purpose, your name, date created), and other appropriate inline comments.
  • You may add whatever additional features you wish. However, doing so will not impact your grade either up or down, unless the additional features prevent your successfully completing the project as described above.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!