Skip to content
/ epicycles Public

A small program to display epicycles with given image using Fourier Transform.

License

Notifications You must be signed in to change notification settings

ftxi/epicycles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Epicycles

A small program to display epicycles with given image.

Introduction: https://sclereid.github.io/epicycles

Wikipedia page about deferent and epicycle: https://en.wikipedia.org/wiki/Deferent_and_epicycle

Inspired by this article: The Mathematical Power of Epicyclical Astronomy

In the Hipparchian and Ptolemaic systems of astronomy, the epicycle (from Ancient Greek: ἐπίκυκλος, literally on the circle, meaning circle moving on another circle) was a geometric model used to explain the variations in speed and direction of the apparent motion of the Moon, Sun, and planets. In particular it explained the apparent retrograde motion of the five planets known at the time. Secondarily, it also explained changes in the apparent distances of the planets from Earth.

snapshot

Status:

Maintaining

More Features:

better interaction with users:

  • allow using a background picture
  • more user defined variables
  • colorful background
  • better tracers
  • export as animated gif (as well as mp4)

create delicate epicycles:

  • use fourier series instead of discrete fourier transform
  • use both clockwise and counterclockwise rotations (suggested by zzytyy)

documentation:

  • write some doc about its principles

Note:

This is a GPL Licensed version. See LICENSE.md for more information.

Usage:

If you were running from the source, remember to install python, numpy and scipy in advance. Python Imaging Library (aka. PIL) and imageio is also required for image processing, however, they are not necessary for computation.

Download from the releases or run the source file in python. Should be simple enough.

(Reminder) To build on windows: upgrade to the newest version of python, create a virtual environment and install all packages in that environment, including the builder pyinstaller (must be the latest version). The run the following:

venv\Scripts\pyinstaller.exe epicycles.py --hidden-import pkg_resources.py2_warn -w --onefile --icon resource\icon.ico

REMARK

Due to the frequent Mac OS update, the previous release has some minor issues (the label on the buttons are now invisible). However, thanks to the same reason, I didn't made it to rebuilt a satisfying program. So, for those who just want to have a try, plese use the latest release. After drawing the image, press the fifth and the sixth button sequentially. Or, if you are familiar with command lines, a better solution is to run the following lines. (April 2019)

pip install numpy scipy imageio pillow
python epicycle.py

A new release is available for Windows users. I test it on Windows 10 and it operates normally.

Have fun!

About

A small program to display epicycles with given image using Fourier Transform.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages