def construct(self): term_en = CyrTex(r"Dynamic Programming").scale(2) #term_bg = CyrTex(r"\foreignlanguage{bulgarian}{\textit{Динамично програмиране}}").scale(1.5) group = VGroup(term_en) self.play(FadeIn(term_en)) #term_bg.next_to(term_en, direction=DOWN) self.wait(2) #self.play(FadeIn(term_bg), group.center) self.wait(5) self.play(FadeOut(group)) photo = ImageMobject("Richard_Ernest_Bellman.jpg").set_height(6) title_below = CyrTex( r"\foreignlanguage{english}{Richard Ernest Bellman}") group2 = Group(photo, title_below) self.play(FadeIn(photo), photo.to_edge, UP) title_below.next_to(photo, direction=DOWN) self.play(Write(title_below, run_time=1)) self.wait(5) self.play(FadeOut(group2)) self.wait(5) for x, y in random_points: print(f"[{x}, {y}]") coin = Coin("10").move_to(np.array((x, y, 0))).shift_onto_screen() self.add(coin) self.wait(5) new_coin = Coin("10").move_to(np.array((2, -2, 0))) self.play(FadeIn(new_coin)) self.wait(10)
def construct(self): term_en = CyrTex(r"Brute Force").scale(2) term_bg = CyrTex( r"\foreignlanguage{bulgarian}{\textit{Метод на грубата сила}}" ).scale(1.5) group = VGroup(term_bg, term_en) self.play(FadeIn(term_en)) term_bg.next_to(term_en, direction=DOWN) self.wait() self.play(FadeIn(term_bg), group.center) self.wait(2) self.play(FadeOut(group))
def construct(self): term_en = CyrTex(r"Optimal Substructure").scale(2) term_bg = CyrTex( r"\foreignlanguage{bulgarian}{\textit{Оптимална подструктура}}" ).scale(1.5) group = VGroup(term_bg, term_en) self.play(FadeIn(term_en)) term_bg.next_to(term_en, direction=DOWN) self.wait() self.play(FadeIn(term_bg), group.center) self.wait(5) self.play(FadeOut(group)) self.wait(10)
def construct(self): term_en = CyrTex(r"Greedy Algorithm").scale(2) term_bg = CyrTex( r"\foreignlanguage{bulgarian}{\textit{Алчен алгоритъм}}").scale( 1.5) group = VGroup(term_bg, term_en) self.play(FadeIn(term_en)) term_bg.next_to(term_en, direction=DOWN) self.wait() self.play(FadeIn(term_bg), group.center) self.wait(5) self.play(FadeOut(group)) self.wait(10)
def construct(self): title = CyrTex(r'Min Coin Change', color="#83d126").scale(3) self.play(Write(title)) #sub_title = CyrTex(r'\foreignlanguage{bulgarian}{Ресто с най-малък брой монети}').scale(1.5) #self.play(title.shift, UP * sub_title.get_height()) #sub_title.next_to(title, DOWN, buff=SMALL_BUFF) #self.play(Write(sub_title)) self.wait() channel_name = CyrTex( r'\foreignlanguage{english}{\textbf{Svilen Talks About Programming}}', color=TEAL_E) episode_num = CyrTex(r'\foreignlanguage{english}{Episode №2}', color=TEAL_E).scale(0.8) episode_num.next_to(channel_name, DOWN, buff=SMALL_BUFF) v_group = VGroup(channel_name, episode_num) v_group.to_edge(DOWN) self.play(Write(v_group)) self.wait(10)
def construct(self): title = CyrTex(r'Min Coin Change', color=LIGHT_PINK).scale(3) self.play(Write(title)) sub_title = CyrTex( r'\foreignlanguage{bulgarian}{Ресто с най-малък брой монети}' ).scale(1.5) self.play(title.shift, UP * sub_title.get_height()) sub_title.next_to(title, DOWN, buff=SMALL_BUFF) self.play(Write(sub_title)) channel_name = CyrTex( r'\foreignlanguage{bulgarian}{\textbf{Свилен говори за програмиране}}', color=TEAL_E) episode_num = CyrTex(r'\foreignlanguage{bulgarian}{Епизод №2}', color=TEAL_E).scale(0.8) episode_num.next_to(channel_name, DOWN, buff=SMALL_BUFF) v_group = VGroup(channel_name, episode_num) v_group.to_edge(DOWN) self.play(Write(v_group)) self.wait(10)