From: Andy D. <dou...@la...> - 2002-10-04 17:32:49
|
On Fri, 4 Oct 2002, Chris Burns wrote: > The problem is that we're on a Mac campus, so I needed to get Vpython > running on OSX. I followed the instructions and everything seemed fine > until I ran the demo programs. In any of the demos where there is > animation (double pendulum, Lorenz, etc), the program bombs at some point > (not always the same) with a message like: > > Traceback (most recent call last): > File "doublependulum.py", line 71, in ? > atheta2 = -(A*atheta1+C*sin(theta1))/B > ValueError: unexpected math error One vague possibility: Are you perhaps getting very large theta1 values here? Although theoretically the trig functions ought to work fine and automatically take the appropriate mod 2pi, in practice they might not. (I vaguely recall encountering that problem somewhere in some language, but I no longer recall the details.) -- Andy Dougherty dou...@la... Dept. of Physics Lafayette College, Easton PA 18042 |