FullControl JS
    Preparing search index...

    Function squarewaveXYpolar

    • Generates an array of Points forming a 2D square wave pattern.

      Parameters

      • start: Point

        The starting point of the wave sequence.

      • direction_polar: number

        The overall direction angle (radians) the wave travels along.

      • amplitude: number

        The distance the wave peaks extend perpendicularly from the travel axis.

      • line_spacing: number

        The linear travel distance between each perpendicular peak.

      • periods: number

        The number of full wave cycles to generate.

      • extra_half_period: boolean = false

        Set to true to add an extra half-cycle at the end.

      • extra_end_line: boolean = false

        Set to true to emit a final travel segment matching the axis direction.

      Returns Point[]

      Array of Points traversing the square wave.