User Rating 0.0
Total Usage 0 times
Select a fractal type and click Generate to create your Braille fractal.
Is this tool helpful?

Your feedback helps us improve.

About

L-system fractals are generated by recursive string rewriting: an axiom string is expanded through production rules over n iterations, then interpreted as turtle graphics commands. Each iteration multiplies string length by a factor dependent on the ruleset - a Koch Snowflake at depth 6 produces over 4,000 line segments. This tool rasterizes those segments onto a quantization grid where each cell maps to a 2×4 Braille dot matrix (Unicode block U+2800 - U+28FF), encoding 8 binary dots per character. The result is a text-only fractal you can paste into terminals, code comments, or social media. Misconfiguring iteration depth relative to grid resolution produces either empty output or an undifferentiated blob - the presets here are calibrated to avoid both failure modes.

braille fractal l-system unicode ascii-art generator dragon-curve koch-snowflake sierpinski hilbert-curve

Formulas

An L-system is defined by the tuple (V, ω, P) where V is the alphabet, ω is the axiom, and P is the production ruleset. At each iteration the string is rewritten in parallel:

Sn+1 = P(Sn)

The resulting string is interpreted via turtle graphics. F means move forward by step length d, + means turn left by angle θ, means turn right by θ. The turtle position updates as:

xi+1 = xi + d cos(αi)
yi+1 = yi + d sin(αi)

For Braille quantization, the bounding box of all segments is mapped to a grid of W × H cells. Each cell covers a 2×4 dot matrix. A dot at position (col, row) within the cell sets bit b in the Braille codepoint:

codepoint = 0x2800 + 7k=0 dk 2k

Where dk {0, 1} indicates whether dot k is raised. The Braille dot ordering maps (column 0, rows 0 - 3) to bits 0,1,2,6 and (column 1, rows 0 - 3) to bits 3,4,5,7.

Reference Data

FractalAxiomRule(s)AngleSafe DepthSegments at MaxSymmetry
Dragon CurveFXXX+YF+, Y→−FXY90°124,096None
Koch SnowflakeF++F++FFFF++FF60°53,0723-fold
Sierpinski TriangleFGGFFG+F+GF, GGG120°79,8433-fold
Hilbert CurveAA→−BF+AFA+FB−, B→+AFBFBFA+90°64,096Self-similar
Lévy C CurveFF→+F−−F+45°1416,3842-fold
Gosper CurveAAAB−−B+A++AA+B−, B→+ABB−−BA++A+B60°42,4016-fold
Peano CurveXXXFYFX+F+YFXFYFXFYFX, YYFXFYFXFYFX+F+YFXFY90°36,561Space-filling
Quadratic Koch IslandF+F+F+FFF+FFFF+F+FF90°32,0484-fold
Sierpinski CarpetFFF+FFF+F90°615,6254-fold
CrossF+F+F+FFF+FF+F+F90°53,1254-fold

Frequently Asked Questions

Each L-system iteration multiplies the number of line segments exponentially. At high depths the segments become shorter than the Braille cell resolution, causing adjacent cells to all register as filled. Reduce iteration depth by 1-2 steps or increase the grid width to restore visible structure. For Koch Snowflake, depth 5 with grid width 120 is optimal; depth 6 fills the interior.
Each Braille character encodes 8 binary dots in a 2-column × 4-row grid. This gives an effective resolution of (grid_width × 2) horizontally and (grid_height × 4) vertically. A grid width of 80 characters produces 160×320 effective dots - comparable to a low-resolution bitmap. Diagonal lines suffer from aliasing artifacts because the dot grid is rectangular, not square. Curves with angles near 45° show the most staircasing.
Yes, provided the font is monospaced and supports Unicode Braille Patterns (U+2800 - U+28FF). Most modern terminals (iTerm2, Windows Terminal, GNOME Terminal) and editors (VS Code, Sublime Text) render Braille characters at uniform width. Proportional fonts will destroy alignment. Set your terminal width to at least the grid width value used during generation.
The L-system string length grows as the production rule expansion factor raised to the power of iterations. For Koch (factor 4), depth 6 produces 4^6 = 4,096 segments - manageable. The Dragon Curve (factor 2 effective) allows depth 12 safely. The Peano Curve (factor 9) becomes prohibitive above depth 3 (9^3 = 729 segments, but the string itself contains non-drawing symbols that inflate memory). The presets enforce safe maximums for each type.
Turtle graphics use mathematical convention where positive Y points upward, but screen/text coordinates have Y increasing downward. This tool flips the Y axis during quantization to produce the standard orientation. The initial heading angle also affects orientation - the presets configure starting angle to match the canonical depiction for each fractal type. Custom L-systems may need heading adjustment.