A Class Based Python Library for Fractal Generation
Project description
- 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 Shipfractals (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
.mp4video files- Uses optional
.dllfile to save.mp4files with the HVEC 264 codec for Better compression without loss of quality
- Uses optional
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.colorclass
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.ModulusValuein the information file always says that it is set toNone, 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]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Kyros-3.1.0.tar.gz
(30.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
Kyros-3.1.0-py3-none-any.whl
(31.0 kB
view details)
File details
Details for the file Kyros-3.1.0.tar.gz.
File metadata
- Download URL: Kyros-3.1.0.tar.gz
- Upload date:
- Size: 30.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c9a74c103312e36375097dd7ff8beff75c0e7d7a4e2bbfa7d72305efee56b25
|
|
| MD5 |
faa531bf7413ed9e1823e69053f1e924
|
|
| BLAKE2b-256 |
07091fd9031bdf64f49fd4c49624cb0d63e263f8f9798d21c015e288f8cace66
|
File details
Details for the file Kyros-3.1.0-py3-none-any.whl.
File metadata
- Download URL: Kyros-3.1.0-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f16887e5dcf3926919fcdcb79ab6f2c8f02445addce56bfa4c42a5376c5beb42
|
|
| MD5 |
4f82af5bbec878e9a2b85fb24e19f9fb
|
|
| BLAKE2b-256 |
b2692b6160933379c8a798db1318a66f2e8c0aff5a6415a30a2bd3dcc2ac7b42
|