FullControl JS
    Preparing search index...

    Function sinewaveXYpolar

    • Generates an array of Points forming a 2D sinusoidal 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 peak amplitude of the sine wave.

      • period_length: number

        The spatial length of one full cycle along the travel axis.

      • periods: number

        The number of full wave cycles to generate.

      • segments_per_period: number = 16

        The resolution (number of points) generated per cycle.

      • extra_half_period: boolean = false

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

      • phase_shift: number = 0

        The starting phase shift of the sine wave in radians.

      Returns Point[]

      Array of Points defining a smooth sine wave.