• Generate vegetation elements based on specified growth and proof rules.

    Parameters

    • elementArray: Point[][]

      A 2D array representing terrain's elements with their points.

    • treeFunc: ((x, y) => Structure)

      A function that generates vegetation elements at a given location.

    • growthRule: ((i, j) => boolean)

      A function that determines whether vegetation should grow at a specific point based on the indices.

        • (i, j): boolean
        • Parameters

          • i: number
          • j: number

          Returns boolean

    • proofRule: ((points, i) => boolean)

      A function that determines additional conditions for vegetation growth based on the array of potential vegetation points and an index.

        • (points, i): boolean
        • Parameters

          Returns boolean

    • target: Structure

      The target ComplexSvg element where the generated vegetation elements are to be added.

    Returns void