Up to CircularlyPolarizedLight in waves

This commit is contained in:
Grant Sanderson
2017-09-01 18:57:38 -07:00
parent 43c07680cb
commit 1966864d20
4 changed files with 366 additions and 22 deletions

View File

@ -98,14 +98,18 @@ class CyclicReplace(Transform):
class Swap(CyclicReplace):
pass #Renaming, more understandable for two entries
class GrowFromCenter(Transform):
def __init__(self, mobject, **kwargs):
class GrowFromPoint(Transform):
def __init__(self, mobject, point, **kwargs):
target = mobject.copy()
point = Point(mobject.get_center())
mobject.replace(point)
mobject.highlight(point.get_color())
point_mob = Point(point)
mobject.replace(point_mob)
mobject.highlight(point_mob.get_color())
Transform.__init__(self, mobject, target, **kwargs)
class GrowFromCenter(GrowFromPoint):
def __init__(self, mobject, **kwargs):
GrowFromPoint.__init__(self, mobject, mobject.get_center(), **kwargs)
class SpinInFromNothing(GrowFromCenter):
CONFIG = {
"path_func" : counterclockwise_path()