POV-Ray : Newsgroups : povray.advanced-users : Plotting CMYK coordinates in a 3D space : Plotting CMYK coordinates in a 3D space Server Time
20 Apr 2024 04:12:23 EDT (-0400)
  Plotting CMYK coordinates in a 3D space  
From: Mike Horvath
Date: 30 Mar 2017 15:42:23
Message: <58dd5f9f$1@news.povray.org>
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 two-dimensional.

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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.