From: Bruce S. <ba...@an...> - 2000-12-27 19:34:03
|
I've added this feature request to the "bug" list on sourceforge.net. I too have sometimes felt the need of something like this. Bruce Sherwood --On Friday, December 15, 2000 4:22 PM +0100 Markus Gritsch <gr...@iu...> wrote: > It would be nice if the visualization thread could be somehow > synchronized with the thread running the Python script. The problem > without synchronization is that the visualization of a scene with much > animation in it is "distorted", because during a visualization cycle > some objects have their old position and some others already appear on > their new location. For example I have a scene with some springs in > it, each represented by a helix (curve). Because the whole spring is > moveing around quite fast, part of it has the old coordinates and the > other part already appears at the new calculated ones. > > Would it be possible to hav a function similar to visual.rate() which > suspends the visualization thread and another to reactivate it? In > this way it would be possible in the while loop to suspend it, do the > calculations, activate it and suspend it again before doing the next > cycle. > > while 1: > visual.stop() # suspend the visualization thread > doMyCalculations() > visual.start() # resume the visualization thread > visual.rate(30) > > Would this be possible with the current VPython design? |