summaryrefslogtreecommitdiff
path: root/src/photon.h
diff options
context:
space:
mode:
authorAnthony LaTorre <tlatorre9@gmail.com>2011-08-15 21:36:07 -0400
committerAnthony LaTorre <tlatorre9@gmail.com>2011-08-15 21:36:07 -0400
commitfd2e841c4c40f9e46258ac8d11c32c2204cddd5b (patch)
tree70ce88efb4ffad81846d9e8f32a02887d160ce64 /src/photon.h
parent1913c9cbed2ce6404c2a9650b49e400918a94df5 (diff)
parentfbe20d1adc26e724c92a9070d49a97808676c047 (diff)
downloadchroma-fd2e841c4c40f9e46258ac8d11c32c2204cddd5b.tar.gz
chroma-fd2e841c4c40f9e46258ac8d11c32c2204cddd5b.tar.bz2
chroma-fd2e841c4c40f9e46258ac8d11c32c2204cddd5b.zip
merge
Diffstat (limited to 'src/photon.h')
-rw-r--r--src/photon.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/photon.h b/src/photon.h
index fb29ffe..fa3b85b 100644
--- a/src/photon.h
+++ b/src/photon.h
@@ -1,6 +1,7 @@
#ifndef __PHOTON_H__
#define __PHOTON_H__
+#include "stdio.h"
#include "linalg.h"
#include "materials.h"
#include "rotate.h"
@@ -102,6 +103,9 @@ __device__ void fill_state(State &s, Photon &p)
s.absorption_length = interp_property(p.wavelength, material1.absorption_length);
s.scattering_length = interp_property(p.wavelength, material1.scattering_length);
+ printf("wavelength = %f", p.wavelength);
+ printf("scattering length = %f\n", s.scattering_length);
+
} // fill_state
__device__ void rayleigh_scatter(Photon &p, curandState &rng)
@@ -152,6 +156,8 @@ __device__ int propagate_to_boundary(Photon &p, State &s, curandState &rng)
{
if (scattering_distance <= s.distance_to_boundary)
{
+ printf("scattering distance = %f\n", scattering_distance);
+
p.time += scattering_distance/(SPEED_OF_LIGHT/s.refractive_index1);
p.position += scattering_distance*p.direction;