Skip to main content

FractPy: a Python library for generating fractals

PyPI License: MIT Documentation Status codecov Code style: black

This library currently implements the generation of following fractals:

  • Newton Fractal
    • For Newton Fractal, this library can currently be used only for polynomial functions with real powers.

FractPy relies on sympy, numpy, and matplotlib - all part of the standard scientific Python stack so is easy to install on all operating systems.

How do I install FractPy?

The recommended way to install fractpy is using Python Package index (PyPi), to install use the following command:

$ python -m pip install fractpy

How do I use FractPy?

Here is an example of generating Newton Fractal for :

from fractpy.models import NewtonFractal
model = NewtonFractal("x**8 - 4x**3 + x**2 - 6")
p = model.plot(-2, 2, -2, 2, (1000, 1000))
p.show()

The above code will generate the following plot:

Full documentation is available here: https://fractpy.readthedocs.io/

How can I contribute to FractPy?

After forking and cloning the forked repository on your computer, change the directory to fractpy and create a virtual environment:

$ cd fractpy
$ python -m venv env 

Activate the virtual environment and install tox:

$ . env/bin/activate
$ python -m pip install tox

Make the required changes and then run the tests using tox (Make sure to run the tests before opening a PR):

$ python -m tox -e dev

Documentation

To build the documentation first install flit, which will help in installing the build requirements:

$ python -m pip installl flit
$ python -m flit install --symlink

Then:

$ cd docs
$ make html

Docs will be built in docs/_build directory.

All contributions are welcome, whether it be adding new methods of generating fractals, writing documentation, or fixing embarrassing bugs!

In the interest of fostering an open and welcoming environment, all contributors, maintainers and users are expected to abide by the Python code of conduct: https://www.python.org/psf/codeofconduct/

Getting Help

For more information or to ask questions about FractPy join our Slack Channel.

Licensing

FractPy is fully open source. For more information about its license, see LICENSE.

Release files for fractpy 0.0.4

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

Source distribution (sdist)

Source distribution for fractpy 0.0.4
File Size Uploaded
fractpy-0.0.4.tar.gz 43.8 MB Details

Built distribution (wheel)

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

Total release size: 43.8 MB

Release files / fractpy-0.0.4.tar.gz

Download URL fractpy-0.0.4.tar.gz
Size 43.8 MB
Tags Source
SHA-256 checksum
How to use checksums
a82565c5efe0e504c5053cb6fa6d2841e861c4bc8ff09dbc3f2913f19349cf00
BLAKE2b-256 checksum
How to use checksums
ac779f0b00e886f837f5638672e20d0068cf54e8027f0abbe34c3a052cb56afb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release files / fractpy-0.0.4-py3-none-any.whl

Download URL fractpy-0.0.4-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d91f0d0f55d2c07e29b7a636c11ebf2a1ca60cb3e34ac314f0492878ea9f602d
BLAKE2b-256 checksum
How to use checksums
9dc84d8545ab7aba5f400d77b0cad8f41210acccec9e2e7f3f071eed34795cce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.25.1

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.1

2 release files

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