Shade Derby
予想番号
オッズ
1番
2番
3番
4番
ベット
枚
COIN
枚
scene = xshade.scene() for i in xrange(1,5,1): cvec = scene.get_shape_by_ordinal(i).center scene.get_shape_by_ordinal(i).center = (4050, 100, cvec[2]) scene.current_camera = 1 scene.cursor_position = (-1000, 0, 1000) scene.figure_view_mode = 3 scene.display.set_shading_mode(3, 2)
import random scene = xshade.scene() random.seed() camera_num = scene.current_camera for i in xrange(1,5,1): sp_n = random.uniform(5,100) sp = scene.get_shape_by_ordinal(i) if sp.radius[1] == 130: sp.radius = (100,100,100) else: sp.radius = (100,130,100) sp.activate() scene.move_object((0,0,0),None,(0,0,0),(-sp_n,0,0)) c_pos = scene.active_shape().center_position[0] if c_pos > 0.0: result = '0' if c_pos >2000. and c_pos <= 3000. and camera_num != 2: if camera_num == 1: scene.current_camera = 2 elif c_pos >1000. and c_pos <= 2000. and camera_num != 3: if camera_num == 2: scene.current_camera = 3 elif c_pos >0. and c_pos <= 1000. and camera_num != 4: if camera_num == 3: scene.current_camera = 4 elif c_pos < 0: result = str(i) break