Beispiel #1
0
pr = cheb.fcht(fr(gc))
dpr = cheb.diff(pr)
r = chebval(u, pr)
dr = chebval(u, dpr)

# envelope
e1 = eos.one_parameter_EoS(g, dg, d2g, r, dr, v)
e2 = eos.canal_surface(g, dg, d2g, r, dr, v)

############################################################
lbu.clear_scene(meshes=True, lamps=True, cameras=False)

lbu.set_scene(resolution_x=1400,
              resolution_y=960,
              resolution_percentage=100,
              alpha_mode='SKY',
              horizon_color=[1, 1, 1],
              light_samples=2,
              use_environment_light=False)

lbu.add_point_light(name="lamp",
                    energy=1,
                    shadow_method='NOSHADOW',
                    location=[-3.83856, -4.3118, 6.04704])

scene = bpy.context.scene
cam = scene.camera
cam.location = [14.6387, -19.52351, 0.52857]
cam.rotation_euler = numpy.array([87.975, 0.62, 393.916]) * numpy.pi / 180.0
cam.data.lens_unit = "FOV"
cam.data.angle = 6.1 * numpy.pi / 180.0
strf = format(iface + 1, '03')

tolvis = 1.e-3
nrsvis = 32

#################################################
## Set Scene
scene = bpy.context.scene
lbu.clear_scene(meshes=True, lamps=True, cameras=False)

lbu.set_scene(resolution_x=800,
              resolution_y=800,
              resolution_percentage=100,
              alpha_mode='SKY',
              horizon_color=[1, 1, 1],
              light_samples=16,
              use_environment_light=True,
              environment_energy=0.3,
              environment_color='PLAIN')

## Set Lighting
lbu.add_point_light(name="lamp",
                    energy=1.2,
                    shadow_method='RAY_SHADOW',
                    shadow_ray_samples=16,
                    shadow_soft_size=2.0,
                    location=[3.75, 1.65, 3.20])

## Set Camera
cam = scene.camera
texchecker.image = imgchecker

################################################################

################################################################
# SET SCENE
scene = bpy.context.scene
lbu.clear_scene(meshes=True, lamps=False, cameras=False)

resx = 1024
resy = resx
lbu.set_scene(resolution_x=resx,
              resolution_y=resy,
              resolution_percentage=100,
              alpha_mode='TRANSPARENT',
              horizon_color=(1, 1, 1),
              light_samples=4,
              use_environment_light=True,
              environment_energy=0.3,
              environment_color='PLAIN')
scene.render.engine = 'BLENDER_RENDER'

lamp = bpy.data.objects['Lamp']
cam = scene.camera
################################################################

################################################################
# LOAD DATA
pthin = ROOT + 'GitHub/FFTsurf/debug/LL_patch_from_arcs/'

s = numpy.loadtxt(pthin + 's.dat')