From: Lenore H. <lh...@si...> - 2009-09-13 18:15:40
|
Thanks for everyone's patience. My goal program for tomorrow afternoon's lecture works. I was evil and modified the controls.py file rather than rewriting the slider class in my own file. The rewrite lets the sliders be labeled with the current value of the slider (using the code in colorsliders.py). (I didn't try to fix the setting value thing or experiment any more with modifying the buttons.) The program itself launches three balls: no air resistance, air resistance proportional to v, air resistance proportional to v^2. Three sliders control launch angle, launch speed, and a constant of proportionality for the two experiencing air resistance. Hitting go a second time will overlay a new set of traces on the previous set. Hitting reset and then go gives a clean screen but does not change slider values. Many thanks to Bruce Sherwood for his help with the behavior of sliders and buttons. Tested on G4 OS X 10.5.8, VPython 5.12 (MacPython 2.6). |