![PyPI - Version](https://img.shields.io/pypi/v/coil-geom)
![PyPI - License](https://img.shields.io/pypi/l/coil-geom)

# coil-geom

**coil-geom** is a Python package for generating and visualizing **coil and inductor geometries** using clean, parametric definitions.  
It is designed for engineering, scientific visualization, and symbolic / schematic-style plotting.

- Pure geometry first (NumPy-friendly)
- Easy plotting with Matplotlib
- Suitable for electronics, physics, and CAD-style workflows

---

## 🔗 Project Links
* **GitHub Repository**: [https://github.com/uhwang/Coil-Geom](https://github.com/uhwang/Coil-Geom)
* **PyPI Page**: [https://pypi.org/project/coil-geom/](https://pypi.org/project/coil-geom/)
* **Issue Tracker**: [Report a bug](https://github.com/uhwang/Coil-Geom/issues)
## Installation

```bash
pip install coil-geom
```

# Mathematical Background
<p align="center">
  <img src="https://raw.githubusercontent.com/uhwang/Coil-Geom/main/images/coil-diag-01.jpg" width="90%" />
  <img src="https://raw.githubusercontent.com/uhwang/Coil-Geom/main/images/coil-diag-02.jpg" width="90%" />
  <img src="https://raw.githubusercontent.com/uhwang/Coil-Geom/main/images/coil-diag-03.jpg" width="90%" />
  <img src="https://raw.githubusercontent.com/uhwang/Coil-Geom/main/images/coil-diag-04.jpg" width="90%" />
  <img src="https://raw.githubusercontent.com/uhwang/Coil-Geom/main/images/coil-diag-05.jpg" width="90%" />
</p>

```Python
import matplotlib.pyplot as plt
import coil_geom as cg

coil = cg.CoilGeom()

xc, yc = coil.circle_coil()
xe, ye = coil.ellipse_coil()

fig, axs = plt.subplots(2)
fig.suptitle('Circle & Ellipse Coil Geometry')
axs[0].plot(xc, yc)
axs[1].plot(xe, ye)

xmax = max(xc)
axs[0].set_xlim(0,xmax)
axs[0].set_aspect('equal')
axs[1].set_xlim(0,xmax)
plt.show()
```