3b1b-videos/_2018/eop/chapter1/think_about_coin.py
2021-01-01 20:10:38 -08:00

31 lines
755 B
Python

from manim_imports_ext import *
from _2018.eop.reusable_imports import *
class RandyThinksAboutCoin(PiCreatureScene):
def construct(self):
randy = self.get_primary_pi_creature()
randy.center()
self.add(randy)
self.wait()
h_or_t = BinaryOption(UprightHeads().scale(3), UprightTails().scale(3),
text_scale = 1.5)
self.think(h_or_t, direction = LEFT)
v = 0.3
self.play(
h_or_t[0].shift,v*UP,
h_or_t[2].shift,v*DOWN,
)
self.play(
h_or_t[0].shift,2*v*DOWN,
h_or_t[2].shift,2*v*UP,
)
self.play(
h_or_t[0].shift,v*UP,
h_or_t[2].shift,v*DOWN,
)
self.wait()