@@ -40,33 +40,38 @@ def main():
4040
4141 # Create the plot:
4242
43- optix = TkOptiX () # create and configure, show the window later
43+ rt = TkOptiX () # create and configure, show the window later
4444
45- optix .set_background (0.99 ) # white background
46- optix .set_ambient (0.2 ) # dim ambient light
45+ rt .set_background (0.99 ) # white background
46+ rt .set_ambient (0.2 ) # dim ambient light
4747
4848 # add plot, BezierChain geometry makes a smooth line interpolating data points
49- optix .set_data ("curve" , pos = xyz , r = r , c = 0.9 , geom = "BezierChain" )
49+ rt .set_data ("curve" , pos = xyz , r = r , c = 0.9 , geom = "BezierChain" )
50+ #rt.set_data("curve", pos=xyz, r=r, c=0.9, geom="SegmentChain")
51+ #rt.set_data("curve", pos=xyz, r=r, c=0.9, geom="BSplineQuad")
52+ #rt.set_data("curve", pos=xyz, r=r, c=0.9, geom="BSplineCubic")
5053
5154 # show the UI window here - this method is calling some default
5255 # initialization for us, e.g. creates camera, so any modification
5356 # of these defaults should come below (or we provide on_initialization
5457 # callback)
55- optix .show ()
58+ rt .show ()
5659
5760 # camera auto-configured to fit the plot
58- optix .camera_fit ()
61+ rt .camera_fit ()
62+
63+ #rt.update_camera(eye=[200, -1000, 350], target=[0,180,0], fov=25)
5964
6065 # 2 spherical light sources, warm and cool, fit positions with respect to
6166 # the current camera plane: 45 deg right/left and 25 deg up;
6267 # do not include lights in geometry, so they do not appear in the image
63- optix .setup_light ("light1" , color = 10 * np .array ([0.99 , 0.9 , 0.7 ]), radius = 250 , in_geometry = False )
64- optix .light_fit ("light1" , horizontal_rot = 45 , vertical_rot = 25 , dist_scale = 1.1 )
65- optix .setup_light ("light2" , color = 15 * np .array ([0.7 , 0.9 , 0.99 ]), radius = 200 , in_geometry = False )
66- optix .light_fit ("light2" , horizontal_rot = - 45 , vertical_rot = 25 , dist_scale = 1.1 )
68+ rt .setup_light ("light1" , color = 10 * np .array ([0.99 , 0.9 , 0.7 ]), radius = 250 , in_geometry = False )
69+ rt .light_fit ("light1" , horizontal_rot = 45 , vertical_rot = 25 , dist_scale = 1.1 )
70+ rt .setup_light ("light2" , color = 15 * np .array ([0.7 , 0.9 , 0.99 ]), radius = 200 , in_geometry = False )
71+ rt .light_fit ("light2" , horizontal_rot = - 45 , vertical_rot = 25 , dist_scale = 1.1 )
6772
6873 # accumulate up to 30 frames (override default of 4 frames)
69- optix .set_param (max_accumulation_frames = 200 )
74+ rt .set_param (max_accumulation_frames = 200 )
7075
7176 print ("done" )
7277
0 commit comments