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 * | |
# Animate shapes | |
class RotateRect(Scene): | |
def construct(self): | |
rect = Rectangle(height=1,width=2) | |
angle = math.radians(90) | |
animation = Rotate(rect, angle=angle) | |
self.play(animation) |
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 * | |
# Animate shapes | |
class ScaleCircle(Scene): | |
def construct(self): | |
circle = Circle(radius=2, fill_color=YELLOW, fill_opacity=1) | |
self.play(GrowFromCenter(circle)) |
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 * | |
# Animate shapes | |
class RotatePolygon(Scene): | |
def construct(self): | |
Hexagon = [(0,0,0), #P1 | |
(1,1,0), #P2 | |
(2,1,0), #P3 | |
(3,0,0), #P4 |
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 * | |
# Animate shapes | |
class RotateSquareForever(Scene): | |
def construct(self): | |
square = Square() | |
rotate = Rotating(square) | |
self.play(rotate, run_time=20) |
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 * | |
# Animate shapes | |
class LineToCircle(Scene): | |
def construct(self): | |
line = Line((0,0,0), (4,0,0)) | |
arc = Circle(color = WHITE, radius=1) | |
self.play(ShowCreation(arc)) | |
self.play(Transform(arc, line)) |
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 * | |
# Animate shapes | |
class DotToLine(Scene): | |
def construct(self): | |
dot = Dot() | |
line = Line((0,0,0), (3,0,0)) | |
self.play(ShowCreation(dot)) | |
self.play(Transform(dot, line)) |
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 * | |
# Animate shapes | |
class DotToCircle(Scene): | |
def construct(self): | |
circle = Circle() | |
dot = Dot() | |
self.play(ShowCreation(dot)) | |
self.play(Transform(dot, circle)) |
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 * | |
# Animate shapes | |
class LineToSquare(Scene): | |
def construct(self): | |
line = Line((0,0,0),(3,0,0)) | |
square = Rectangle(width=3, height=3) | |
# OR: square = Square() | |
self.play(ShowCreation(line)) |
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 * | |
# Animate shapes | |
# Functions and Equations | |
class PlotFunctionGraph(Scene): | |
def construct(self): | |
self.numpy_sin_function() | |
self.clear() |
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 * | |
# Animate shapes | |
# combine and animate complex shapes | |
class DrawFlag(Scene): | |
def construct(self): | |
flag = Rectangle(height=1,width=1.9,stroke_width=1.5,fill_color=DARK_BLUE,fill_opacity=1) | |
bottom_corner = flag.get_corner(LEFT+DOWN) | |
pole = Line(bottom_corner,bottom_corner+(DOWN*2.5), stroke_width=1.5) |