Metadata-Version: 2.4
Name: fractalplots
Version: 0.1.0
Summary: Generate and visualize fractal patterns like Mandelbrot, Julia, Koch, Sierpinski, and L-Systems.
Author: Your Name
Author-email: Bhavy Khatri <bhavykhatri@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/bhavykhatri/FractalGen
Project-URL: Source, https://github.com/bhavykhatri/FractalGen
Project-URL: Tracker, https://github.com/bhavykhatri/FractalGen/issues
Keywords: fractal,math,visualization,mandelbrot,julia,koch,sierpinski,l-system
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Scientific/Engineering :: Visualization
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21
Requires-Dist: matplotlib>=3.4
Dynamic: author
Dynamic: license-file
Dynamic: requires-python



# FractalGen 🧩

**FractalGen** 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 fractalgen
````

Or install from source:

```bash
git clone https://github.com/bhuwankhatri/fractalgen.git
cd fractalgen
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.

![Mandelbrot](./assets/mandelbrot.png)

---

### 🟣 Julia Set

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

![Julia](./assets/julia.png)

---

### ❄️ Koch Snowflake

The Koch snowflake begins as an equilateral triangle. Each side is recursively replaced with a spike pattern, creating a snowflake boundary.

![Koch](./assets/koch.png)

---

### 🔺 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.

![Sierpinski](./assets/sierpinski.png)

---

### 🌿 L-System Fractal

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

![L-System](./assets/lsystem.png)

---

## ✏️ Example Usage

Here’s how to generate and save a Mandelbrot image:

```python
from fractalgen 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

```
fractalgen/
├── fractalgen/
│   ├── 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 Bhuwan Khatri

