mirror of
https://github.com/3b1b/manim.git
synced 2025-07-31 22:13:30 +08:00
Through defining curves portion of hilbert project
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user