Class representing a generator for a fractal tree-like structure.

Hierarchy (view full)

Constructors

Properties

elements: Element[] = []

An array of Elements.

range: Range = ...

Methods

  • Recursive function to generate a fractal tree-like structure.

    Parameters

    • xOffset: number

      X-coordinate offset.

    • yOffset: number

      Y-coordinate offset.

    • depth: number

      Current depth of recursion.

    • height: number = 300

      Height of the tree.

    • strokeWidth: number = 5

      Width of the strokes.

    • angle: number = 0

      Initial angle of the tree.

    • bendingAngle: number = ...

      Bending angle of the tree.

    Returns Point[]

    An array of points representing the tree-like structure.

    Not Exported