Transform an image or a polygon into a series of rotating circles.
This project is written from scratch and it looks like a spin off from the videos because that was the aim, not because the code was copied (trust me if I could have, it would have saved me a ton of effort).
Inspired by this video and a challenge from a friend.
See details of the maths explained in this video.
Requires python >= 3.10
The rendering uses Manim Community (the community version of the software in the 3Blue1Brown videos but you don't need to install
pip install -r requirements.txt
Transform an image (.svg) or a polygon into a series of rotating circles
usage: main.py [-h] [-o OUTPUT] [-p] [-n NUMBER] [-r ROTATIONS] [-d DURATION] [-f FADE] {vector,image,polygon} ...
Transform an image or a polygon into a series of rotating circles
options:
-h, --help show this help message and exit
Input Options:
Select different input formats
{vector,image,polygon}
vector transform an SVG file
image transform an image file
polygon transform a polygon
text transform text
array transform a numpy array of points (1D array of complex numbers x + iy)
Output Options:
-o OUTPUT, --output OUTPUT, --output_file OUTPUT
output file (default: output.mp4)
-p, --preview preview when complete
Animation Options:
-n NUMBER, --number NUMBER
number of circles (default: 50)
-r ROTATIONS, --rotations ROTATIONS
number of complete rotations (default: 3)
-d DURATION, --duration DURATION
number of seconds for each rotation (default: 10)
-f FADE, --fade FADE rate of exponential decay of path - higher means faster decay (default: 0.005)
usage: main.py image [-h] IMAGE
image
positional arguments:
IMAGE image file
options:
-h, --help show this help message and exit
usage: main.py vector [-h] VECTOR
vector
positional arguments:
VECTOR SVG file
options:
-h, --help show this help message and exit
usage: main.py polygon [-h] SIDES
polygon
positional arguments:
SIDES number of sides
options:
-h, --help show this help message and exit
usage: main.py text [-h] [--font FONT] TEXT
text
positional arguments:
TEXT text
options:
-h, --help show this help message and exit
--font FONT specify text font (default: examples/fonts/georgia.ttf)
usage: main.py array [-h] ARRAY
array
positional arguments:
ARRAY NPY file
options:
-h, --help show this help message and exit