CylinderComponent( (1,1,0), 1, ),
		CylinderComponent( (0,1,0), 1, ),
		CylinderComponent( (1,0,1), 1, )
	] ), 'mirror')
	
cylR = .4
scene.add_object(
	ConvexIntersection( (-0.7,-0.8,cylR), [
		CylinderComponent( (1,0,0), cylR, ),
		CylinderComponent( (0,1,0), cylR, ),
		CylinderComponent( (0,0,1), cylR, )
	] ), 'wax')

scene.add_object(Parallelepiped( (1.3,-0.5,0.0), (1,0,0), (0,1.3,0), (0,0,0.6) ), 'red')

scene.add_object(Dodecahedron( (1.8,0.2,.5+0.6), 0.5 ), 'glass')

#scene.image.size = (1280,1024)
scene.image.size = (1024,768)
#scene.image.size = (640,400)
scene.samples_per_pixel = 10000
scene.quasirandom = False
scene.gamma = 1.6
scene.max_bounces = 5
scene.camera_fov = 60

scene.camera_position = (-2,-3,1.5)
scene.direct_camera_towards( (0,0,0.5) )
#scene.camera_dof_fstop = 0.02
scene.camera_sharp_distance = vec_norm( np.array([1.8,0.2,.5+0.6]) - np.array(scene.camera_position) )
Beispiel #2
0
from scenes.default_scenes import BoxScene
from objects import *
#from shader import SpectrumShader

#scene = BoxScene(SpectrumShader)
scene = BoxScene()

for obj in scene.get_objects('wall'): obj.material = 'red'
scene.get_object('floor').material = 'white'
scene.get_object('ceiling').material = 'green'
#scene.get_object('light').material = 'white'
scene.get_object('light').bidirectional_light = True
scene.materials['black'] = { 'diffuse': 0.2 }
scene.materials['light']['diffuse'] = 0.0
scene.add_object( HalfSpace( (-1,-1,-2), 5 ), 'sky' )

obj = Sphere((0,0,0.6), 0.3)
obj.linear_transform(scaling=(1,1,2))
scene.add_object( obj, 'mirror' )

szmul = 120
scene.image_size = (8*szmul,6*szmul)

scene.samples_per_pixel = 15000
scene.camera_position = (-2,-3,1)
scene.direct_camera_towards((0,0,0.6))
scene.camera_fov = 50

scene.min_bounces = 2
scene.max_bounces = 5