Skip to content

Instantly share code, notes, and snippets.

@naveen521kk
Last active March 20, 2021 17:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naveen521kk/5b29ac770a1b48b26e2f31e23b1d9d79 to your computer and use it in GitHub Desktop.
Save naveen521kk/5b29ac770a1b48b26e2f31e23b1d9d79 to your computer and use it in GitHub Desktop.
from manim import *
import numpy as np
class PIDay(Scene):
def construct(self):
self.camera.background_color = "#ece6e2"
pi=Tex("$\pi$")
pi.scale(6.)
pi.set_color(BLUE)
pi1 = pi.copy()
pi1.set_color(RED)
happy = MathTex("\mathbb{HAPPY}")
happy.set_color(BLUE)
happy.scale(2.)
day = MathTex("\mathbb{DAY}")
day.set_color(BLUE)
day.scale(2.)
circle = Circle(color=YELLOW, fill_opacity=0.4,radius=3.8,)
pi.move_to(circle.get_center())
happy.next_to(pi,np.array([0,2.5,0]))
day.next_to(pi,np.array([0,-2.5,0]))
b=VGroup(circle,happy,pi,day)
b.scale(1.5)
for i in b:
self.play(ShowCreation(i))
self.play(Uncreate(b))
self.play(pi1.animate.scale(7.),run_time=3)
pinum = Tex(str(np.pi)).scale(3.)
pinum.set_color(RED)
self.play(Transform(pi1,pinum))
self.wait(.5)
self.clear()
n314 = Tex('3.14',color=RED).scale(3.)
self.play(ShowCreation(n314))
self.wait(.5)
with register_font('BungeeOutline-Regular.ttf'):
march14 = Text('March 14',font="Bungee Outline",color=RED,weight=HEAVY).scale(2)
self.play(Transform(n314,march14))
self.wait(.5)
@naveen521kk
Copy link
Author

Source for https://twitter.com/syrus_dark/status/1371021480071294980. Download the font file BungeeOutline-Regular.ttf from https://fonts.google.com/specimen/Bungee+Outline and place in the same directory while rendering.Rendered with Manim Community v0.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment