Merge branch 'lighthouse2' into lighthouse-grant

This commit is contained in:
Grant Sanderson
2018-03-05 19:45:55 -08:00
4 changed files with 65 additions and 33 deletions

View File

@ -29,10 +29,10 @@ NUM_LEVELS = 30
NUM_CONES = 7 # in first lighthouse scene
NUM_VISIBLE_CONES = 5 # ibidem
ARC_TIP_LENGTH = 0.2
AMBIENT_FULL = 0.5
AMBIENT_DIMMED = 0.2
SPOTLIGHT_FULL = 0.9
SPOTLIGHT_DIMMED = 0.2
AMBIENT_FULL = 0.8
AMBIENT_DIMMED = 0.5
SPOTLIGHT_FULL = 0.8
SPOTLIGHT_DIMMED = 0.5
LIGHTHOUSE_HEIGHT = 0.8
DEGREES = TAU/360
@ -57,7 +57,7 @@ class LightSource(VMobject):
"source_point": VectorizedPoint(location = ORIGIN, stroke_width = 0, fill_opacity = 0),
"color": LIGHT_COLOR,
"num_levels": 10,
"radius": 5,
"radius": 10.0,
"screen": None,
"opacity_function": inverse_quadratic(1,2,1),
"max_opacity_ambient": AMBIENT_FULL,
@ -142,7 +142,9 @@ class LightSource(VMobject):
num_levels = self.num_levels,
radius = self.radius,
screen = new_screen,
camera_mob = self.camera_mob
camera_mob = self.camera_mob,
opacity_function = self.opacity_function,
max_opacity = self.max_opacity_spotlight,
)
self.spotlight.move_source_to(self.get_source_point())
@ -423,7 +425,7 @@ class Spotlight(VMobject):
"color" : GREEN, # LIGHT_COLOR,
"max_opacity" : 1.0,
"num_levels" : 10,
"radius" : 5.0,
"radius" : 10.0,
"screen" : None,
"camera_mob": None
}