There are several different test cases with interesting configurations of the magnets and the pendulum's initial conditions. To access these, start the program with "magnets #" where # is a number from 0 to 9. Case 0 is the same as default; cases 1 through 3 are performed without magnets as a demonstration of the math. If you would like to input your own initial conditions, type "magnets -i". To generate random initial conditions, use "magnets -r".
Since this program was developed on a Pentium, it may run too slowly on some other machines such as the ones in the EBU2 lab. Anticipating this, I have also included a speed flag "-s #", where # is a multiplier to speed up the program. For instance, "magnets -s 5.0" will run five times as fast as the default program, which is about right for the lab. However, as a word to the wise, see the miscellaneous remarks about errors that may occur in this situation. While the program is running, press 'q' at any time to quit. You may also rotate the viewing angles by pressing the 'u', 'j', 'h', and 'k' keys. These are arranged like direction keys, so 'u' is up, 'j' is down, 'h' is left, and 'k' is right.
Miscellaneous remarks |
||
Main magnets page |