Project #2
(Modified Curling)
(Due 27 September 2006)
The sport of curling is relatively simple. Teams slide rounded chunks of granite (called rocks) along the ice for a distance of about 140 feet toward a target (called the house). The team that gets its rock(s) closest to the center of the house get points and eventually the team with the most points wins. The physics of curling is fairly simple because of the ice and the fact that the rocks are all the same size and weight. When we consider a situation in which an adult team (which uses standard 44 pound rocks) plays against a child team (which uses 22-pound rocks), the physics is a little more complicated. In the picture below, the adult team's rock (the black one) is already in the house and the child team's rock (the green one) is sliding toward it. The child's intent is to ricochet off black one toward the center of the house (as the green line shows) and at the same time cause the black rock to move away along the pink line.
We let Vi represent the velocity of the child's rock at the instant it makes contact with the black rock. Then, Vm will be the velocity of the child's rock after striking the black rock and Vb will be the velocity of the black rock. Theta(θ) is the angle that the child's rock takes relative to its original path and Phi(φ) is the angle that the black rock takes relative to the child rock's original path. If we assume a perfectly elastic collision (the simplest one to calculate with), then based on the laws of conservation of momentum and energy, we can calculate Vm, Vb, and φ if Vi and θ are known by solving the following equations.
The algebra and trig needed to solve these is kind of messy, so I will just give you the results. First, we solve for sin φ using
we
can take the Arcsin to get φ itself.
We can then get Vb as
and
finally, we can get Vm using the middle equation as
You are to write a program that prompts for the initial velocity (Vi) and θ and then calculates φ, Vb, and Vm for it. In so doing, you will be determining what happens to the black rock after the collision and the speed at which the green rock is approaching the center of the house. Here is an example of the results you might get. Suppose the initial velocity is 5 meters/sec and θ is 50 o. Your program should determine that φ is 13.74 o, Vm is 1.32 meters/sec and Vb is 2.14 meters/sec (these are approximate answers).
Approximately three days before this project is due, I will specify the actual initial velocity (Vi) and theta that I want you to use when you run your program to get the output to hand in.
You are to hand in a printout of your well documented program and a screen capture of the output of your program when you enter the values I give you later. You must also copy the .cpp file to the handin folder on the P drive. Before copying, be sure to name this file after yourself. For example, I would name mine p2-wolfe.cpp
Note: to take the sin or cos of an
angle, that angle must be expressed in radians. You can convert degrees
to radians using the formula: radians = (degrees / 180
) * π
Or convert from radians to degrees using
degrees = (radians * 180) / π