import light_source import iterative_tracer as it import os os.environ['PYOPENCL_COMPILER_OUTPUT'] = '1' time1 = time() # Amount of rays to trace ray_count=300000 # tracer termination conditions. if either is reached, the tracer will stop tracing and return all results colledted until that point. iterations = 16 #if this amount of iterations has been done, the tracer will stop. power_dissipated = 0.99 # if 99% (0.99) amount of power has left the scene or was terminated/measured, the tracer will stop # create one lightsource ls0 = light_source.light_source(center=np.array([0,0,0,0],dtype=np.float32), direction=(0,0,1), directivity=lambda x,y: np.cos(y), power=1000., ray_count=ray_count) # tracer code expects a list of light sources ls = [ls0] # define the maximum length a ray can travel before being terminated max_ray_len = np.float32(1.0e3) # create an instance of optical elements so we can generate meshes for the scene oe = goe.optical_elements() # set IOR of environment ior_env = np.float32(1.0) # setup a hemisphere to measure the lightsources spatial power distribution measureSurf = oe.hemisphere(center=[0,0,0,0],radius=500.0) measureSurf.setMaterial(mat_type="measure")
import iterative_tracer as it import os os.environ['PYOPENCL_COMPILER_OUTPUT'] = '1' time1 = time() # Amount of rays to trace ray_count = 30000 # tracer termination conditions. if either is reached, the tracer will stop tracing and return all results colledted until that point. iterations = 16 #if this amount of iterations has been done, the tracer will stop. power_dissipated = 0.99 # if 99% (0.99) amount of power has left the scene or was terminated/measured, the tracer will stop # create one lightsource ls0 = light_source.light_source(center=np.array([0, 0, 0, 0], dtype=np.float32), direction=(0, 0, 1), directivity=lambda x, y: np.cos(y), power=1000., ray_count=ray_count) # tracer code expects a list of light sources ls = [ls0] # define the maximum length a ray can travel before being terminated max_ray_len = np.float32(2.0e3) # create an instance of optical elements so we can generate meshes for the scene oe = goe.optical_elements() # set IOR of environment ior_env = np.float32(1.0) # setup a hemisphere to measure the lightsources spatial power distribution
os.environ['PYOPENCL_COMPILER_OUTPUT'] = '1' time1 = time() # Amount of rays to trace ray_count=50000 # tracer termination conditions. if either is reached, the tracer will stop tracing and return all results colledted until that point. iterations = 16 #if this amount of iterations has been done, the tracer will stop. power_dissipated = 0.99 # if 99% (0.99) amount of power has left the scene or was terminated/measured, the tracer will stop # create one lightsource print "Setting up lightsources ..." directivity = lambda x,y: np.cos(y) ls0 = light_source.light_source(center=np.array([0,0,0,0],dtype=np.float32), direction=(0,0,-1), directivity=directivity, power=1.0, ray_count=ray_count) # tracer code expects a list of light sources ls = [ls0] # define the maximum length a ray can travel before being terminated max_ray_len = np.float32(1.0e3) # create an instance of optical elements so we can generate meshes for the scene print "Setting up scene geometry ..." oe = goe.optical_elements() # set IOR of environment ior_env = np.float32(1.0) # setup a hemisphere to measure the lightsources spatial power distribution measureSurf = oe.hemisphere(center=[0,0,0,0],radius=500.0)