



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




diffuse reflection all lights
specular highlight
(^
n )
L^ d
L^ s
L I^
I k
I k
∑
n L
r v
n θ
v r φ
Air
Glass
Air
where
are indices of refraction
sinsin
i^
t ti t^
i
θ
η η
η
θ
η =^
n i θ
θ^^ t
Material
Index of Refraction
vacuum
ice
water
ethyl alcohol
glass
diamond
vector
With a little math, we can derive the transmitted direction
sinsin
i^
t ti t^
i
θ
η η θ
η =^
n i θ
θ^^ t
where
and
(^
cos
i
i
t
c^
c
c η^
η
η^
η
θ
η^
η
2
2
n n I
θ^ i
θ^ t
critical
critical
where
sin
t
i
η i
θ^
θ
θ^
−1 η
eye ray
reflected
ray
shadowray transmitted ray
a lot
of rays
k^ yields
k 2
rays traced per eye ray
not
shadow rays
Consider this example
point x = r(t)rgbColor color = blackfor each light source L if( closest_hit(shadow_ray(x, L)) >= distance(L) )
color += shade_phong(s, x) color += k_specular * trace(reflected_ray(s,r,x))color += k_transmit * trace(transmitted_ray(s,r,x))return color What does this simulate?
nothing
to do with parallel computation over a network
Simulate phenomena by distributing multiple rays