![]() |
#5
|
|||
|
|||
Hi,
Thanks, this has been really useful. I was just wondering however, if there is some command which resets to the orignal vertex values in the code. The relevant section is here HTML Code:
# for backward trials if Mot_sel < 2: R_spd = 0.0 Z_spd = 0.0 L_spd = 0.0 ball1.clearAttribute(viz.ATTR_VERTEXPROGRAM,op=viz.OP_OVERRIDE) # # for rotation trial if Mot_sel == 2: Z_spd = 0.0 L_spd = 0.0 B_spd = 0.0 Z_st = Z_pos[0,0] X_off = Side_id*X_offset[0,0] ####Create random dot motion ball1.dynamic() def mytimer(num): #Change the position of a vertex for i in range (0, NUM_DOTS): x = random.random() - 0.5 y = random.random() - 0.5 z = random.random() - 0 length = math.sqrt(x*x + y*y + z*z) x = x / length * RADIUS y = y / length * RADIUS z = z / length * RADIUS ball1.setVertex(i,x,y,z) viz.callback(viz.TIMER_EVENT,mytimer) viz.starttimer(0,0.2,viz.FOREVER) My entire code is too long to post. Let me know if this would be useful for you. Thank you. Best, JB |
|
|