From 1a6dc30108d3e78f72f773ec025fc98e246f68f5 Mon Sep 17 00:00:00 2001 From: Anthony LaTorre Date: Sat, 30 Jul 2011 16:10:27 -0400 Subject: when throwing photons from the light source out onto the scene, photons are now thrown randomly across each triangle instead of only at the center of each triangle. all of the rendering kernels have been rewritten so that they operate additively; for example, you may now throw photons from the light source onto the scene, render from the camera to the scene, then throw more photons and render again. --- color/chromaticity.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'color/chromaticity.py') diff --git a/color/chromaticity.py b/color/chromaticity.py index fbd812a..859cc14 100644 --- a/color/chromaticity.py +++ b/color/chromaticity.py @@ -1,24 +1,14 @@ import numpy as np import os +import sys dir = os.path.split(os.path.realpath(__file__))[0] -f = open(dir + '/sbrgb10w.csv') +sys.path.append(dir + '/..') -color_map = [] -for line in f: - color_map.append([float(s) for s in line.split(',')]) +from tools import read_csv -f.close() - -color_map = np.array(color_map) - -# zero negative coefficients -color_map[color_map < 0] = 0 - -# normalize coefficients -for i in range(len(color_map)): - color_map[i,1:] /= np.sum(color_map[i,1:]) +color_map = read_csv(dir + '/ciexyz64_1.csv') def map_wavelength(wavelength): r = np.interp(wavelength, color_map[:,0], color_map[:,1]) -- cgit