This file contains 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 big_ol_pile_of_manim_imports import * | |
# | |
def set_background(self): | |
background = Rectangle( | |
width = FRAME_WIDTH, | |
height = FRAME_HEIGHT, | |
stroke_width = 0, | |
fill_color = "#364658", | |
fill_opacity = 1) |
This file contains 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
class Move_word_from_one_sentence_to_the_other(Scene): | |
def construct(self): | |
kwargs = { | |
"tex_to_color_map": { | |
"circumference": RED, | |
} | |
} | |
question = TextMobject( | |
""" | |
\\small |
This file contains 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 big_ol_pile_of_manim_imports import * | |
class SimpleField(Scene): | |
CONFIG = { | |
"plane_kwargs" : { | |
"color" : RED}} | |
def construct(self): | |
plane = NumberPlane(**self.plane_kwargs) #Create axes and grid | |
plane.add(plane.get_axis_labels()) #add x and y label |
This file contains 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 big_ol_pile_of_manim_imports import * | |
class DrawAnAxis(Scene): | |
CONFIG = { "plane_kwargs" : { | |
"x_line_frequency" : 2, | |
"y_line_frequency" :2 | |
} | |
} | |
def construct(self): |
This file contains 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 big_ol_pile_of_manim_imports import * | |
class ExampleApproximation(GraphScene): | |
CONFIG = { | |
"function" : lambda x : np.cos(x), | |
"function_color" : BLUE, | |
"taylor" : [lambda x: 1, lambda x: 1-x**2/2, lambda x: 1-x**2/math.factorial(2)+x**4/math.factorial(4), lambda x: 1-x**2/2+x**4/math.factorial(4)-x**6/math.factorial(6), | |
lambda x: 1-x**2/math.factorial(2)+x**4/math.factorial(4)-x**6/math.factorial(6)+x**8/math.factorial(8), lambda x: 1-x**2/math.factorial(2)+x**4/math.factorial(4)-x**6/math.factorial(6)+x**8/math.factorial(8) - x**10/math.factorial(10)], | |
"center_point" : 0, | |
"approximation_color" : GREEN, |
This file contains 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 big_ol_pile_of_manim_imports import * | |
class PlotFunctions(GraphScene): | |
CONFIG = { | |
"x_min" : -10, | |
"x_max" : 10, | |
"y_min" : -1.5, | |
"y_max" : 1.5, | |
"graph_origin" : ORIGIN , | |
"function_color" : RED , |
This file contains 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 big_ol_pile_of_manim_imports import * | |
class UsingBraces(Scene): | |
#Using braces to group text together | |
def construct(self): | |
eq1A = TextMobject("4x + 3y") | |
eq1B = TextMobject("=") | |
eq1C = TextMobject("0") | |
eq2A = TextMobject("5x -2y") | |
eq2B = TextMobject("=") |
This file contains 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
class ColoringEquations(Scene): | |
#Grouping and coloring parts of equations | |
def construct(self): | |
line1=TexMobject(r"\text{The vector } \vec{F}_{net} \text{ is the net }",r"\text{force }",r"\text{on object of mass }") | |
line1.set_color_by_tex("force", BLUE) | |
line2=TexMobject("m", "\\text{ and acceleration }", "\\vec{a}", ". ") | |
line2.set_color_by_tex_to_color_map({ | |
"m": YELLOW, | |
"{a}": RED | |
}) |
This file contains 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 big_ol_pile_of_manim_imports import * | |
class BasicEquations(Scene): | |
#A short script showing how to use Latex commands | |
def construct(self): | |
eq1=TextMobject("$\\vec{X}_0 \\cdot \\vec{Y}_1 = 3$") | |
eq1.shift(2*UP) | |
eq2=TexMobject(r"\vec{F}_{net} = \sum_i \vec{F}_i") | |
eq2.shift(2*DOWN) |
This file contains 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 big_ol_pile_of_manim_imports import * | |
class RotateAndHighlight(Scene): | |
#Rotation of text and highlighting with surrounding geometries | |
def construct(self): | |
square=Square(side_length=5,fill_color=YELLOW, fill_opacity=1) | |
label=TextMobject("Text at an angle") | |
label.bg=BackgroundRectangle(label,fill_opacity=1) | |
label_group=VGroup(label.bg,label) #Order matters | |
label_group.rotate(TAU/8) |
NewerOlder