Source Academy Modules
    Preparing search index...

    Variable make_3D_color_pointConst

    make_3D_color_point: (
        x: number,
        y: number,
        z: number,
        r: number,
        g: number,
        b: number,
    ) => Point = CurveFunctions.make_3D_color_point

    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.

    Type Declaration

      • (x: number, y: number, z: number, r: number, g: number, b: number): Point
      • 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

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