/donut

Spinning donut generation in python

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

Donut

This python script is capable of generating a .mp4 video of a spinning donut. This idea was originally brought to life in the C programming language, by Andy Sloane. You can go check his website to see the math behind the donut.c code :

https://www.a1k0n.net/2011/07/20/donut-math.html

You can see on youtube a short video of what the script is capable of :

https://www.youtube.com/watch?v=MLknZFG9p3E

Usage

Before executing the script, take a look at the code and modify the variables describing the characteristics of the video (frame dimensions, donut size, etc) to match your needs. Some variable names are directly taken from Andy Sloane's website, so go check it out to fully understand the code.

Be sure to run

pip3 install -r requirements.txt

before executing the script with :

python3 donut.py

Performance

Please note that in order to keep the script easy to read, it is not quite optimized for performance yet.

Contributing

If you have any suggestions or improvements for this script, please feel free to open a pull request or an issue on the GitHub repository.

License

This project is licensed under the GPL v3 License. See the LICENSE file for details