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
# https://discord.com/channels/581738731934056449/1086715297928581161/1086715297928581161 | |
from manim import * | |
class zig(Scene): | |
def construct(self): | |
zag = VMobject() | |
n=4 | |
zag.set_points_as_corners( | |
[[PI/2*i,np.sin(PI/2*i),0] for i in range(4*n+1)] | |
).scale_to_fit_width(5).move_to([-3,0,0],aligned_edge=LEFT) | |
self.add(zag) |
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
# https://discord.com/channels/581738731934056449/1074019689073741935/1074019689073741935 | |
from manim import * | |
myTexTemplate = TexTemplate( | |
tex_compiler="xelatex", | |
output_format='.xdv', | |
) | |
myTexTemplate.add_to_preamble(r"\usepackage{fontspec}\setmainfont{Akshar Unicode.ttf}") | |
MathTex.set_default(tex_template=myTexTemplate) | |
Tex.set_default(tex_template=myTexTemplate) |
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
# original code @vasek.rozhon, modified by @uwezi | |
#https://discord.com/channels/581738731934056449/1086715297928581161/1086722509417762836 | |
from manim import * | |
class Hilbert(Scene): | |
def construct(self): | |
from hilbertcurve.hilbertcurve import HilbertCurve | |
side_length = 4 |
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
# https://discord.com/channels/581738731934056449/1048986980769333329/1062860351567319062 | |
# https://discord.com/channels/581738731934056449/1062828056235999242/1062836565983903835 | |
# import from KiCAD and LTspice: https://github.com/uwezi/circuitikz_import | |
from manim import * | |
class circuit(Scene): | |
def construct(self): | |
template = TexTemplate() | |
template.add_to_preamble(r"\usepackage{tikz}\usepackage[europeanresistors,americaninductors]{circuitikz}") |
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
# https://discord.com/channels/581738731934056449/1020039781276721234/1020193585305505882 | |
from manim import * | |
class smoother(Scene): | |
def construct(self): | |
line1 = Line(ORIGIN, RIGHT+(1/3)*DOWN) | |
line2 = Line(ORIGIN, UP+(1/3)*LEFT) | |
angle = Angle(line1, line2, radius=0.4) |
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
# @Benjamin Hackl and @kolibril13 | |
# https://discord.com/channels/581738731934056449/1020428420498333696/1020431068236628001 | |
from manim import * | |
class MeineSzene(Scene): | |
def construct(self): | |
line1 = Line(3*LEFT, 3*RIGHT).shift(UP).set_color(RED) | |
line2 = Line(3*LEFT, 3*RIGHT).set_color(GREEN) | |
d1 = Dot().move_to(line1.get_left()) |
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
# https://discord.com/channels/581738731934056449/1020700254061989939/1020700254061989939 | |
from manim import * | |
class tracesquare(MovingCameraScene): | |
def construct(self): | |
grid = NumberPlane() | |
self.add(grid) | |
s = Square(side_length=2, color=RED, fill_opacity=0.2) | |
self.add(grid, s) |
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
# https://discord.com/channels/581738731934056449/1020966805923188736/1020992408529416254 | |
from manim import * | |
class axes(Scene): | |
def construct(self): | |
plane = NumberPlane(background_line_style={"stroke_opacity": 0.5}) | |
self.play(Create(plane)) | |
def f(x): | |
return x**2 |
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
# https://discord.com/channels/581738731934056449/1021452642196668446/1021452642196668446 | |
from manim import * | |
class MobsInFront(Scene): | |
def construct(self): | |
circ = Circle(radius=1,fill_color=PINK,fill_opacity=1, | |
stroke_color=PINK,stroke_opacity=1).set_z_index(2) | |
edge = Dot(circ.get_right()) | |
anim = Flash(edge,color=BLUE,run_time=2,line_length=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
# https://discord.com/channels/581738731934056449/1021439985615913051/1021439985615913051 | |
from manim import * | |
class square_from_line(Scene): | |
def construct(self): | |
line1 = Line(start=ORIGIN, end=1*RIGHT) | |
line2 = line1.copy().shift(1*RIGHT) | |
line3 = line2.copy().shift(1*RIGHT) | |
line4 = line3.copy().shift(1*RIGHT) |
OlderNewer