Much pythagoras, plus better point thickness and display implementations

This commit is contained in:
Grant Sanderson
2015-10-09 19:53:38 -07:00
parent b8fba1f3ec
commit e2fc29851e
14 changed files with 2831 additions and 81 deletions

View File

@ -94,7 +94,7 @@ class OpenInterval(CompoundMobject):
class Piano(ImageMobject):
DEFAULT_CONFIG = {
"should_buffer_points" : False,
"point_thickness" : 1,
"invert" : False,
"scale_value" : 0.5
}
@ -112,7 +112,7 @@ class Piano(ImageMobject):
for count in range(14):
key = Mobject(
color = "white",
should_buffer_points = False
point_thickness = 1
)
x0 = left + count*self.ivory_jump
x1 = x0 + self.ivory_jump
@ -663,7 +663,7 @@ class ConstructPiano(Scene):
askew = deepcopy(keys[-1])
keys[-1].rotate_in_place(np.pi/5)
for key in keys:
key.should_buffer_points = False
key.point_thickness = 1
key_copy = deepcopy(key).to_corner(DOWN+LEFT)
key_copy.scale_in_place(0.25)
key_copy.shift(1.8*random.random()*SPACE_WIDTH*RIGHT)