Skip to content

Instantly share code, notes, and snippets.

class DrawCircle(Scene):
def construct(self):
circle = Circle(color=WHITE,radius=1)
self.play(ShowCreation(circle))
@jaddoescad
jaddoescad / draw_circle.py
Last active March 9, 2019 23:05
draw circle in manim
from big_ol_pile_of_manim_imports import *
class DrawCircle(Scene):
def construct(self):
circle = Circle(color=WHITE,radius=1)
self.play(ShowCreation(circle))
@jaddoescad
jaddoescad / draw_rectangle.py
Created March 9, 2019 23:15
Draw rectangle with manim
from big_ol_pile_of_manim_imports import *
class DrawRectangle(Scene):
def construct(self):
rect = Rectangle(height=3,width=4)
self.play(ShowCreation(rect))
@jaddoescad
jaddoescad / draw_polygon.py
Created March 9, 2019 23:19
drawing a polygon with manim
from big_ol_pile_of_manim_imports import *
class DrawPolygon(Scene):
def construct(self):
Hexagon = [(0,0,0), #P1
(1,1,0), #P2
(2,1,0), #P3
(3,0,0), #P4
(2,-1,0), #P5
(1,-1,0) #P6
@jaddoescad
jaddoescad / draw_vector.py
Created March 9, 2019 23:38
draw vector in manim
from big_ol_pile_of_manim_imports import *
# Move shapes
class DrawVector(Scene):
def construct(self):
vector = Vector(direction=UP)
self.play(ShowCreation(vector))
@jaddoescad
jaddoescad / move_circle.py
Created March 9, 2019 23:49
Move circle with manim
from big_ol_pile_of_manim_imports import *
# Move shapes
class MoveCircle(Scene):
def construct(self):
circle = Circle(radius=1,color=RED)
end_point = (3,0,0)
animation = ApplyMethod(circle.shift, end_point)
self.play(animation)
@jaddoescad
jaddoescad / move_vector.py
Created March 9, 2019 23:53
move vector with manim
from big_ol_pile_of_manim_imports import *
# Move shapes
class MoveVector(Scene):
def construct(self):
vector = Vector(direction=RIGHT)
end_point = (4,0,0)
animation = ApplyMethod(vector.shift,end_point)
self.play(animation)
@jaddoescad
jaddoescad / rotate_rectangle.py
Created March 9, 2019 23:58
Rotate rectangle 90 degrees
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)
@jaddoescad
jaddoescad / scale_circle.py
Created March 10, 2019 00:02
Scale circle with manim
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))
@jaddoescad
jaddoescad / rotate_polygon.py
Created March 10, 2019 00:06
Rotate polygon with manim
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