Through defining curves portion of hilbert project

This commit is contained in:
Grant Sanderson
2015-12-31 09:27:48 -08:00
parent e63ef5b3ad
commit 0cb6f09615
4 changed files with 454 additions and 22 deletions

View File

@ -154,7 +154,7 @@ class Mobject(object):
)
return self
def highlight(self, color = "yellow", condition = None):
def highlight(self, color = YELLOW_C, condition = None):
"""
Condition is function which takes in one arguments, (x, y, z).
"""
@ -180,6 +180,11 @@ class Mobject(object):
])
return self
def match_colors(self, mobject):
Mobject.align_data(self, mobject)
self.rgbs = np.array(mobject.rgbs)
return self
def filter_out(self, condition):
for mob in self.nonempty_family_members():
to_eliminate = ~np.apply_along_axis(condition, 1, mob.points)