On Wed, 2004-05-12 at 15:55, Kuzminski, Stefan R wrote:
> My vpython app takes up 50% or so of the cpu just sitting there ( on a
> windows box ). I put a sleep in my top level loop, but it didn=FFt seem
> to help, maybe there is a thread eating up lots of cpu within vpython?
Yes. Your changes are updated to the screen immediately because the
entire scene is being rendered repeatedly at not more than 30 fps in a
background thread, thus giving the appearance of being updated
instantly. If the scene is particularly complex, it will eat up a lot
more CPU time. Convex objects, curves with non-zero thickness, and
faces objects are the worst performers right now.
> Can I nest frames within frames?
Yes. You cannot have a cycle of frames, such as a frame within itself,
even indirectly. VPython will catch this kind of error and raise an
exception.
HTH,
Jonathan Brandmeyer
|