Skip to main content

spyrograph: elegant mathematics and geometries

Animation of three geometric, symmetrical shapes being drawn next to one another left to right. The shape on the left is red, the middle green, and the right is blue.

What is it?

spyrograph is a lightweight Python package that provides an expressive and flexible set of tools for drawing beautiful mathematically driven art. With just a few lines of easy-to-read code you can start analyzing, visualizing, and exploring elegant mathematics

Downloads Issues License Version Documentation Status

"Buy Me A Coffee"

Official website

Official docs

Table of Contents


:key: Key features

  • Expressive and consistent syntax
  • Robust underlying mathematics
  • Beginner and expert friendly
  • numpy is the only required third-party installation
  • Clear visualizations and animations
  • Flexible to a wide range of usecases
  • Lightweight, just plug and play

Sample hypotrochoid drawing showing a circle rolling around the interior of another circle drawing a geometric shape


:computer: Installation

pip

Install the latest stable release from PyPI using

$ pip3 install spyrograph

or clone the development version from GitHub with

$ git clone https://github.com/chris-greening/spyrograph.git

:seedling: Quickstart

spyrograph is designed to be expressive and easy-to-use - simply import spyrograph and jump right into drawing elegant, complex shapes in just a few lines of code!

from spyrograph import Hypotrochoid

# Trace a hypotrochoid from 0 to 2pi where
# the fixed circle radius is 300, rolling circle 
# radius is 200, and the distance from the rolling 
# circle is 100
hypotrochoid = Hypotrochoid(
    R=300,
    r=200,
    d=100,
    thetas=np.arange(0, 2*np.pi, .1)
)
hypotrochoid.trace(
    show_circles=True, 
    frame_pause=.05, 
    circle_color="grey"
)

:pray: Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome!

Feel free to open an Issue, check out existing Issues, or start a discussion.

Beginners to open source are highly encouraged to participate and ask questions if you're unsure what to do/where to start


:newspaper: Blog posts

Check out the official website for the latest blog posts on the project!


:books: Documentation

The official documentation can be found on Read The Docs


:credit_card: License

This library operates under the MIT license.


:grey_question: Support

Reach out to me if you want to connect or have any questions and I will do my best to get back to you

Metadata

Release files for spyrograph 0.29.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spyrograph 0.29.0
File Size Uploaded
spyrograph-0.29.0.tar.gz 22.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spyrograph 0.29.0
File Interpreter ABI Platform
spyrograph-0.29.0-py3-none-any.whl Python 3 none any Details

Total release size: 52.0 kB

Release files / spyrograph-0.29.0.tar.gz

Download URL spyrograph-0.29.0.tar.gz
Size 22.7 kB
Tags Source
SHA-256 checksum
How to use checksums
72f97f27b0c1b786210345c7bd09a0793fc589076c43930c3471d5b7e40c6d3d
BLAKE2b-256 checksum
How to use checksums
56508950a37aec7aa6d1b0d0e209fe469380f6efd1e8237f72be735b30f0a5b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.4

Release files / spyrograph-0.29.0-py3-none-any.whl

Download URL spyrograph-0.29.0-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8083f3c98e5c69a91c173c71fc7e57f761b8e8ad56a055f5e0e866f4988ed1d3
BLAKE2b-256 checksum
How to use checksums
e3fe2e20eb53f29cddce6710311a01bb697a9c87eefc96820d5877d51eb72ac1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.29.0 This release

2 release files

0.28.1

1 release file

0.28.0

1 release file

0.27.0

1 release file

0.26.0

1 release file

0.25.3

1 release file

0.25.2

1 release file

0.25.1

1 release file

0.25.0

1 release file

0.24.0

1 release file

0.23.0

1 release file

0.22.1

1 release file

0.22.0

1 release file

0.21.0

1 release file

0.20.5

1 release file

0.20.4

1 release file

0.20.3

1 release file

0.20.2

1 release file

0.20.1

1 release file

0.20.0

1 release file

0.19.1

1 release file

0.19.0

1 release file

0.18.3

1 release file

0.18.2

1 release file

0.18.1

1 release file

0.18.0

1 release file

0.17.5

1 release file

0.17.4

1 release file

0.17.3

1 release file

0.17.2

1 release file

0.17.1

1 release file

0.17.0

1 release file

0.16.1

1 release file

0.16.0

1 release file

0.15.0

1 release file

0.14.0

1 release file

0.13.0

1 release file

0.12.0

1 release file

0.11.3

1 release file

0.11.2

1 release file

0.11.0

1 release file

0.10.1

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.1

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page