def construct(self): mathy, bubble = get_mathy_and_bubble() bubble.write("A Hilbert curve is the \\\\ limit of all these \\dots") self.add(mathy, bubble) self.play(ShimmerIn(bubble.content)) self.wait()
def construct(self): mathy, bubble = get_mathy_and_bubble() bubble.stretch_to_fit_width(4) mathy.to_corner(DOWN+LEFT) bubble.pin_to(mathy) bubble.shift(LEFT) morty = Mortimer() morty.to_corner(DOWN+RIGHT) morty_bubble = SpeechBubble() morty_bubble.stretch_to_fit_width(4) morty_bubble.pin_to(morty) bubble.write(""" Did you know a curve \\\\ can fill all space? """) morty_bubble.write("Who cares?") self.add(mathy, morty) for bub, buddy in [(bubble, mathy), (morty_bubble, morty)]: self.play(Transform( Point(bub.get_tip()), bub )) self.play(ShimmerIn(bub.content)) self.play(ApplyMethod( buddy.blink, rate_func = squish_rate_func(there_and_back) ))
def construct(self): mathy, bubble = get_mathy_and_bubble() bubble.write( "A Hilbert curve is the \\\\ limit of all these \\dots" ) self.add(mathy, bubble) self.play(ShimmerIn(bubble.content)) self.wait()
def construct(self): mathy, bubble = get_mathy_and_bubble() bubble.sort_points(lambda p: np.dot(p, UP + RIGHT)) self.add(mathy) self.wait() self.play( ApplyMethod(mathy.blink, rate_func=squish_rate_func(there_and_back))) self.wait() self.play(ShowCreation(bubble)) self.wait() self.play(ApplyMethod(mathy.shift, 3 * (DOWN + LEFT)), ApplyPointwiseFunction(lambda p: 15 * p / get_norm(p), bubble), run_time=3)
def construct(self): mathy, bubble = get_mathy_and_bubble() bubble.sort_points(lambda p : np.dot(p, UP+RIGHT)) self.add(mathy) self.wait() self.play(ApplyMethod( mathy.blink, rate_func = squish_rate_func(there_and_back) )) self.wait() self.play(ShowCreation(bubble)) self.wait() self.play( ApplyMethod(mathy.shift, 3*(DOWN+LEFT)), ApplyPointwiseFunction( lambda p : 15*p/np.linalg.norm(p), bubble ), run_time = 3 )