f

fractusist

@preview

Create a variety of wonderful fractals and curves in Typst.

v0.3.2
MIT

Package Information

Last Updated
Minimum Typst Version
0.13.1
Categories
componentsvisualization
Disciplines
computer-sciencemathematics

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/fractusist:0.3.2

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/fractusist:0.3.2": *

Version History

0.3.20.13.1
97f64387307e...
0.3.10.13.1
593edb0f718c...
0.3.00.13.1
b0284a251217...
0.2.10.13.1
2ce7a24ac1f1...
0.2.00.13.1
5994a22502c2...
0.1.10.13.0
5276f140666f...
0.1.00.11.0
123611ce4cc2...

Fractusist

Create a variety of wonderful fractals and curves in Typst.

Examples

Dragon Curve Koch Snowflake Sierpiński Triangle
Hypotrochoid Random Fractal Tree Pythagorean Tree

Click on the example image to jump to the code.

Features

  • Generate fractals using L-system. The grammar, number of iterations, drawing styles, etc. could be customized.
  • Over 30 preset parameters are provided for the L-system to facilitate the drawing of fractals.
  • Generate fractals using iterative methods, including Fibonacci word fractal and Z-order curve.
  • Generate fractals using recursive methods, including various fractal trees and Sierpiński carpet.
  • Generate parametric curves, such as spirographs and Lissajous curves.
  • Generate three types of Penrose tiling: original pentagonal Penrose tiling (P1), kite and dart tiling (P2) and rhombus tiling (P3).

Usage

Import the latest version of this package with:

#import "@preview/fractusist:0.3.2": *

Each drawing function generates a type of fractal or curve, with a variety of configurable parameters.

For more information, see the manual.

This package comes with some unit tests under the tests directory.