Mathematical Foundations of ANSI Fractal
ANSI Fractals pair Unicode full-block glyphs (█) with ECMA-48 / Xterm-256 terminal escape sequences (`\x1b[38;5;Nm`) so modern command-line shells (Bash, Zsh, iTerm2, Kitty, Alacritty, and Windows Terminal) render vibrant, multi-colored Mandelbrot, Julia, and Sierpinski graphics right inside the terminal window.
Self-similar fractals exhibit recurring geometric structure across scales, governed by Iterated Function Systems (IFS), Lindenmayer L-System rewriting rules, or recursive spatial subdivisions. Every geometry calculation, 2× HiDPI canvas pass, progressive animation frame, and lossless SVG vector export executes natively inside your browser at 60 FPS with zero server latency.
Xterm-256 Escape Sequence Architecture
Set Foreground Color N (0..255): \x1b[38;5;{N}m
6×6×6 Color Cube Index Formula: N = 16 + 36·R + 6·G + B (R, G, B ∈ 0..5)
Reset Attributes at End of Row: \x1b[0m
One-Liner Execution in Bash/Zsh: printf "\x1b[38;5;42m█...\x1b[0m\n"
The live preview canvas above simulates the exact Xterm-256 RGB color codes emitted in the escape string below, allowing you to preview and tune terminal themes before pasting the `printf` command into your shell.
Iteration Scaling & Complexity Table
| Iteration / Setting | Elements / Size | Geometric Property |
|---|---|---|
| Emerald Cyber | Xterm codes 36..85 | Matrix emerald & cyan terminal glow |
| Plasma Neon | Xterm codes 129..220 | Violet, magenta & gold gradient |
| Oceanic Cyan | Xterm codes 32..123 | Deep sea blue to ice cyan |
| Solar Magma | Xterm codes 160..228 | Crimson, amber & solar yellow |
Applications in Science, Graphics & Engineering
Shell Login & Dotfiles Art
Paste the Ready-to-Paste `printf "..."` one-liner directly into `.bashrc` or `.zshrc` for an instant color fractal greeting.
CLI Progress & Diagnostic Demos
Test 256-color terminal emulator fidelity across SSH sessions and tmux panes.
BBS & Demoscene ANSI Art
Honors the classic 1980s/1990s ANSI art demoscene using mathematical fractal generation.
Zero External Dependencies
Runs in any POSIX shell using the built-in `printf` utility with zero packages installed.
Interactive Controls, Pan/Zoom & Vector Export
Choose your fractal and 256-color palette, preview the exact terminal colors on the live canvas, and copy the ready-to-run `printf` command straight into your terminal.
Export crisp 2× Retina PNG renders for presentations or scalable infinite-resolution SVG files directly into Illustrator, Figma, Inkscape, LaTeX, or laser-cutting workflows.