Complete fractal generation configuration
Name of the output file (will be converted to .svg)
Absolute path to the saved SVG file
import { saveImageAsSVG, defaultConfig } from '@prachwal/mandelbrot-generator';
const filePath = saveImageAsSVG({
...defaultConfig,
width: 1200,
height: 800,
maxIterations: 256
}, 'my-fractal.svg');
console.log(`Fractal saved to: ${filePath}`);
generateMandelbrotSVG for generating SVG content without saving
Saves a Mandelbrot fractal as an SVG file to the output directory
This function generates the fractal and writes it directly to a file in the project's output folder. It automatically creates the output directory if needed.