Export Code

Fork of Fork of HTML Starter

Nita

Last edited Mar 20, 2025
Created on Mar 20, 2025

Self-Squared Dragon Fractal

This visualization creates a fractal pattern based on the classic dragon curve with a self-similar, squared arrangement.

About the Visualization

The fractal is constructed in two main steps:

  1. First, a dragon curve is generated using the folding algorithm, which creates the characteristic 90-degree turns.
  2. Then, transformations are recursively applied to create smaller copies of the dragon arranged in a square pattern, along with some diagonal elements for added complexity.

The dragon curve has several interesting properties:

  • It never crosses itself
  • It approaches but never completely fills space
  • Its limit set has a Hausdorff dimension of 2
  • It exhibits self-similarity at multiple scales

Mathematical Background

The dragon curve can be constructed by repeatedly folding a strip of paper in half, always folding in the same direction. When unfolded so that each crease makes a 90° angle, the edge forms the dragon curve.

The self-squared pattern is created using geometric transformations that combine scaling, rotation, and translation:

MIT Licensed