Created
March 10, 2019 00:06
-
-
Save jaddoescad/cdc6b26159a3f5ec9951e53263a6d067 to your computer and use it in GitHub Desktop.
Rotate polygon with manim
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 | |
(2,-1,0), #P5 | |
(1,-1,0) #P6 | |
] | |
poly = Polygon(*Hexagon) | |
animation = Rotate(poly, angle=math.radians(180), in_place=True) | |
self.play(animation) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment