POV-Ray : Newsgroups : povray.advanced-users : Plotting CMYK coordinates in a 3D space Server Time
28 Mar 2024 16:42:14 EDT (-0400)
  Plotting CMYK coordinates in a 3D space (Message 1 to 4 of 4)  
From: Mike Horvath
Subject: Plotting CMYK coordinates in a 3D space
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

From: Mike Horvath
Subject: Re: Plotting CMYK coordinates in a 3D space
Date: 30 Mar 2017 15:51:50
Message: <58dd61d6$1@news.povray.org>
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 two-dimensional.

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 
four-dimensional object. Or do I?

Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Plotting CMYK coordinates in a 3D space
Date: 31 Mar 2017 03:44:04
Message: <58de08c4$1@news.povray.org>
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 two-dimensional.
>
> 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
> four-dimensional object. Or do I?
>
> Mike

It just occured to me that creating a four-dimensional isosurface might 
be tricky too.


Mike


Post a reply to this message

From: Mike Horvath
Subject: Re: Plotting CMYK coordinates in a 3D space
Date: 31 Mar 2017 23:57:18
Message: <58df251e$1@news.povray.org>
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 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

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

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