// Title: CIE xyY Locus // Authors: Michael Horvath, Christoph Lipka // Website: http://isometricland.net // Created: 2017-03-10 // Updated: 2017-03-14 // This file is licensed under the terms of the CC-GNU LGPL. // http://www.gnu.org/licenses/lgpl-2.1.html // Illuminant = D65 // Observer = 2° (1931) // +kfi0 +kff15 +kc #version 3.7; #declare cie_ScaleAmount = 400; #declare cie_RotateAmount = 0; #declare cie_TransAmount = <-1/2,-1/2,-1/2>; #declare cie_AxesScale = 8/8; #declare cie_cam_distance = 17; #declare cie_cam_planesize = 1.7; #declare cie_cam_aspectratio = image_width/image_height; #include "ColorMine.inc" #include "math.inc" global_settings { assumed_gamma 1.0 adc_bailout 0.005 max_trace_level 50 ambient_light 1/3 /* ambient_light 0 radiosity { pretrace_start 0.08 pretrace_end 0.01 count 50 error_bound 0.1 recursion_limit 1 normal on brightness 0.8 always_sample yes gray_threshold 0.8 media on } */ } camera { // #declare cie_cam_distance = 44; // render at 8192x8192 // #declare cie_cam_planesize = 4.4; // render at 8192x8192 // #declare cie_cam_distance = 22; // render at 4096x4096 // #declare cie_cam_planesize = 2.2; // render at 4096x4096 // #declare cie_cam_distance = 17; // #declare cie_cam_planesize = 1.7; orthographic location -z * cie_cam_distance direction +z * cie_cam_distance right +x * cie_cam_planesize * cie_cam_aspectratio up +y * cie_cam_planesize // rotate +x * asind(tand(30)) scale cie_ScaleAmount } union { light_source { <-32,+32,-32,> color rgb 1 rotate -y * (330-360) // was 330 parallel point_at 0 // shadowless } light_source { <-32,+32,-32,> color rgb 1/2 rotate -y * (090-360) // was 90 parallel point_at 0 shadowless // was disabled originally } /* light_source { <-32,+32,-32,> color rgb 1 rotate +y * 150 // was 150 parallel point_at 0 shadowless // was disabled originally } */ scale cie_ScaleAmount } //background {srgb 1} #declare cie_boxShape = box { 0, 1 // hollow } #declare cie_cylShape = cylinder { 0, y, 1 // hollow } #declare cie_sphShape = sphere { 0, 1 // hollow } #declare cie_axesShape = union { cylinder { 0, x, 0.005 pigment {color srgb x} } cylinder { 0, y, 0.005 pigment {color srgb y} } cylinder { 0, z, 0.005 pigment {color srgb z} } } #declare cie_isoFinish = finish { emission 0.3 diffuse 1 } #declare cie_boxFinish = finish { diffuse 0.6 } union { /* polygon { 4, <0, 0,>, <1, 0,>, <1, 1,>, <0, 1,> pigment {image_map {png "cie_axis_x_y_cube_sans.png"}} // need to replace this scale 440/320 translate -y * ((440-320)/2 * 440/320)/440 translate -x * ((440-320)/2 * 440/320)/440 rotate +x * 90 scale cie_AxesScale translate -y * 0.00001 } polygon { 4, <0, 0,>, <1, 0,>, <1, 1,>, <0, 1,> pigment {image_map {png "cie_axis_Y100_cube_sans.png"}} // need to replace this scale 440/320 translate -y * ((440-320)/2 * 440/320)/440 translate -x * ((440-320)/2 * 440/320)/440 scale cie_AxesScale translate -z * 0.00001 } */ #local xSum = 0; #local ySum = 0; #local zSum = 0; #local nSum = 0; #for (i, 0, 89) #local nSum = nSum + (xyz_table[i].y * D65_table[i]); #end #for (i, 0, 89) #local xSum = 1/nSum * (xSum + xyz_table[i].x * 1 * D65_table[i]); #local ySum = 1/nSum * (ySum + xyz_table[i].y * 1 * D65_table[i]); #local zSum = 1/nSum * (zSum + xyz_table[i].z * 1 * D65_table[i]); #local xyYCoo = XYZ2xyY(); #local xyYCoo = ; sphere { xyYCoo, 1/80 pigment {color rgb x} } #end /* #for (i, 0, 89) #local nSum = nSum + (xyz_table[i].y * D65_table[i]); #end #for (i, 0, 89) #local xSum = 1/nSum * (xSum + xyz_table[i].x * 1 * D65_table[i]); #for (j, 0, 89) #local ySum = 1/nSum * (ySum + xyz_table[j].y * 1 * D65_table[j]); #for (k, 0, 89) #local zSum = 1/nSum * (zSum + xyz_table[k].z * 1 * D65_table[k]); #local xyYCoo = XYZ2xyY(); #local xyYCoo = ; sphere { xyYCoo, 1/80 pigment {color rgb x} } #end #end #end */ object { cie_boxShape // pigment {pigmentGradY} pigment {color rgbt 7/8} finish {cie_boxFinish} } // object {cie_axesShape} translate cie_TransAmount scale cie_ScaleAmount rotate +y * cie_RotateAmount rotate +y * clock * 360 }