Slide 40
Slide 40 text
Demo: ao.rb
18
class Scene
@spheres : [Sphere, Sphere, Sphere]
@plane : Plane
initialize : () -> Plane
ambient_occlusion : (Isect) -> Vec
render : (Integer, Integer, Integer) -> Integer
end
class Sphere
@center : Vec
@radius : Float
initialize : (Vec, Float) -> Float
intersect : (Ray, Isect) -> (NilClass | Vec)
end