From: Markus G. <gr...@iu...> - 2000-12-15 15:23:07
|
Hi! 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? Kind regards, Markus -- |\/\/\/| /------------------------------------------------------------------\ | | | Markus GRITSCH | phone: +43 / 1 / 58801-36015 | | | | Institute for Microelectronics | cellular: +43 / 676 / 4973431 | | (o)(o) | Technical University of Vienna | fax: +43 / 1 / 58801-36099 | C _) | Gusshausstrasse 27-29 / E360 | email: gr...@iu... | | ,___| | A-1040 Vienna / AUSTRIA | SMS: 436...@ma... | | / \------------------------------------------------------------------/ /____\ / \ "Computers let you make more mistakes faster than any other invention in human history, with the possible exception of handguns and tequila." Mitch Radcliffe |