{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ee150_bball

# ee150_bball - Last Revised 1 EE 150 Lab 4a – Watch the...

This preview shows pages 1–3. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Last Revised: 10/6/2008 1 EE 150 Lab 4a – Watch the Bouncing Ball 1 Introduction In this lab you will create an animation of a bouncing beach ball as it is thrown from a specific height at a certain velocity and angle. Your program will first use the laws of physics to model gravity, friction, and loss of momentum. Then, you will use geometric modification techniques to create an animation of a multi-colored beach ball moving along the calculated trajectory (including spinning and possibly compression when bouncing). 2 What you will learn This lab exercise will familiarize you with the mathematics required to produce and manipulate graphics and computer animation. Linear and affine systems will be discussed and used to create the animation. Underlying this assignment will be Matlab’s ability to perform of matrix operations. 3 Background Information and Notes Bouncing Ball Physics . To produce the animation of the bouncing ball we first need to calculate the path/trajectory of the ball. Using simple physics we can calculate the position of the ball at a time, t by tracking its velocity and using that to calculate the x,y position. (Important: We will always track the center of the ball rather than its exterior). For example, the y-axis position of the ball can be described with: ? ? + ∆?¡ = ? ?¡ − ? ? ?¡ ∙ ∆? We will track the velocity vector, v , via its x,y components: v x and v y (m/s). In this way we will see that gravity only affects v y and not v x . However, friction and loss of energy due to the ball hitting the ground will serve to reduce and change direction of v y while also reducing v x . We will also track the angular velocity, ω (radians/sec), of the ball as it spins. Again, this angular velocity will be reduced due to friction when the ball hits the ground. To model friction and loss of energy, we will assume that when the ball comes into contact with the ground (think about how you would determine when the ball is in contact with the ground), we will reduce the velocities by a certain factor, μ y (say 0.75), μ x (say 0.9), and μ ω (say 0.8). In addition, v y will change direction (i.e. sign) when the ball hits the ground. ? ? ? + ∆?¡ = ¢ − ? [ ? ? ?¡ − ? ∙ ∆? ], ?? ?? ?£ ?¤?¥¦?§? ?¦¨ ?©¤?§ª ? ? ?¡ − ? ∙ ∆? , ¤?¦¨©«?£¨ ¬ EE 150 Lab 4a - Watch the Bouncing Ball 2 Last Revised: 10/6/2008 ? ? ? + ∆?¡ = ¢ ? ? ? ?¡ , ?? ?? ?£ ?¤?¥??¦§ ??¨ §©¤?¦ª ? ? ?¡ , ¤??¨©«?£¨ ¬ ? + ∆?¡ = ¢ ?¡ , ?? ?? ?£ ?¤?¥??¦§ ??¨ §©¤?¦ª ?¡ , ¤??¨©«?£¨ ¬ We will use the above equations to calculate the position (x- and y-coordinates of the center of the ball) and rotation angle , Θ, for each frame of our animation. Since the animation will run at 30 frames per second, Δt will be 1/30 seconds. For now we will not scale the ball, but have an extra credit option to scale the ball to model the compression experience when it hits the ground. the compression experience when it hits the ground....
View Full Document

{[ snackBarMessage ]}

### Page1 / 8

ee150_bball - Last Revised 1 EE 150 Lab 4a – Watch the...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online