• Makes a 3D color Point with given x, y and z coordinates, and RGB values ranging from 0 to 255. Any input lower than 0 for RGB will be rounded up to 0, and any input higher than 255 will be rounded down to 255.

    Parameters

    • x: number

      x-coordinate of new point

    • y: number

      y-coordinate of new point

    • z: number

      z-coordinate of new point

    • r: number

      red component of new point

    • g: number

      green component of new point

    • b: number

      blue component of new point

    Returns Point

    with x, y and z as coordinates, and r, g and b as RGB values

    Example

    const redPoint = make_color_point(0.5, 0.5, 0.5, 255, 0, 0);