# fractalplots π§©
**fractalplots** is a Python package for generating and visualizing fractal patterns like the Mandelbrot set, Julia set, Koch snowflake, Sierpinski triangle, and L-system fractals. Each fractal can be generated with a single function call.
---
## π¦ Installation
Install from PyPI (after publishing):
```bash
pip install fractalplots
````
Or install from source:
```bash
git clone https://github.com/bhavykhatri/fractalplots.git
cd fractalplots
pip install -e .
```
---
## π Fractal Patterns
### π‘ Mandelbrot Set
The Mandelbrot set is generated by checking which complex numbers remain bounded under a recurrence formula. It produces the iconic cardioid shape with infinite detail.

---
### π£ Julia Set
Julia sets are variations of the Mandelbrot fractal, defined using a fixed complex constant. Different constants produce different fractal "personalities".

---
### βοΈ Koch Snowflake
The Koch snowflake begins as an equilateral triangle. Each side is recursively replaced with a spike pattern, creating a snowflake boundary.

---
### πΊ Sierpinski Triangle
A classic example of a recursive fractal made by repeatedly removing the center of a triangle. The pattern reveals a triangular lattice structure.

---
### πΏ L-System Fractal
L-Systems (Lindenmayer Systems) use rewriting rules to simulate fractal growth like that of plants, corals, and trees.

---
## βοΈ Example Usage
Hereβs how to generate and save a Mandelbrot image:
```python
from fractalplots import generate_mandelbrot, plot_mandelbrot
div_time = generate_mandelbrot()
plot_mandelbrot(div_time, save_path="mandelbrot.png", show=False)
```
Every fractal module provides two functions:
* `generate_*`: Computes data (e.g., image matrix or point list)
* `plot_*`: Renders or saves the fractal image
---
## π Folder Structure
```
fractalplots/
βββ fractalplots/
β βββ mandelbrot.py
β βββ julia.py
β βββ koch.py
β βββ sierpinski.py
β βββ lsystem.py
β βββ __init__.py
βββ examples/
βββ tests/
βββ assets/
β βββ *.png
βββ README.md
βββ LICENSE
βββ pyproject.toml
```
---
## π§ͺ Run Tests
To verify everything works:
```bash
pytest tests/
```
---
## π€ Contributing
Fractals are fun and there's room for more! Contributions are welcome β add new fractal types, optimize existing ones, or improve rendering. Fork the repo and open a pull request.
---
## π License
MIT License Β© 2025 Bhavy Khatri
Raw data
{
"_id": null,
"home_page": null,
"name": "fractalplots",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "fractal, math, visualization, mandelbrot, julia, koch, sierpinski, l-system",
"author": "Your Name",
"author_email": "Bhavy Khatri <bhavykhatri@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/4a/8c/d59a8888f30a8063495966837fd65ac64c6d88ff471e6d2a75a8f6d5cd8a/fractalplots-0.1.2.tar.gz",
"platform": null,
"description": "\n\n# fractalplots \ud83e\udde9\n\n**fractalplots** is a Python package for generating and visualizing fractal patterns like the Mandelbrot set, Julia set, Koch snowflake, Sierpinski triangle, and L-system fractals. Each fractal can be generated with a single function call.\n\n---\n\n## \ud83d\udce6 Installation\n\nInstall from PyPI (after publishing):\n\n```bash\npip install fractalplots\n````\n\nOr install from source:\n\n```bash\ngit clone https://github.com/bhavykhatri/fractalplots.git\ncd fractalplots\npip install -e .\n```\n\n---\n\n## \ud83c\udf00 Fractal Patterns\n\n### \ud83d\udfe1 Mandelbrot Set\n\nThe Mandelbrot set is generated by checking which complex numbers remain bounded under a recurrence formula. It produces the iconic cardioid shape with infinite detail.\n\n\n\n---\n\n### \ud83d\udfe3 Julia Set\n\nJulia sets are variations of the Mandelbrot fractal, defined using a fixed complex constant. Different constants produce different fractal \"personalities\".\n\n\n\n---\n\n### \u2744\ufe0f Koch Snowflake\n\nThe Koch snowflake begins as an equilateral triangle. Each side is recursively replaced with a spike pattern, creating a snowflake boundary.\n\n\n\n---\n\n### \ud83d\udd3a Sierpinski Triangle\n\nA classic example of a recursive fractal made by repeatedly removing the center of a triangle. The pattern reveals a triangular lattice structure.\n\n\n\n---\n\n### \ud83c\udf3f L-System Fractal\n\nL-Systems (Lindenmayer Systems) use rewriting rules to simulate fractal growth like that of plants, corals, and trees.\n\n\n\n---\n\n## \u270f\ufe0f Example Usage\n\nHere\u2019s how to generate and save a Mandelbrot image:\n\n```python\nfrom fractalplots import generate_mandelbrot, plot_mandelbrot\n\ndiv_time = generate_mandelbrot()\nplot_mandelbrot(div_time, save_path=\"mandelbrot.png\", show=False)\n```\n\nEvery fractal module provides two functions:\n\n* `generate_*`: Computes data (e.g., image matrix or point list)\n* `plot_*`: Renders or saves the fractal image\n\n---\n\n## \ud83d\udcc1 Folder Structure\n\n```\nfractalplots/\n\u251c\u2500\u2500 fractalplots/\n\u2502 \u251c\u2500\u2500 mandelbrot.py\n\u2502 \u251c\u2500\u2500 julia.py\n\u2502 \u251c\u2500\u2500 koch.py\n\u2502 \u251c\u2500\u2500 sierpinski.py\n\u2502 \u251c\u2500\u2500 lsystem.py\n\u2502 \u2514\u2500\u2500 __init__.py\n\u251c\u2500\u2500 examples/\n\u251c\u2500\u2500 tests/\n\u251c\u2500\u2500 assets/\n\u2502 \u2514\u2500\u2500 *.png\n\u251c\u2500\u2500 README.md\n\u251c\u2500\u2500 LICENSE\n\u2514\u2500\u2500 pyproject.toml\n```\n\n---\n\n## \ud83e\uddea Run Tests\n\nTo verify everything works:\n\n```bash\npytest tests/\n```\n\n---\n\n## \ud83e\udd1d Contributing\n\nFractals are fun and there's room for more! Contributions are welcome \u2014 add new fractal types, optimize existing ones, or improve rendering. Fork the repo and open a pull request.\n\n---\n\n## \ud83d\udcc4 License\n\nMIT License \u00a9 2025 Bhavy Khatri\n\n",
"bugtrack_url": null,
"license": null,
"summary": "Generate and visualize fractal patterns like Mandelbrot, Julia, Koch, Sierpinski, and L-Systems.",
"version": "0.1.2",
"project_urls": {
"Homepage": "https://github.com/bhavykhatri/fractalplots",
"Source": "https://github.com/bhavykhatri/fractalplots",
"Tracker": "https://github.com/bhavykhatri/fractalplots/issues"
},
"split_keywords": [
"fractal",
" math",
" visualization",
" mandelbrot",
" julia",
" koch",
" sierpinski",
" l-system"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "71d03c502189904b3b86f29b7c51250489ef8b75adf4f2478dc070ba3c61e70d",
"md5": "ecc7ee390df3df77aaa92cfeb9c5f0f1",
"sha256": "f6982d7f521b82c6782ddc70b8d8a3e674cc31a32971403cfe35ea82fd6108b8"
},
"downloads": -1,
"filename": "fractalplots-0.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "ecc7ee390df3df77aaa92cfeb9c5f0f1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7389,
"upload_time": "2025-08-01T13:22:19",
"upload_time_iso_8601": "2025-08-01T13:22:19.796895Z",
"url": "https://files.pythonhosted.org/packages/71/d0/3c502189904b3b86f29b7c51250489ef8b75adf4f2478dc070ba3c61e70d/fractalplots-0.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "4a8cd59a8888f30a8063495966837fd65ac64c6d88ff471e6d2a75a8f6d5cd8a",
"md5": "2dec24f2b9454005e892e23c34c82057",
"sha256": "ea8ce8115be1caa310b2a9dd2757cbcaa465144440fff844e31498b319e4c889"
},
"downloads": -1,
"filename": "fractalplots-0.1.2.tar.gz",
"has_sig": false,
"md5_digest": "2dec24f2b9454005e892e23c34c82057",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 6489,
"upload_time": "2025-08-01T13:22:20",
"upload_time_iso_8601": "2025-08-01T13:22:20.925290Z",
"url": "https://files.pythonhosted.org/packages/4a/8c/d59a8888f30a8063495966837fd65ac64c6d88ff471e6d2a75a8f6d5cd8a/fractalplots-0.1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-01 13:22:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "bhavykhatri",
"github_project": "fractalplots",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "fractalplots"
}