@prachwal/mandelbrot-generator
Version:
Professional Mandelbrot fractal generator with TypeScript support, interactive web interface, and multiple output formats
95 lines (72 loc) • 3.13 kB
Markdown
# 📚 Documentation
Complete API documentation for @prachwal/mandelbrot-generator
## 🚀 Quick Navigation
### 📋 API Reference
- **[Functions](functions/)** - All available functions
- **[Interfaces](interfaces/)** - TypeScript interfaces
- **[Type Aliases](type-aliases/)** - Custom type definitions
- **[Variables](variables/)** - Exported constants
### 🔧 Core Functions
| Function | Description | File |
|----------|-------------|------|
| [`generateMandelbrotSVG`](functions/generateMandelbrotSVG.md) | Generate SVG content for Mandelbrot fractal | Main |
| [`saveImageAsSVG`](functions/saveImageAsSVG.md) | Save fractal as SVG file | Main |
| [`generateMandelbrotData`](functions/generateMandelbrotData.md) | Generate raw fractal data | Core |
| [`mandelbrotIteration`](functions/mandelbrotIteration.md) | Calculate iterations for a point | Core |
### 🎨 Color Functions
| Function | Description | File |
|----------|-------------|------|
| [`getColor`](functions/getColor.md) | Get RGB color for iterations | Colors |
| [`getColorHex`](functions/getColorHex.md) | Get hex color for iterations | Colors |
| [`rgbToHex`](functions/rgbToHex.md) | Convert RGB to hex | Colors |
### ⚙️ Configuration
| Item | Description | File |
|------|-------------|------|
| [`MandelbrotConfig`](interfaces/MandelbrotConfig.md) | Main configuration interface | Types |
| [`defaultConfig`](variables/defaultConfig.md) | Default configuration values | Config |
| [`interestingPoints`](variables/interestingPoints.md) | Predefined fractal locations | Config |
| [`colorPalettes`](variables/colorPalettes.md) | Available color palettes | Colors |
### 🔢 Types
| Type | Description | File |
|------|-------------|------|
| [`RGBColor`](type-aliases/RGBColor.md) | RGB color tuple | Types |
| [`PaletteType`](type-aliases/PaletteType.md) | Color palette names | Types |
| [`FractalBounds`](interfaces/FractalBounds.md) | Complex plane boundaries | Types |
## 📖 Usage Examples
### Basic SVG Generation
```typescript
import { generateMandelbrotSVG, defaultConfig } from '@prachwal/mandelbrot-generator';
const svg = generateMandelbrotSVG({
...defaultConfig,
width: 800,
height: 600,
colorPalette: 'fire'
});
```
### Save to File
```typescript
import { saveImageAsSVG } from '@prachwal/mandelbrot-generator';
const path = saveImageAsSVG({
width: 1920,
height: 1080,
maxIterations: 256,
colorPalette: 'electric'
}, 'my-fractal.svg');
```
### Using Interesting Points
```typescript
import { generateMandelbrotSVG, interestingPoints } from '@prachwal/mandelbrot-generator';
const svg = generateMandelbrotSVG({
...interestingPoints.elephant,
width: 800,
height: 600,
maxIterations: 512
});
```
## 🌐 Links
- **[NPM Package](https://www.npmjs.com/package/@prachwal/mandelbrot-generator)** - Install and use
- **[GitHub Repository](https://github.com/prachwal/mandelbrot-generator)** - Source code
- **[Web Interface](../web/index.html)** - Interactive demo
- **[HTML Documentation](../web/docs/index.html)** - Full HTML docs
---
Generated by TypeDoc • [Back to Main README](../README.md)