This is the infamous grapefruit lab, which has existed in one form or another in this course for many, many years. For the time being, the question is to be solved in mathematica, which makes the exercise much less painful! Imagine trying to implement a class in c++ for the cannon, air, target, and grapefruit, and then using MPI to have them pass information so each class can be instantiated on separate processors in a 4 core CPU. *shudder*.

There are a couple of things this assignment will really get you to do. The first one is to learn how to write EFFICIENT algorithms in mathematica. Being an interpreted language, it will really pay off if your algorithms are well designed. This will be discussed in class, but there are a few basic hints. For speed, avoid pattern-matching functions, exact arithmetic, very large arrays of numbers, and continuous varieties of functions. A well designed notebook can execute the whole set in a minute or two; a poorly implemented approach might take days, if it completes at all.

Another aspect is that of graphing. You will be computing a LOT of trajectories. You are strongly encouraged to exploit the graphing capabilities of mathematica to the fullest in order to cleanly present your data. For instance, there are a family of curves corresponding to a set of angles and muzzle velocities which travel the same distance. You could set the opacity of each curve to be proportional to the time of flight, or to the muzzle velocity, to demonstrate that it goes through a minimum at about 45 degrees with no air resistance, and about 20 degrees with air resistance.

You are encouraged to apply the model of air resistance found in the set. Supersonic grapefruit are also an option, though the simulation will be physically unreliable without a slightly more sophisticated air flow model! All of which can be discussed with the TA if you are interested.

 
20.6.txt · Last modified: 2012/11/25 09:50 by chandmer
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki