This is a tool that takes in a drawing as input from the user and draws it using epicycles.
An epicycle is a circle, with a small radius, whose center revolves on the circumference of another circle of larger radius. The path traced by a point on the smaller circle can be manipulated to form various different shapes. This is demonstrated in the image below.
Multiple circles can be arranged and made to rotate at different speeds and in different phases. The path of a point on the last such circle can be traced, to create a drawing. The aim of this project is to take a desired drawing as input, and arrange circles in such a way that the path of a point on the last circle results in the desired drawing.
Clone this repo into a local directory.
It is recommended to run this project in a virtual environment, running Python 3(preferably Python 3.6). Install and create the environment using
pip install virtualenv
virtualenv -p python3.6 newvenv
Activate it using
source newvenv/bin/activate
Install the necessary packages with
pip install -r requirements.txt
- Run the notebook with
jupyter notebook
- The settings cell can be changed as required.
- You can either run the cells manually(use
Shift+Enter
to run a cell and move to the next one) or use the 'Run All Cells' option. - When the drawing board appears, draw your figure(preferably a continuous figure/shape, which while can be drawn with multiple strokes, should be possible to draw without lifting a pen). Continous figures ensure best results, however, the drawer works otherwise too(but is forced to add extra lines in regions where the pen would be lifted).
- Close the drawing board window when you are done drawing and continue executing the following cells
- To run the program again, use the
Restart and Clear Output
option.
If the save_anim
option is set to 1, then make sure to allow time for the animation to be saved, before running any other cells.
- Allow user to trace from a bg image(probably with some point assistance)
- Generate epicycles for pre-existing image
- Load image and get contours
- Get sample points in order of appearance
- Python
- Fourier Transforms