WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 03-16-2005, 09:33 AM
Johannes Johannes is offline
Member
 
Join Date: Jan 2005
Posts: 143
Code Jumps under load

Sorry for this funny topic :

There seem to be code-jumps occurring when a lot of processing has to be done:

More specific:

Code:
				timeElapsedWorld=(time.clock()-worldTime)/slowDown + gliderObj.timeElapsedWorldBeforeBreak 
				glider.translate(glider.actualPos.get())
							ballCannon.translate(0,gliderObj.get(viz.POSITION)[1]+0.065*math.cos(bogenConv(slope))+0.03*math.cos(bogenConv(slope+ballAngle)),gliderObj.get(viz.POSITION)[2]+0.065*math.sin(bogenConv(slope))+0.03*math.sin(bogenConv(slope+ballAngle)))
				catcher.translate(gliderObj.actualPos[0],gliderObj.actualPos[1]+0.065*math.cos(bogenConv(slope))+0.06*math.cos(bogenConv(slope+ballAngle)),gliderObj.actualPos[2]+0.065*math.sin(bogenConv(slope))+0.06*math.sin(bogenConv(slope+ballAngle)))
				catcherWall.translate(gliderObj.actualPos[0],gliderObj.actualPos[1]+0.065*math.cos(bogenConv(slope))+0.07*math.cos(bogenConv(slope+ballAngle)),gliderObj.actualPos[2]+0.065*math.sin(bogenConv(slope))+0.07*math.sin(bogenConv(slope+ballAngle)))
				glider.actualVelocityOld=glider.actualVelocity
				
				#1=position 2=velocity in z direction 3=acceleration 11=position on airtrack (total) 12=position in y direction 21=velocity total 22 velocity in y direction 31=acceleration total 32=acceleration in y direction 
				
				for graphInstance in graphBasket:
					if (graphInstance.graphWhat==1):
							print "timeElapsedWorld:",timeElapsedWorld

I get the following printouts (only if the program is under stress - a lot of balls flying etc.)

timeElapsedWorld: 1.53241976489
timeElapsedWorld: 0.25782304277
timeElapsedWorld: 0.259737781056
timeElapsedWorld: 0.261517913083
Loading File: ../resources/joNew/050305_ballBlueOpac.WRL
Loading File: ../resources/joNew/050305_ballRedOpac.WRL
timeElapsedWorld: 0.263915784652
timeElapsedWorld: 0.266729903628
timeElapsedWorld: 0.270578388046
Loading File: ../resources/joNew/050305_ballGreen.WRL
timeElapsedWorld: 0.27311529934
timeElapsedWorld: 1.65854041329

Any ideas?
When I turn slowDown to 1 there does not seem to be a problem. Is it possible that the division is skipped?

Johannes
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 03:37 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC