Skip to main content

- A Fractal Generator

Basic Class Oriented Fractal Generator with Binary Single Threaded Acceleration made with python

Key Features::

  • Uses Compiler Optimisation for faster Execution Time
  • Functionality for Various kinds of Fractals such as the Mandelbrot, Julia & Burning Ship fractals (and more)
  • Various Color Pallets for assigning Colors to Values
  • Generates an information file from Generator Data
    • Includes the Settings used to so that the image can be Regenerated with tweaked settings
  • Support for making 3D versions of fractals
    • Uses Orthographic Projection for rendering in 3D
  • Added ability to export series of sets as .mp4 video files
    • Uses optional .dll file to save .mp4 files with the HVEC 264 codec for Better compression without loss of quality

Basic Usage::

For Quick Testing [running just the __main__.py file]

py -m Kyros

Setup

  • Initialises the Fractal Object
import Kyros

f = Kyros.fractal()

For Setting Parameters

  • Settings Basic Parameters
 # Function for Setting all the data at once to Preset Settings
f.SetAll()

 # To make a 3D Version of a graph, set the `TD` variable to `True`
f.TD = True

For Evaluating the Function

  • To Evaluate the Funcion set after all the Required Settings are Set
 # Function that evaluates and saves the Function as an image
f.eval()

 # Function that opens a Turtle Window as a Display
f.TurtleSetup()

For Evaluating the Function as a Video

  • To make a video from the fractal, use the Kyros.fractal.Animate() function
  • Set the amount of frames as well as the style of Video Created
f.Animate(frames = 1000, through = "modulus")

Setting Settings

General Settings

  • For settings custom settings you must first make a Python Dictionary with all the required settings
settings = {
	"count": "The Index of the image",

	"ci": "The constant Imaginary Value for Julia Sets",

	"cj": "The Constant Real Value for Julia Sets",

	"IsJulia": "Specifies wether the Generation is for a Julia set or not",

	"SizeX": "The Amount of pixels in the `x` direction",

	"MaxI": "The Maximum Amount of Itterations for the Render",

	"BoxRange": "Tuple of Tuples for the location of where the Generator is referencing from\
		the first tuple is the (x, y) values of the distance\
		the second tuple is for the (x, y) coordinates of the bottom left of the image",

	"GenType": "The Type of Generator Selected"
}

Color Settings

  • The color generation Settings must also be set seperately from the image generation settings
  • The color however isn't set through a settings dictionary, instead being set through its own Kyros.color class
import Kyros

c = Kyros.color(
	RateOfColorChange = "The Amount of Degrees the Colors Change per\
		itteration for Rotational Color",

	MaxI = "The value of the Maximum Amount of Itterations",

	ColorStyle = "The Style of Color Generation - Must be {'rotational', 'sinusoidal'}",

	ShadowStyle = "The Style of Shadow Generation - Must be {'none', 'minimal', 'modulus'}\
		If this is set to `modulus`, the attribute `.ModulusValue` must also be set to the color class",

	MaxValue = "For `sinusoidal` color there must be a minimum & Maximum\
		value for which the the color goes between",

	MinValue = "Which can be set with `MinValue` & `MaxValue` for can be set with a Predetermined Color Pallet",

	ColorName = "`ColorName` sets the predetermined color pallets, with the options of {'sunset', 'ocean', 'fire', 'red'}"
)

c.ModulusValue = 3 # Must be set if the Shadow Style set for the Generation is `modulus`

Implimenting the Settings

  • To Make the settings set in the two previous examples apply, they must be put into the Kyros.fractal.SetAll() function
import Kyros

f = Kyros.fractal()

f.SetAll(settings = settings, clr = c)

Installation::

From PIP:

pip install Kyros

From GITHUB:

pip install wheel
cd __directory__
py setup.py bdist_wheel
pip install dist\__version__

Quickstart::

To Make a Copy of the Social preview of the Library:

import Kyros

settings = {
	"count": 0,
	"ci": 0,
	"cj": 0,
	"IsJulia": False,
	"SizeX": 1280,
	"MaxI": 500,
	"RateOfColorChange": 9,
	"BoxRange": ((0.00086806, 0.00043403), (-0.09848914930555545, 0.6495883493661031)),
	"GenType": "SD TD"
}

f = Kyros.fractal()
f.SetAll(settings)
f.TurtleSetup()

Notes

  • self.color.ModulusValue in the information file always says that it is set to None, this is because the data is written before that variable is set. In the future this will be changed into a configurable interface for passing the color function into the fractal object.

Current Work::

See TODO.md to see what is being worked


Documentation [Coming Soon]

Metadata

Release files for Kyros 3.1.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 Kyros 3.1.0
File Size Uploaded Provenance Actions
Kyros-3.1.0.tar.gz 30.9 kB Without provenance Details for Kyros-3.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 61.9 kB

Release files / Kyros-3.1.0.tar.gz

Download URL Kyros-3.1.0.tar.gz
Size 30.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2c9a74c103312e36375097dd7ff8beff75c0e7d7a4e2bbfa7d72305efee56b25
BLAKE2b-256 checksum
How to use checksums
07091fd9031bdf64f49fd4c49624cb0d63e263f8f9798d21c015e288f8cace66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.0

Release files / Kyros-3.1.0-py3-none-any.whl

Download URL Kyros-3.1.0-py3-none-any.whl
Size 31.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f16887e5dcf3926919fcdcb79ab6f2c8f02445addce56bfa4c42a5376c5beb42
BLAKE2b-256 checksum
How to use checksums
b2692b6160933379c8a798db1318a66f2e8c0aff5a6415a30a2bd3dcc2ac7b42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.0

Security for Kyros 3.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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