









 
 




 
 


I am using the following code to generate XYZ coordinates for the outer
surface of the SRGB gamut:
#macro cie_calc_gamut_xyz_srgb()
// should handle black in the xyY space separately, but am unsure how
#for (i, 0, cie_sample_count_srgb)
#for (j, 0, cie_sample_count_srgb)
// side 0 & 3
#local cooRGB = <i/cie_sample_count_srgb,j/cie_sample_count_srgb,0>;
#local cooXYZ = cie_convRGB2XYZ(cooRGB);
#declare cie_point_array_srgb[0][i][j] = cooXYZ;
#local cooRGB = <i/cie_sample_count_srgb,j/cie_sample_count_srgb,1>;
#local cooXYZ = cie_convRGB2XYZ(cooRGB);
#declare cie_point_array_srgb[3][i][j] = cooXYZ;
// side 1 & 4
#local cooRGB = <i/cie_sample_count_srgb,0,j/cie_sample_count_srgb>;
#local cooXYZ = cie_convRGB2XYZ(cooRGB);
#declare cie_point_array_srgb[1][i][j] = cooXYZ;
#local cooRGB = <i/cie_sample_count_srgb,1,j/cie_sample_count_srgb>;
#local cooXYZ = cie_convRGB2XYZ(cooRGB);
#declare cie_point_array_srgb[4][i][j] = cooXYZ;
// side 2 & 5
#local cooRGB = <0,i/cie_sample_count_srgb,j/cie_sample_count_srgb>;
#local cooXYZ = cie_convRGB2XYZ(cooRGB);
#declare cie_point_array_srgb[2][i][j] = cooXYZ;
#local cooRGB = <1,i/cie_sample_count_srgb,j/cie_sample_count_srgb>;
#local cooXYZ = cie_convRGB2XYZ(cooRGB);
#declare cie_point_array_srgb[5][i][j] = cooXYZ;
#end
#end
#end
The sRGB space is roughly a misshapen cube, with 8 corners for red,
green, blue, cyan, magenta, yellow, white and black. And each face of
this cube is roughly twodimensional.
But CMYK has 4 values instead of 3, and it's really throwing me for a
loop. How do I plot points along its outer surface?
Mike
Post a reply to this message


 
 




 
 


On 3/30/2017 3:43 PM, Mike Horvath wrote:
> The sRGB space is roughly a misshapen cube, with 8 corners for red,
> green, blue, cyan, magenta, yellow, white and black. And each face of
> this cube is roughly twodimensional.
I forgot to also say that I am treating each of the 6 faces of the cube
individually. Imagine an 2D grid. I am plotting each x and y coordinate
to generate a single 2D face, and am doing this 6 times to generate all
6 cube faces.
Not sure how to do this with CMYK. I don't think I want to generate a
fourdimensional object. Or do I?
Mike
Post a reply to this message


 
 




 
 


On 3/30/2017 3:52 PM, Mike Horvath wrote:
> On 3/30/2017 3:43 PM, Mike Horvath wrote:
>> The sRGB space is roughly a misshapen cube, with 8 corners for red,
>> green, blue, cyan, magenta, yellow, white and black. And each face of
>> this cube is roughly twodimensional.
>
> I forgot to also say that I am treating each of the 6 faces of the cube
> individually. Imagine an 2D grid. I am plotting each x and y coordinate
> to generate a single 2D face, and am doing this 6 times to generate all
> 6 cube faces.
>
> Not sure how to do this with CMYK. I don't think I want to generate a
> fourdimensional object. Or do I?
>
> Mike
It just occured to me that creating a fourdimensional isosurface might
be tricky too.
Mike
Post a reply to this message


 
 




 
 


On 3/30/2017 3:43 PM, Mike Horvath wrote:
> I am using the following code to generate XYZ coordinates for the outer
> surface of the SRGB gamut:
>
>
>...
>
> The sRGB space is roughly a misshapen cube, with 8 corners for red,
> green, blue, cyan, magenta, yellow, white and black. And each face of
> this cube is roughly twodimensional.
>
> But CMYK has 4 values instead of 3, and it's really throwing me for a
> loop. How do I plot points along its outer surface?
>
>
> Mike
Converting to/from CMYK involves additional steps due to color profiles
and such. I think I will skip it.
Mike
Post a reply to this message


 
 




 

