Engine API Reference - v2.15.1
    Preparing search index...

    Class Kernel

    Sampling kernels.

    Index

    Methods

    Methods

    • Generate a set of points distributed in a series of concentric rings around the origin. The spacing between points is determined by the number of points in the first ring, and subsequent rings maintain this spacing by adjusting their number of points accordingly.

      Parameters

      • numRings: number

        The number of concentric rings to generate.

      • numPoints: number

        The number of points in the first ring.

      Returns number[]

      An array where each point is represented by two consecutive numbers (x, y).

      // Generate a kernel with 3 rings and 8 points in the first ring
      const kernel = pc.Kernel.concentric(3, 8);
      // kernel is a flat array: [x0, y0, x1, y1, x2, y2, ...]