This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from manim import * | |
| class multiplication(Scene): | |
| def construct(self): | |
| for a in [1,2,3]: | |
| theTable = [] | |
| for b in range(10): | |
| theTable.append([a, r"\times", b+1, r"=", a*(b+1)]) | |
| texTable = MathTable(theTable,include_outer_lines=False).scale(0.6).to_edge(UP) | |
| texTable.remove(*texTable.get_vertical_lines()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://discord.com/channels/581738731934056449/1021822343120687135/1021843567905353788 | |
| from manim import * | |
| class test17(Scene): | |
| def construct(self): | |
| baselen = 0.5 | |
| max_n = 10 | |
| origo = 3*LEFT+3*DOWN | |
| sq = Square(side_length=baselen) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://discord.com/channels/581738731934056449/1023856228377563227/1024233361130135552 | |
| from manim import * | |
| class ClockFaces(Scene): | |
| def draw_text_lines(self, line1, line2, offset=np.array([3.5, 0.5, 0])): | |
| text_heading = Text(line1) | |
| text_heading.shift(offset) | |
| text_body = Text(line2) | |
| text_body.next_to(text_heading, DOWN) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://discord.com/channels/581738731934056449/1021149218523586560/1022599268051202078 | |
| from manim import * | |
| myTexTemp2 = TexTemplate( | |
| tex_compiler="xelatex", | |
| output_format='.pdf', | |
| ) | |
| myTexTemp2.add_to_preamble(r"\usepackage{siunitx}") | |
| myTexTemp4 = TexTemplate( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://discord.com/channels/581738731934056449/1025728276343296031/1025765609667047454 | |
| from manim import * | |
| class myAnimation(Scene): | |
| CONFIG = { | |
| "x_length": 10, | |
| "y_length": 4, | |
| #"n_ticks": 4, | |
| #"tick_width": 0.2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://discord.com/channels/581738731934056449/1025492231035039764/1025695274817028096 | |
| from manim import * | |
| class ApplyMatrixExample(Scene): | |
| def construct(self): | |
| m1 = [[1, 1], [0, 2/3]] | |
| m2 = [[0, -2], [-1, -2/3]] | |
| np = NumberPlane() | |
| txt = Text("Hello World!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://discord.com/channels/581738731934056449/1022676024238026774/1022997149656567888 | |
| from manim import * | |
| class test15(Scene): | |
| def construct(self): | |
| text = r'''{5cm}Lorem ipsum dolor sit amet, | |
| consectetur adipiscing elit. Nulla et velit a | |
| mauris pharetra efficitur. Pellentesque quis diam | |
| at justo venenatis lacinia non posuere orci. Nulla |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://discord.com/channels/581738731934056449/1026084532207755295/1026136828954300426 | |
| from manim import * | |
| class Tabla2(Scene): | |
| def construct(self): | |
| t=MathTable( | |
| [["", 2,3,4], | |
| [2,3,4,5], | |
| [2, 2, 7, 12], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://discord.com/channels/581738731934056449/1026231302069964831/1026240005401751582 | |
| from manim import * | |
| class moving(Scene): | |
| def construct(self): | |
| text = Tex(r"And ",r"still ",r"it ", r"moves!") | |
| self.play(Write(text)) | |
| arr = Arrow(start=ORIGIN, end=1*UP, buff=0).next_to(text[0],DOWN,buff=0) | |
| self.play(Create(arr)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # code by @Maieutic | |
| # https://discord.com/channels/581738731934056449/1026221281810579556/1026253177177255957 | |
| from dataclasses import dataclass | |
| from manim import * | |
| import numpy as np | |
| L_SYSTEM = { | |
| "axiom": "F", | |
| "rules": {"F": "F[-F][+F]", "+": "+", "-": "-", "[": "[", "]": "]"}, |