From: Bruce S. <ba...@an...> - 2000-10-19 02:36:23
|
--On Wednesday, October 18, 2000, 4:43 PM -0700 Dethe Elza <de...@an...> wrote: > Are you interested in additional demos. Attached is a simple, but > visually interesting sample: a spinning, color-cycling icosahedron, my > first VPython project. Not bad for 74 lines of code and a couple hours of > work. By all means submit neat demos such as this! We will create a place on the VPython web site for user-submitted demos. A small point: Your program has "rate(30)" BEFORE entering the infinite loop, and this has no effect. The way rate(30) works is to note the current time, and when you again encounter it there is a pause long enough to make up a total delay of 1/30 second since the previous encounter. In a loop this limits the looping to no more than 30 iterations per second. (Of course if 1/30 second has already expired when the rate(30) is again encountered, no pause is taken.) Bruce Sherwood |