Metadata-Version: 2.4
Name: falkourier
Version: 1.0.2
Summary: Draw images and math curves using Fourier series epicycles
Author-email: falkomeai <falkomeai@users.noreply.github.com>
Maintainer-email: falkomeai <falkomeai@users.noreply.github.com>
License: MIT License
        
        Copyright (c) 2026 falkomeai
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/falkomeAI/Fourier-Epicycle-Drawing-Studio
Project-URL: Documentation, https://falkomeAI.github.io/Fourier-Epicycle-Drawing-Studio/
Project-URL: Live Demo, https://fourier-studio.streamlit.app/
Project-URL: Repository, https://github.com/falkomeAI/Fourier-Epicycle-Drawing-Studio.git
Project-URL: Bug Tracker, https://github.com/falkomeAI/Fourier-Epicycle-Drawing-Studio/issues
Project-URL: Creator, https://instagram.com/falkomeai
Keywords: fourier,fourier-series,epicycles,drawing,math-art,animation,fft,dft,graphics,falkomeai
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.24
Requires-Dist: scipy>=1.10
Requires-Dist: matplotlib>=3.7
Requires-Dist: Pillow>=9.0
Requires-Dist: opencv-python-headless>=4.8
Requires-Dist: streamlit>=1.28
Requires-Dist: imageio-ffmpeg>=0.4.8
Provides-Extra: ai
Requires-Dist: rembg>=2.0; extra == "ai"
Requires-Dist: ultralytics>=8.3.0; extra == "ai"
Provides-Extra: dev
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Requires-Dist: wheel; extra == "dev"
Dynamic: license-file

# falkourier

[![PyPI](https://img.shields.io/pypi/v/falkourier.svg)](https://pypi.org/project/falkourier/)
[![Python](https://img.shields.io/pypi/pyversions/falkourier.svg)](https://pypi.org/project/falkourier/)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/falkomeAI/Fourier-Epicycle-Drawing-Studio/blob/main/LICENSE)
[![Creator](https://img.shields.io/badge/creator-@falkomeai-purple.svg)](https://instagram.com/falkomeai)

![falkourier Preview](https://raw.githubusercontent.com/falkomeAI/Fourier-Epicycle-Drawing-Studio/main/assets/preview_epicycle_studio.png)

`falkourier` is a Python library that draws images, sketches, and curves using Fourier series epicycles (rotating circles). It converts any 2D outline into mathematical harmonic frequencies and animates the drawing process.

Created by [@falkomeai](https://instagram.com/falkomeai).

- **Live Web Studio**: [https://fourier-studio.streamlit.app](https://fourier-studio.streamlit.app/)
- **GitHub Repository**: [falkomeAI/Fourier-Epicycle-Drawing-Studio](https://github.com/falkomeAI/Fourier-Epicycle-Drawing-Studio)

---

## Installation

```bash
pip install falkourier
```

---

## Quick Start

### 1. Web Studio UI
The easiest way to use it is through the interactive web interface:

```bash
falkourier-studio
```

This launches a local web app in your browser where you can upload an image, tune the number of harmonics, preview the epicycles live, and export MP4 videos.

### 2. Command Line
You can also generate videos directly from your terminal:

```bash
# Render a video from an image
falkourier --image portrait.jpg --n 500 --save output.mp4

# Render vertical 9:16 format (for Instagram Reels or TikTok)
falkourier --shape hummingbird --n 300 --format reels --save reel.mp4

# Render from built-in curves
falkourier --shape heart --n 200 --save heart.mp4
```

### 3. Python Code

```python
import falkourier as fk

# 1. Use a built-in curve or extract from an image
path = fk.SHAPES["hummingbird"]()
# path = fk.extract_boundary_contour_path("portrait.jpg", target_points=2048)

# 2. Fit Fourier series
fit = fk.fit_fourier(path[:, 0], path[:, 1], n_harmonics=500)

print(f"X harmonics: {len(fit['x_coeffs']['an'])}")
print(f"Y harmonics: {len(fit['y_coeffs']['cn'])}")
```

---

## Built-in Shapes

You can try out any of the built-in mathematical curves:
`hummingbird`, `heart`, `star`, `butterfly`, `infinity`, `spiral`, `rose`.

```python
import falkourier as fk

curve = fk.SHAPES["butterfly"]()
```

---

## Author & License

- Built by **[@falkomeai](https://instagram.com/falkomeai)**
- Distributed under the [MIT License](https://github.com/falkomeAI/Fourier-Epicycle-Drawing-Studio/blob/main/LICENSE)
