80% through cube example

This commit is contained in:
Grant Sanderson
2017-01-26 19:59:55 -08:00
parent 25e99ea1bc
commit b4e93b3376
5 changed files with 693 additions and 25 deletions

View File

@ -130,11 +130,12 @@ class TextMobject(TexMobject):
class Brace(TexMobject):
CONFIG = {
"buff" : 0.2,
"n_quads" : 3,
"tex_string" : "\\underbrace{%s}"%(3*"\\qquad"),
}
TEX_STRING = "\\underbrace{%s}"%(3*"\\qquad")
def __init__(self, mobject, direction = DOWN, **kwargs):
digest_config(self, kwargs, locals())
TexMobject.__init__(self, self.TEX_STRING, **kwargs)
TexMobject.__init__(self, self.tex_string, **kwargs)
angle = -np.arctan2(*direction[:2]) + np.pi
mobject.rotate(-angle)
left = mobject.get_corner(DOWN+LEFT)