Variable Geometry

Geometry: {
    centroid: ((points) => Point);
    line_from_start_end_distance: ((start, end, distance) => Line);
    line_from_start_end_divisions: ((start, end, divisions) => Line);
}

Type declaration

  • centroid: ((points) => Point)
      • (points): Point
      • Calculates the centroid of an array of points

        Parameters

        • points: Point[]

          An array of points

        Returns Point

        the central point of the array of points

  • line_from_start_end_distance: ((start, end, distance) => Line)
      • (start, end, distance): Line
      • Divides the line into a number of divisions based on distance

        Parameters

        • start: Point

          the start point

        • end: Point

          the end point

        • distance: number

          the distance at which this line must be divided

        Returns Line

        A line object with the right number of points

  • line_from_start_end_divisions: ((start, end, divisions) => Line)
      • (start, end, divisions): Line
      • Creates a line based on the number of divisons

        Parameters

        • start: Point

          the start point

        • end: Point

          the end point

        • divisions: number

          the number of divisions

        Returns Line

        the line object

Generated using TypeDoc