git.haldean.org artray / 0fd9136
Woo hoo dox Will Brown 8 years ago
14 changed file(s) with 202 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
22 import Data.Vect.Double
33 import ArtRay.Primitives
44
5 -- | Solve a quadratic. Returns NaN for non-real roots, and two equal values for
6 -- double roots.
57 quadSolve :: Double -> Double -> Double -> (Double, Double)
68 quadSolve a b c =
79 ((-b + disc) / (2 * a), (-b - disc) / (2 * a))
810 where disc = sqrt (b * b - 4 * a * c)
911
12 -- | Find the first intersection between a primitive and a ray. Returns Nothing
13 -- if the ray never intersects the primitive.
1014 firstIntersection :: Ray -> Primitive -> Maybe (Double, Vec3, Primitive)
15
1116 firstIntersection (Ray dir pos) prim@(Sphere center radius _) =
1217 let (s1, s2) = quadSolve
1318 (normsqr dir)
2328 let s = (x `dotprod` n - pos `dotprod` n) / (dir `dotprod` n)
2429 in if s > 0 then Just (s, pos &+ scalarMul s dir, p) else Nothing
2530
31 -- | Find the ray for a point on the image plane
2632 pointToRay' :: Viewer -> Point2D -> Ray
2733 pointToRay' (Viewer location u v f) (RelPoint2D hu hv) =
2834 Ray (normalize (p &- location)) location
3440 where f_hat = normalize onto
3541 s = (dist - dotprod pos f_hat) / dotprod dir f_hat
3642
43 -- | Deform a ray by (i, j) in the image plane, maintaining the focal point of
44 -- the ray.
3745 deformRay :: Scene -> Ray -> (Double, Double) -> Ray
3846 deformRay scene ray@(Ray dir pos) (i, j) =
3947 let farpt = farpoint ray (f $ viewer scene) (dofdepth scene)
4250 newdir = normalize (farpt &- newpos)
4351 in Ray newdir newpos
4452
53 -- | Find a family of rays that converge at the focal distance for a point in
54 -- the image plane.
4555 pointToRay :: Scene -> Viewer -> Point2D -> [Ray]
4656 pointToRay scene viewer point =
4757 if not $ dofenabled scene then [pointToRay' viewer point]
5161 samplesize = ap / fromIntegral (dofsamples scene)
5262 range = [-ap, (-ap) + samplesize .. ap]
5363
64 -- | Reflect the first vector about the second
5465 reflectAbout :: Vec3 -> Vec3 -> Vec3
5566 reflectAbout vec norm = vec &- scalarMul (2 * dotprod norm vec) norm
5667
68 -- | Refract the second vector around the first with the provided refraction
69 -- index.
5770 refractVector :: Double -> Vec3 -> Vec3 -> Vec3
5871 refractVector refind norm incident =
5972 refract refind (mkNormal norm) (neg incident)
6073
74 -- | Find the normal vector at a point on a primitive. Note that this function
75 -- does not require that the point be actually incident to the primitive.
6176 normal :: Primitive -> Vec3 -> Vec3
6277 normal (Sphere center _ _) vec = normalize (vec &- center)
6378 normal (Plane n _ _) vec = normalize n
0 module Main where
1
02 import Data.Vect.Double
13 import ArtRay.Primitives
24 import ArtRay.Render
35 import System (getArgs)
46 import System.IO
57
8 -- | Read a scene from a file
69 readScene :: FilePath -> IO Scene
710 readScene path =
811 do
1013 contents <- hGetContents infile
1114 return (read contents::Scene)
1215
16 -- | Artificially inflate my Haddock coverage.
17 main :: IO ()
1318 main = getArgs >>= \args ->
1419 if length args /= 2 then putStrLn "Must supply input and output file names"
1520 else do
44 import Debug.Trace
55 import Graphics.GD
66
7 -- | The root object of any rendered scene in ArtRay
78 data Scene =
89 Scene {
910 background :: ColorTriple,
11 -- ^ The background color of the scene -- displayed whenever a ray doesn't
12 -- intersect any geometry.
1013 options :: [Option],
14 -- ^ A list of rendering options
1115 geom :: [Primitive],
16 -- ^ The geometry of the scene
1217 lights :: [Light],
18 -- ^ The lights in the scene
1319 viewer :: Viewer
20 -- ^ Camera information
1421 } deriving (Show, Read)
1522
23 -- | Rendering-related options for scenes
1624 data Option
25 -- | The global ambient light. If provided, this will illuminate all
26 -- primitives with nonzero ambient material response at all points.
1727 = GlobalAmbient ColorTriple
1828
29 -- | Antialiasing options. When the Antialiased option is provided with
30 -- msaaSamples > 1, ArtRay will use MSAA subpixel sampling to antialias the
31 -- image. Note that multiplying msaaSamples by n increases runtime by O(n^2).
1932 | Antialiased {
2033 msaaSamples :: Double
2134 }
2235
36 -- | Depth of field options. If this option is not provided, the camera has
37 -- infinite depth of field. When this option is provided, the camera simulates
38 -- a real camera with focal length and aperture. Aperture is a number, usually
39 -- on the order of 1, which controls how tight the depth of field is -- higher
40 -- aperture values lead to narrower areas in focus. The focal length option
41 -- determines how far away from the camera's location is in focus. The samples
42 -- parameter is the square root of the number of rays shot out to determine
43 -- the color at each pixel. For simple scenes, this can be as low as 2. The
44 -- run time scales as O(samples^2).
2345 | DepthOfField {
2446 focalLength :: Double,
2547 aperture :: Double,
3254 center :: Vec3, radius :: Double, material :: Material }
3355 | Plane {
3456 pnorm :: Vec3, point :: Vec3, material :: Material }
35 | RectPrism {
36 corner :: Vec3, x :: Vec3, y :: Vec3, z :: Vec3, material :: Material }
3757 deriving (Show, Read, Eq)
3858
3959 data Ray = Ray { direction :: Vec3, position :: Vec3 } deriving (Show)
4767 loclight :: Vec3
4868 } deriving (Show, Read)
4969
70 -- | Combination models determine how materials on an object are combined.
5071 data CombinationModel
72 -- | Sum the two colors after multiplying the primary by weight and the
73 -- secondary by (1-weight). The weighting term should be in [0,1].
5174 = WeightSum { weight::Double }
75 -- | Sum the colors, truncating if any component goes over the maximum.
5276 | FlatSum
77 -- | Take the product of the two colors. This creates weird effects which you
78 -- almost certainly do not want, but it's interesting to look at.
5379 | Multiply
5480 deriving (Show, Eq, Read)
5581
5682 data Material
83 -- | A material where every point on the material has the same color.
5784 = ColorMaterial {
5885 basecolor :: ColorTriple
5986 }
6087
88 -- | A material which reflects rays. Optionally, the material can have a base
89 -- material, whose color is blended with the reflections using the
90 -- reflectivity parameter.
91 -- TODO: Use a combination model here.
6192 | ReflectiveMaterial {
6293 base :: Material,
6394 reflectivity :: Double
6495 }
6596
97 -- | A Phong-reflectance based material.
6698 | PhongMaterial {
6799 specular :: ColorTriple,
68100 diffuse :: ColorTriple,
70102 phongexp :: Int
71103 }
72104
105 -- | A transparent material with a refractive index. This can be blended with
106 -- a base material using the provided combination model.
73107 | TransparentMaterial {
74108 base :: Material,
75109 cmodel :: CombinationModel,
76110 refindex :: Double
77111 }
78112
113 -- | A material that doesn't exist. This can be convenient for a placeholder
114 -- when you don't want to provide an actual material (like as the base
115 -- material of a TransparentMaterial that is fully transparent).
79116 | NullMaterial
80117 deriving (Show, Read, Eq)
81118
92129
93130 data Point2D =
94131 -- | Describes a point in the image using pixel coordinates, allowing for
95 -- | fractional pixels for subpixel sampling.
132 -- fractional pixels for subpixel sampling.
96133 Point2D Double Double
97134 -- | Describes a point in the image using offsets from the center, where each
98 -- field goes from zero to one.
135 -- field goes from zero to one.
99136 | RelPoint2D Double Double
100137 deriving (Show)
101138
102
139 -- | Returns the transmittance (1 minus the opacity) of any material.
103140 transmittance :: Material -> Double
104141 transmittance (TransparentMaterial _ (WeightSum op) _) = op
105142 transmittance _ = 0
106143
144 -- | Returns the global ambient of the scene
107145 glambient :: Scene -> ColorTriple
108146 glambient scene =
109147 case mapMaybe
112150 amb:_ -> amb
113151 otherwise -> (0, 0, 0)
114152
153 -- | Returns the number of subpixels used for MSAA, or Nothing if no
154 -- antialiasing is to be performed.
115155 subpixels :: Scene -> Maybe Double
116156 subpixels scene =
117157 case mapMaybe
120160 subp:_ -> Just subp
121161 otherwise -> Nothing
122162
163 -- | Returns the DepthOfField option, or nothing if no depth of field is to be
164 -- used.
123165 dofinfo :: Scene -> Maybe Option
124166 dofinfo scene =
125167 case mapMaybe
130172 dofs:_ -> Just dofs
131173 otherwise -> Nothing
132174
175 -- | Returns True if depth of field is to be simulated, and false otherwise.
133176 dofenabled :: Scene -> Bool
134177 dofenabled = isJust . dofinfo
135178
179 -- | Returns the number of samples to use for calculating depth of field. This
180 -- will throw an exception if depth of field is not enabled for the provided
181 -- scene.
136182 dofsamples :: Scene -> Int
137183 dofsamples = dofSamples . fromJust . dofinfo
138184
185 -- | Returns the focal length of the camera. This will throw an exception if
186 -- depth of field is not enabled for the provided scene.
139187 dofdepth :: Scene -> Double
140188 dofdepth = focalLength . fromJust . dofinfo
141189
190 -- | Returns the aperture size of the camera. This will throw an exception if
191 -- depth of field is not enabled for the provided scene.
142192 dofaperture :: Scene -> Double
143193 dofaperture = aperture . fromJust . dofinfo
144194
195 -- | Convenience method for turning a pair of integers into a Point2D.
145196 p2d :: Int -> Int -> Point2D
146197 p2d x y = Point2D (fromIntegral x) (fromIntegral y)
147198
199 -- | Convenience method for creating colors
148200 color :: Double -> Double -> Double -> ColorTriple
149201 color r g b = (r, g, b)
150202
203 -- | Convenience method for creating ColorMaterials.
151204 colorm :: Double -> Double -> Double -> Material
152205 colorm r g b = ColorMaterial (r, g, b)
153206
207 -- | Converts pixel locations into relative locations in [-1,1], where -1
208 -- corresponds to the left or bottom edge, and 1 corresponds to the right or top
209 -- edge.
154210 toRelPoint :: Size -> Point2D -> Point2D
155211 toRelPoint size (Point2D x y) =
156212 RelPoint2D ((x - xc) / xc) ((y - yc) / yc)
157213 where xc = fromIntegral (fst size) / 2
158214 yc = fromIntegral (snd size) / 2
159215
160 -- |Creates a viewer
216 -- | Creates a viewer
161217 view :: Vec3 -- ^ The location of the viewer
162218 -> Double -- ^ The field of view of the viewer, in radians
163219 -> Vec3 -- ^ The vector from viewer to center of image plane
170226 instance Eq Vec3 where
171227 (Vec3 x1 y1 z1) == (Vec3 x2 y2 z2) = (x1 == x2) && (y1 == y2) && (z1 == z2)
172228
229 -- | Convert an ArtRay color to a GD color.
173230 colorFrom :: ColorTriple -> Color
174231 colorFrom (r, g, b) =
175232 rgb (round (r * 255)) (round (g * 255)) (round (b * 255))
176233
234 -- | Take the product of two colors
177235 combine :: ColorTriple -> ColorTriple -> ColorTriple
178236 combine (r1, g1, b1) (r2, g2, b2) = (r1 * r2, g1 * g2, b1 * b2)
179237
238 -- | Multiply a color by a scalar
180239 scale :: ColorTriple -> Double -> ColorTriple
181240 scale (r, g, b) s = (s * r, s * g, s * b)
182241
242 -- | Weight two colors with the provided weighting factor. The first color is
243 -- multiplied by the weight, the second by one minus the weight.
183244 weightedCombine :: Double -> ColorTriple -> ColorTriple -> ColorTriple
184245 weightedCombine w (r1, g1, b1) (r2, g2, b2) =
185246 (mul w r1 r2, mul w g1 g2, mul w b1 b2)
186247 where mul w a b = w * a + (1 - w) * b
187248
249 -- | Ensure that each component of the color is in [0, 1].
188250 normalizeColor (r, g, b) = (n r, n g, n b)
189251 where n x = max 0 (min 1 x)
190252
253 -- | Take the sum of a list of colors
191254 sumLight :: [ColorTriple] -> ColorTriple
192255 sumLight = foldl1 sumColor
193256
257 -- | Take the sum of a pair of colors, truncating if it results in a value
258 -- outside [0, 1].
194259 sumColor :: ColorTriple -> ColorTriple -> ColorTriple
195260 sumColor (r1, g1, b1) (r2, g2, b2) = normalizeColor (r1 + r2, g1 + g2, b1 + b2)
261
262 -- | Take the sum of a pair of colors without normalizing.
263 sumColor' :: ColorTriple -> ColorTriple -> ColorTriple
196264 sumColor' (r1, g1, b1) (r2, g2, b2) = (r1 + r2, g1 + g2, b1 + b2)
197265
266 -- | Find the mean value of a list of colors.
198267 meanColor :: [ColorTriple] -> ColorTriple
199268 meanColor colors = div $ foldl1 sumColor' colors
200269 where l = fromIntegral $ length colors
2222 where inc = (-0.5) + 1 / subpixels
2323 otherwise -> rayTraceImage' scene size (p2d x y)
2424
25 -- | Turn a function into a pretty picture
2526 applyToImage :: (Size -> Point -> ColorTriple) -> Image -> IO()
2627 applyToImage imFunc im =
2728 do
2930 sequence_ [setPixel (i,j) (colorFrom $ imFunc size (i,j)) im
3031 | i <- [0..(fst size)], j <- [0..(snd size)]]
3132
32 render :: Scene -> Int -> String -> IO()
33 -- | Render a square image and save it to the given file.
34 render :: Scene -> Int -> FilePath -> IO()
3335 render scene size outfile =
3436 do
3537 im <- newImage (size, size)
00 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ArtRay.Geometry</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
11 window.onload = function () {pageLoad();setSynopsis("mini_ArtRay-Geometry.html");};
22 //]]>
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="module-header"><p class="caption">ArtRay.Geometry</p></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:quadSolve" class="def">quadSolve</a> :: Double -&gt; Double -&gt; Double -&gt; (Double, Double)</p></div><div class="top"><p class="src"><a name="v:firstIntersection" class="def">firstIntersection</a> :: <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; Maybe (Double, Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>)</p></div><div class="top"><p class="src"><a name="v:pointToRay" class="def">pointToRay</a> :: <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a> -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a></p></div><div class="top"><p class="src"><a name="v:reflectAbout" class="def">reflectAbout</a> :: Vec3 -&gt; Vec3 -&gt; Vec3</p></div><div class="top"><p class="src"><a name="v:refractVector" class="def">refractVector</a> :: Double -&gt; Vec3 -&gt; Vec3 -&gt; Vec3</p></div><div class="top"><p class="src"><a name="v:normal" class="def">normal</a> :: <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; Vec3 -&gt; Vec3</p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="module-header"><p class="caption">ArtRay.Geometry</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:quadSolve">quadSolve</a> :: Double -&gt; Double -&gt; Double -&gt; (Double, Double)</li><li class="src short"><a href="#v:firstIntersection">firstIntersection</a> :: <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; Maybe (Double, Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>)</li><li class="src short"><a href="#v:pointToRay-39-">pointToRay'</a> :: <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a> -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a></li><li class="src short"><a href="#v:farpoint">farpoint</a> :: <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; Vec3 -&gt; Double -&gt; Vec3</li><li class="src short"><a href="#v:deformRay">deformRay</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; (Double, Double) -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a></li><li class="src short"><a href="#v:pointToRay">pointToRay</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a> -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; [<a href="ArtRay-Primitives.html#t:Ray">Ray</a>]</li><li class="src short"><a href="#v:reflectAbout">reflectAbout</a> :: Vec3 -&gt; Vec3 -&gt; Vec3</li><li class="src short"><a href="#v:refractVector">refractVector</a> :: Double -&gt; Vec3 -&gt; Vec3 -&gt; Vec3</li><li class="src short"><a href="#v:normal">normal</a> :: <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; Vec3 -&gt; Vec3</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:quadSolve" class="def">quadSolve</a> :: Double -&gt; Double -&gt; Double -&gt; (Double, Double)</p><div class="doc"><p>Solve a quadratic. Returns NaN for non-real roots, and two equal values for
4 double roots.
5 </p></div></div><div class="top"><p class="src"><a name="v:firstIntersection" class="def">firstIntersection</a> :: <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; Maybe (Double, Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>)</p><div class="doc"><p>Find the first intersection between a primitive and a ray. Returns Nothing
6 if the ray never intersects the primitive.
7 </p></div></div><div class="top"><p class="src"><a name="v:pointToRay-39-" class="def">pointToRay'</a> :: <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a> -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a></p><div class="doc"><p>Find the ray for a point on the image plane
8 </p></div></div><div class="top"><p class="src"><a name="v:farpoint" class="def">farpoint</a> :: <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; Vec3 -&gt; Double -&gt; Vec3</p><div class="doc"><p>Finds the point on a ray whose projection on a vector has a specific length.
9 </p></div></div><div class="top"><p class="src"><a name="v:deformRay" class="def">deformRay</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; (Double, Double) -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a></p><div class="doc"><p>Deform a ray by (i, j) in the image plane, maintaining the focal point of
10 the ray.
11 </p></div></div><div class="top"><p class="src"><a name="v:pointToRay" class="def">pointToRay</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a> -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; [<a href="ArtRay-Primitives.html#t:Ray">Ray</a>]</p><div class="doc"><p>Find a family of rays that converge at the focal distance for a point in
12 the image plane.
13 </p></div></div><div class="top"><p class="src"><a name="v:reflectAbout" class="def">reflectAbout</a> :: Vec3 -&gt; Vec3 -&gt; Vec3</p><div class="doc"><p>Reflect the first vector about the second
14 </p></div></div><div class="top"><p class="src"><a name="v:refractVector" class="def">refractVector</a> :: Double -&gt; Vec3 -&gt; Vec3 -&gt; Vec3</p><div class="doc"><p>Refract the second vector around the first with the provided refraction
15 index.
16 </p></div></div><div class="top"><p class="src"><a name="v:normal" class="def">normal</a> :: <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; Vec3 -&gt; Vec3</p><div class="doc"><p>Find the normal vector at a point on a primitive. Note that this function
17 does not require that the point be actually incident to the primitive.
18 </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
00 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ArtRay.Primitives</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
11 window.onload = function () {pageLoad();setSynopsis("mini_ArtRay-Primitives.html");};
22 //]]>
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="module-header"><p class="caption">ArtRay.Primitives</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Scene">Scene</a> = <a href="#v:Scene">Scene</a> {<ul class="subs"><li><a href="#v:background">background</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:options">options</a> :: [<a href="ArtRay-Primitives.html#t:Option">Option</a>]</li><li><a href="#v:geom">geom</a> :: [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>]</li><li><a href="#v:lights">lights</a> :: [<a href="ArtRay-Primitives.html#t:Light">Light</a>]</li><li><a href="#v:viewer">viewer</a> :: <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Option">Option</a> <ul class="subs"><li>= <a href="#v:Antialiased">Antialiased</a> Double </li><li>| <a href="#v:GlobalAmbient">GlobalAmbient</a> <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Primitive">Primitive</a> <ul class="subs"><li>= <a href="#v:Sphere">Sphere</a> { <ul class="subs"><li><a href="#v:center">center</a> :: Vec3</li><li><a href="#v:radius">radius</a> :: Double</li><li><a href="#v:material">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></li></ul> }</li><li>| <a href="#v:Plane">Plane</a> { <ul class="subs"><li><a href="#v:pnorm">pnorm</a> :: Vec3</li><li><a href="#v:point">point</a> :: Vec3</li><li><a href="#v:material">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></li></ul> }</li><li>| <a href="#v:RectPrism">RectPrism</a> { <ul class="subs"><li><a href="#v:corner">corner</a> :: Vec3</li><li><a href="#v:x">x</a> :: Vec3</li><li><a href="#v:y">y</a> :: Vec3</li><li><a href="#v:z">z</a> :: Vec3</li><li><a href="#v:material">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></li></ul> }</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Ray">Ray</a> = <a href="#v:Ray">Ray</a> {<ul class="subs"><li><a href="#v:direction">direction</a> :: Vec3</li><li><a href="#v:position">position</a> :: Vec3</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:ColorTriple">ColorTriple</a> = (Double, Double, Double)</li><li class="src short"><span class="keyword">data</span> <a href="#t:Light">Light</a> = <a href="#v:PhongLight">PhongLight</a> {<ul class="subs"><li><a href="#v:speclight">speclight</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:difflight">difflight</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:loclight">loclight</a> :: Vec3</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:CombinationModel">CombinationModel</a> <ul class="subs"><li>= <a href="#v:WeightSum">WeightSum</a> { <ul class="subs"><li><a href="#v:weight">weight</a> :: Double</li></ul> }</li><li>| <a href="#v:FlatSum">FlatSum</a> </li><li>| <a href="#v:Multiply">Multiply</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Material">Material</a> <ul class="subs"><li>= <a href="#v:ColorMaterial">ColorMaterial</a> { <ul class="subs"><li><a href="#v:basecolor">basecolor</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li></ul> }</li><li>| <a href="#v:ReflectiveMaterial">ReflectiveMaterial</a> { <ul class="subs"><li><a href="#v:base">base</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></li><li><a href="#v:reflectivity">reflectivity</a> :: Double</li></ul> }</li><li>| <a href="#v:PhongMaterial">PhongMaterial</a> { <ul class="subs"><li><a href="#v:specular">specular</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:diffuse">diffuse</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:ambient">ambient</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:phongexp">phongexp</a> :: Int</li></ul> }</li><li>| <a href="#v:TransparentMaterial">TransparentMaterial</a> { <ul class="subs"><li><a href="#v:base">base</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></li><li><a href="#v:cmodel">cmodel</a> :: <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></li><li><a href="#v:refindex">refindex</a> :: Double</li></ul> }</li><li>| <a href="#v:NullMaterial">NullMaterial</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Viewer">Viewer</a> = <a href="#v:Viewer">Viewer</a> {<ul class="subs"><li><a href="#v:location">location</a> :: Vec3</li><li><a href="#v:u">u</a> :: Vec3</li><li><a href="#v:v">v</a> :: Vec3</li><li><a href="#v:f">f</a> :: Vec3</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Point2D">Point2D</a> <ul class="subs"><li>= <a href="#v:Point2D">Point2D</a> Double Double </li><li>| <a href="#v:RelPoint2D">RelPoint2D</a> Double Double </li></ul></li><li class="src short"><a href="#v:transmittance">transmittance</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a> -&gt; Double</li><li class="src short"><a href="#v:glambient">glambient</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:subpixels">subpixels</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Maybe Double</li><li class="src short"><a href="#v:p2d">p2d</a> :: Int -&gt; Int -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></li><li class="src short"><a href="#v:color">color</a> :: Double -&gt; Double -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:colorm">colorm</a> :: Double -&gt; Double -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:Material">Material</a></li><li class="src short"><a href="#v:toRelPoint">toRelPoint</a> :: Size -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></li><li class="src short"><a href="#v:view">view</a> :: Vec3 -&gt; Double -&gt; Vec3 -&gt; Vec3 -&gt; <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a></li><li class="src short"><a href="#v:colorFrom">colorFrom</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; Color</li><li class="src short"><a href="#v:combine">combine</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:scale">scale</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:weightedCombine">weightedCombine</a> :: Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:sumLight">sumLight</a> :: [<a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>] -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:sumColor">sumColor</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:meanColor">meanColor</a> :: [<a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>] -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Scene" class="def">Scene</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Scene" class="def">Scene</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:background" class="def">background</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:options" class="def">options</a> :: [<a href="ArtRay-Primitives.html#t:Option">Option</a>]</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:geom" class="def">geom</a> :: [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>]</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:lights" class="def">lights</a> :: [<a href="ArtRay-Primitives.html#t:Light">Light</a>]</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:viewer" class="def">viewer</a> :: <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Scene" class="caption collapser" onclick="toggleSection('i:Scene')">Instances</p><div id="section.i:Scene" class="show"><table><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Scene">Scene</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Scene">Scene</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Option" class="def">Option</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Antialiased" class="def">Antialiased</a> Double</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:GlobalAmbient" class="def">GlobalAmbient</a> <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Option" class="caption collapser" onclick="toggleSection('i:Option')">Instances</p><div id="section.i:Option" class="show"><table><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Option">Option</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Option">Option</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Primitive" class="def">Primitive</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Sphere" class="def">Sphere</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:center" class="def">center</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:radius" class="def">radius</a> :: Double</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:material" class="def">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:Plane" class="def">Plane</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:pnorm" class="def">pnorm</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:point" class="def">point</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:material" class="def">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:RectPrism" class="def">RectPrism</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:corner" class="def">corner</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:x" class="def">x</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:y" class="def">y</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:z" class="def">z</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:material" class="def">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Primitive" class="caption collapser" onclick="toggleSection('i:Primitive')">Instances</p><div id="section.i:Primitive" class="show"><table><tr><td class="src">Eq <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Ray" class="def">Ray</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Ray" class="def">Ray</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:direction" class="def">direction</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:position" class="def">position</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Ray" class="caption collapser" onclick="toggleSection('i:Ray')">Instances</p><div id="section.i:Ray" class="show"><table><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Ray">Ray</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ColorTriple" class="def">ColorTriple</a> = (Double, Double, Double)</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Light" class="def">Light</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PhongLight" class="def">PhongLight</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:speclight" class="def">speclight</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:difflight" class="def">difflight</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:loclight" class="def">loclight</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Light" class="caption collapser" onclick="toggleSection('i:Light')">Instances</p><div id="section.i:Light" class="show"><table><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Light">Light</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Light">Light</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:CombinationModel" class="def">CombinationModel</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:WeightSum" class="def">WeightSum</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:weight" class="def">weight</a> :: Double</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:FlatSum" class="def">FlatSum</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Multiply" class="def">Multiply</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:CombinationModel" class="caption collapser" onclick="toggleSection('i:CombinationModel')">Instances</p><div id="section.i:CombinationModel" class="show"><table><tr><td class="src">Eq <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Material" class="def">Material</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ColorMaterial" class="def">ColorMaterial</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:basecolor" class="def">basecolor</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:ReflectiveMaterial" class="def">ReflectiveMaterial</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:base" class="def">base</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:reflectivity" class="def">reflectivity</a> :: Double</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:PhongMaterial" class="def">PhongMaterial</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:specular" class="def">specular</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:diffuse" class="def">diffuse</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:ambient" class="def">ambient</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:phongexp" class="def">phongexp</a> :: Int</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:TransparentMaterial" class="def">TransparentMaterial</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:base" class="def">base</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:cmodel" class="def">cmodel</a> :: <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:refindex" class="def">refindex</a> :: Double</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:NullMaterial" class="def">NullMaterial</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Material" class="caption collapser" onclick="toggleSection('i:Material')">Instances</p><div id="section.i:Material" class="show"><table><tr><td class="src">Eq <a href="ArtRay-Primitives.html#t:Material">Material</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Material">Material</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Material">Material</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Viewer" class="def">Viewer</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Viewer" class="def">Viewer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:location" class="def">location</a> :: Vec3</dt><dd class="doc"><p>The location of the viewer
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="module-header"><p class="caption">ArtRay.Primitives</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">data</span> <a href="#t:Scene">Scene</a> = <a href="#v:Scene">Scene</a> {<ul class="subs"><li><a href="#v:background">background</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:options">options</a> :: [<a href="ArtRay-Primitives.html#t:Option">Option</a>]</li><li><a href="#v:geom">geom</a> :: [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>]</li><li><a href="#v:lights">lights</a> :: [<a href="ArtRay-Primitives.html#t:Light">Light</a>]</li><li><a href="#v:viewer">viewer</a> :: <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a></li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Option">Option</a> <ul class="subs"><li>= <a href="#v:GlobalAmbient">GlobalAmbient</a> <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> </li><li>| <a href="#v:Antialiased">Antialiased</a> { <ul class="subs"><li><a href="#v:msaaSamples">msaaSamples</a> :: Double</li></ul> }</li><li>| <a href="#v:DepthOfField">DepthOfField</a> { <ul class="subs"><li><a href="#v:focalLength">focalLength</a> :: Double</li><li><a href="#v:aperture">aperture</a> :: Double</li><li><a href="#v:dofSamples">dofSamples</a> :: Int</li></ul> }</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Primitive">Primitive</a> <ul class="subs"><li>= <a href="#v:Sphere">Sphere</a> { <ul class="subs"><li><a href="#v:center">center</a> :: Vec3</li><li><a href="#v:radius">radius</a> :: Double</li><li><a href="#v:material">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></li></ul> }</li><li>| <a href="#v:Plane">Plane</a> { <ul class="subs"><li><a href="#v:pnorm">pnorm</a> :: Vec3</li><li><a href="#v:point">point</a> :: Vec3</li><li><a href="#v:material">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></li></ul> }</li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Ray">Ray</a> = <a href="#v:Ray">Ray</a> {<ul class="subs"><li><a href="#v:direction">direction</a> :: Vec3</li><li><a href="#v:position">position</a> :: Vec3</li></ul>}</li><li class="src short"><span class="keyword">type</span> <a href="#t:ColorTriple">ColorTriple</a> = (Double, Double, Double)</li><li class="src short"><span class="keyword">data</span> <a href="#t:Light">Light</a> = <a href="#v:PhongLight">PhongLight</a> {<ul class="subs"><li><a href="#v:speclight">speclight</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:difflight">difflight</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:loclight">loclight</a> :: Vec3</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:CombinationModel">CombinationModel</a> <ul class="subs"><li>= <a href="#v:WeightSum">WeightSum</a> { <ul class="subs"><li><a href="#v:weight">weight</a> :: Double</li></ul> }</li><li>| <a href="#v:FlatSum">FlatSum</a> </li><li>| <a href="#v:Multiply">Multiply</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Material">Material</a> <ul class="subs"><li>= <a href="#v:ColorMaterial">ColorMaterial</a> { <ul class="subs"><li><a href="#v:basecolor">basecolor</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li></ul> }</li><li>| <a href="#v:ReflectiveMaterial">ReflectiveMaterial</a> { <ul class="subs"><li><a href="#v:base">base</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></li><li><a href="#v:reflectivity">reflectivity</a> :: Double</li></ul> }</li><li>| <a href="#v:PhongMaterial">PhongMaterial</a> { <ul class="subs"><li><a href="#v:specular">specular</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:diffuse">diffuse</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:ambient">ambient</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li><a href="#v:phongexp">phongexp</a> :: Int</li></ul> }</li><li>| <a href="#v:TransparentMaterial">TransparentMaterial</a> { <ul class="subs"><li><a href="#v:base">base</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></li><li><a href="#v:cmodel">cmodel</a> :: <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></li><li><a href="#v:refindex">refindex</a> :: Double</li></ul> }</li><li>| <a href="#v:NullMaterial">NullMaterial</a> </li></ul></li><li class="src short"><span class="keyword">data</span> <a href="#t:Viewer">Viewer</a> = <a href="#v:Viewer">Viewer</a> {<ul class="subs"><li><a href="#v:location">location</a> :: Vec3</li><li><a href="#v:u">u</a> :: Vec3</li><li><a href="#v:v">v</a> :: Vec3</li><li><a href="#v:f">f</a> :: Vec3</li></ul>}</li><li class="src short"><span class="keyword">data</span> <a href="#t:Point2D">Point2D</a> <ul class="subs"><li>= <a href="#v:Point2D">Point2D</a> Double Double </li><li>| <a href="#v:RelPoint2D">RelPoint2D</a> Double Double </li></ul></li><li class="src short"><a href="#v:transmittance">transmittance</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a> -&gt; Double</li><li class="src short"><a href="#v:glambient">glambient</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:subpixels">subpixels</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Maybe Double</li><li class="src short"><a href="#v:dofinfo">dofinfo</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Maybe <a href="ArtRay-Primitives.html#t:Option">Option</a></li><li class="src short"><a href="#v:dofenabled">dofenabled</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Bool</li><li class="src short"><a href="#v:dofsamples">dofsamples</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Int</li><li class="src short"><a href="#v:dofdepth">dofdepth</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Double</li><li class="src short"><a href="#v:dofaperture">dofaperture</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Double</li><li class="src short"><a href="#v:p2d">p2d</a> :: Int -&gt; Int -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></li><li class="src short"><a href="#v:color">color</a> :: Double -&gt; Double -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:colorm">colorm</a> :: Double -&gt; Double -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:Material">Material</a></li><li class="src short"><a href="#v:toRelPoint">toRelPoint</a> :: Size -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></li><li class="src short"><a href="#v:view">view</a> :: Vec3 -&gt; Double -&gt; Vec3 -&gt; Vec3 -&gt; <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a></li><li class="src short"><a href="#v:colorFrom">colorFrom</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; Color</li><li class="src short"><a href="#v:combine">combine</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:scale">scale</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:weightedCombine">weightedCombine</a> :: Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:sumLight">sumLight</a> :: [<a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>] -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:sumColor">sumColor</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:sumColor-39-">sumColor'</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:meanColor">meanColor</a> :: [<a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>] -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Scene" class="def">Scene</a> </p><div class="doc"><p>The root object of any rendered scene in ArtRay
4 </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Scene" class="def">Scene</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:background" class="def">background</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc"><p>The background color of the scene -- displayed whenever a ray doesn't
5 intersect any geometry.
6 </p></dd><dt class="src"><a name="v:options" class="def">options</a> :: [<a href="ArtRay-Primitives.html#t:Option">Option</a>]</dt><dd class="doc"><p>A list of rendering options
7 </p></dd><dt class="src"><a name="v:geom" class="def">geom</a> :: [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>]</dt><dd class="doc"><p>The geometry of the scene
8 </p></dd><dt class="src"><a name="v:lights" class="def">lights</a> :: [<a href="ArtRay-Primitives.html#t:Light">Light</a>]</dt><dd class="doc"><p>The lights in the scene
9 </p></dd><dt class="src"><a name="v:viewer" class="def">viewer</a> :: <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a></dt><dd class="doc"><p>Camera information
10 </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Scene" class="caption collapser" onclick="toggleSection('i:Scene')">Instances</p><div id="section.i:Scene" class="show"><table><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Scene">Scene</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Scene">Scene</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Option" class="def">Option</a> </p><div class="doc"><p>Rendering-related options for scenes
11 </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:GlobalAmbient" class="def">GlobalAmbient</a> <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></td><td class="doc"><p>The global ambient light. If provided, this will illuminate all
12 primitives with nonzero ambient material response at all points.
13 </p></td></tr><tr><td class="src"><a name="v:Antialiased" class="def">Antialiased</a></td><td class="doc"><p>Antialiasing options. When the Antialiased option is provided with
14 msaaSamples &gt; 1, ArtRay will use MSAA subpixel sampling to antialias the
15 image. Note that multiplying msaaSamples by n increases runtime by O(n^2).
16 </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:msaaSamples" class="def">msaaSamples</a> :: Double</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:DepthOfField" class="def">DepthOfField</a></td><td class="doc"><p>Depth of field options. If this option is not provided, the camera has
17 infinite depth of field. When this option is provided, the camera simulates
18 a real camera with focal length and aperture. Aperture is a number, usually
19 on the order of 1, which controls how tight the depth of field is -- higher
20 aperture values lead to narrower areas in focus. The focal length option
21 determines how far away from the camera's location is in focus. The samples
22 parameter is the square root of the number of rays shot out to determine
23 the color at each pixel. For simple scenes, this can be as low as 2. The
24 run time scales as O(samples^2).
25 </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:focalLength" class="def">focalLength</a> :: Double</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:aperture" class="def">aperture</a> :: Double</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:dofSamples" class="def">dofSamples</a> :: Int</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Option" class="caption collapser" onclick="toggleSection('i:Option')">Instances</p><div id="section.i:Option" class="show"><table><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Option">Option</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Option">Option</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Primitive" class="def">Primitive</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Sphere" class="def">Sphere</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:center" class="def">center</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:radius" class="def">radius</a> :: Double</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:material" class="def">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:Plane" class="def">Plane</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:pnorm" class="def">pnorm</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:point" class="def">point</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:material" class="def">material</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Primitive" class="caption collapser" onclick="toggleSection('i:Primitive')">Instances</p><div id="section.i:Primitive" class="show"><table><tr><td class="src">Eq <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Ray" class="def">Ray</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Ray" class="def">Ray</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:direction" class="def">direction</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:position" class="def">position</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Ray" class="caption collapser" onclick="toggleSection('i:Ray')">Instances</p><div id="section.i:Ray" class="show"><table><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Ray">Ray</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:ColorTriple" class="def">ColorTriple</a> = (Double, Double, Double)</p></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Light" class="def">Light</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:PhongLight" class="def">PhongLight</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:speclight" class="def">speclight</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:difflight" class="def">difflight</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:loclight" class="def">loclight</a> :: Vec3</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Light" class="caption collapser" onclick="toggleSection('i:Light')">Instances</p><div id="section.i:Light" class="show"><table><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Light">Light</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Light">Light</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:CombinationModel" class="def">CombinationModel</a> </p><div class="doc"><p>Combination models determine how materials on an object are combined.
26 </p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:WeightSum" class="def">WeightSum</a></td><td class="doc"><p>Sum the two colors after multiplying the primary by weight and the
27 secondary by (1-weight). The weighting term should be in [0,1].
28 </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:weight" class="def">weight</a> :: Double</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:FlatSum" class="def">FlatSum</a></td><td class="doc"><p>Sum the colors, truncating if any component goes over the maximum.
29 </p></td></tr><tr><td class="src"><a name="v:Multiply" class="def">Multiply</a></td><td class="doc"><p>Take the product of the two colors. This creates weird effects which you
30 almost certainly do not want, but it's interesting to look at.
31 </p></td></tr></table></div><div class="subs instances"><p id="control.i:CombinationModel" class="caption collapser" onclick="toggleSection('i:CombinationModel')">Instances</p><div id="section.i:CombinationModel" class="show"><table><tr><td class="src">Eq <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Material" class="def">Material</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ColorMaterial" class="def">ColorMaterial</a></td><td class="doc"><p>A material where every point on the material has the same color.
32 </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:basecolor" class="def">basecolor</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:ReflectiveMaterial" class="def">ReflectiveMaterial</a></td><td class="doc"><p>A material which reflects rays. Optionally, the material can have a base
33 material, whose color is blended with the reflections using the
34 reflectivity parameter.
35 TODO: Use a combination model here.
36 </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:base" class="def">base</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:reflectivity" class="def">reflectivity</a> :: Double</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:PhongMaterial" class="def">PhongMaterial</a></td><td class="doc"><p>A Phong-reflectance based material.
37 </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:specular" class="def">specular</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:diffuse" class="def">diffuse</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:ambient" class="def">ambient</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:phongexp" class="def">phongexp</a> :: Int</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:TransparentMaterial" class="def">TransparentMaterial</a></td><td class="doc"><p>A transparent material with a refractive index. This can be blended with
38 a base material using the provided combination model.
39 </p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:base" class="def">base</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:cmodel" class="def">cmodel</a> :: <a href="ArtRay-Primitives.html#t:CombinationModel">CombinationModel</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:refindex" class="def">refindex</a> :: Double</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr><tr><td class="src"><a name="v:NullMaterial" class="def">NullMaterial</a></td><td class="doc"><p>A material that doesn't exist. This can be convenient for a placeholder
40 when you don't want to provide an actual material (like as the base
41 material of a TransparentMaterial that is fully transparent).
42 </p></td></tr></table></div><div class="subs instances"><p id="control.i:Material" class="caption collapser" onclick="toggleSection('i:Material')">Instances</p><div id="section.i:Material" class="show"><table><tr><td class="src">Eq <a href="ArtRay-Primitives.html#t:Material">Material</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Material">Material</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Material">Material</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Viewer" class="def">Viewer</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Viewer" class="def">Viewer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:location" class="def">location</a> :: Vec3</dt><dd class="doc"><p>The location of the viewer
443 </p></dd><dt class="src"><a name="v:u" class="def">u</a> :: Vec3</dt><dd class="doc"><p>A vector pointing horizontally along the image plane
544 </p></dd><dt class="src"><a name="v:v" class="def">v</a> :: Vec3</dt><dd class="doc"><p>A vector pointing vertically along the image plane
645 </p></dd><dt class="src"><a name="v:f" class="def">f</a> :: Vec3</dt><dd class="doc"><p>A vector pointing from the viewer to the center of the image plane
746 </p></dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:Viewer" class="caption collapser" onclick="toggleSection('i:Viewer')">Instances</p><div id="section.i:Viewer" class="show"><table><tr><td class="src">Read <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span> <a name="t:Point2D" class="def">Point2D</a> </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Point2D" class="def">Point2D</a> Double Double</td><td class="doc"><p>Describes a point in the image using pixel coordinates, allowing for
8 | fractional pixels for subpixel sampling.
47 fractional pixels for subpixel sampling.
948 </p></td></tr><tr><td class="src"><a name="v:RelPoint2D" class="def">RelPoint2D</a> Double Double</td><td class="doc"><p>Describes a point in the image using offsets from the center, where each
10 field goes from zero to one.
11 </p></td></tr></table></div><div class="subs instances"><p id="control.i:Point2D" class="caption collapser" onclick="toggleSection('i:Point2D')">Instances</p><div id="section.i:Point2D" class="show"><table><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:transmittance" class="def">transmittance</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a> -&gt; Double</p></div><div class="top"><p class="src"><a name="v:glambient" class="def">glambient</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:subpixels" class="def">subpixels</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Maybe Double</p></div><div class="top"><p class="src"><a name="v:p2d" class="def">p2d</a> :: Int -&gt; Int -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></p></div><div class="top"><p class="src"><a name="v:color" class="def">color</a> :: Double -&gt; Double -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:colorm" class="def">colorm</a> :: Double -&gt; Double -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:Material">Material</a></p></div><div class="top"><p class="src"><a name="v:toRelPoint" class="def">toRelPoint</a> :: Size -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></p></div><div class="top"><p class="src"><a name="v:view" class="def">view</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: Vec3</td><td class="doc"><p>The location of the viewer
49 field goes from zero to one.
50 </p></td></tr></table></div><div class="subs instances"><p id="control.i:Point2D" class="caption collapser" onclick="toggleSection('i:Point2D')">Instances</p><div id="section.i:Point2D" class="show"><table><tr><td class="src">Show <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:transmittance" class="def">transmittance</a> :: <a href="ArtRay-Primitives.html#t:Material">Material</a> -&gt; Double</p><div class="doc"><p>Returns the transmittance (1 minus the opacity) of any material.
51 </p></div></div><div class="top"><p class="src"><a name="v:glambient" class="def">glambient</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Returns the global ambient of the scene
52 </p></div></div><div class="top"><p class="src"><a name="v:subpixels" class="def">subpixels</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Maybe Double</p><div class="doc"><p>Returns the number of subpixels used for MSAA, or Nothing if no
53 antialiasing is to be performed.
54 </p></div></div><div class="top"><p class="src"><a name="v:dofinfo" class="def">dofinfo</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Maybe <a href="ArtRay-Primitives.html#t:Option">Option</a></p><div class="doc"><p>Returns the DepthOfField option, or nothing if no depth of field is to be
55 used.
56 </p></div></div><div class="top"><p class="src"><a name="v:dofenabled" class="def">dofenabled</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Bool</p><div class="doc"><p>Returns True if depth of field is to be simulated, and false otherwise.
57 </p></div></div><div class="top"><p class="src"><a name="v:dofsamples" class="def">dofsamples</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Int</p><div class="doc"><p>Returns the number of samples to use for calculating depth of field. This
58 will throw an exception if depth of field is not enabled for the provided
59 scene.
60 </p></div></div><div class="top"><p class="src"><a name="v:dofdepth" class="def">dofdepth</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Double</p><div class="doc"><p>Returns the focal length of the camera. This will throw an exception if
61 depth of field is not enabled for the provided scene.
62 </p></div></div><div class="top"><p class="src"><a name="v:dofaperture" class="def">dofaperture</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Double</p><div class="doc"><p>Returns the aperture size of the camera. This will throw an exception if
63 depth of field is not enabled for the provided scene.
64 </p></div></div><div class="top"><p class="src"><a name="v:p2d" class="def">p2d</a> :: Int -&gt; Int -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></p><div class="doc"><p>Convenience method for turning a pair of integers into a Point2D.
65 </p></div></div><div class="top"><p class="src"><a name="v:color" class="def">color</a> :: Double -&gt; Double -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Convenience method for creating colors
66 </p></div></div><div class="top"><p class="src"><a name="v:colorm" class="def">colorm</a> :: Double -&gt; Double -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:Material">Material</a></p><div class="doc"><p>Convenience method for creating ColorMaterials.
67 </p></div></div><div class="top"><p class="src"><a name="v:toRelPoint" class="def">toRelPoint</a> :: Size -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a></p><div class="doc"><p>Converts pixel locations into relative locations in [-1,1], where -1
68 corresponds to the left or bottom edge, and 1 corresponds to the right or top
69 edge.
70 </p></div></div><div class="top"><p class="src"><a name="v:view" class="def">view</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: Vec3</td><td class="doc"><p>The location of the viewer
1271 </p></td></tr><tr><td class="src">-&gt; Double</td><td class="doc"><p>The field of view of the viewer, in radians
1372 </p></td></tr><tr><td class="src">-&gt; Vec3</td><td class="doc"><p>The vector from viewer to center of image plane
1473 </p></td></tr><tr><td class="src">-&gt; Vec3</td><td class="doc"><p>Unit vector pointing vertically along the image plane
1574 </p></td></tr><tr><td class="src">-&gt; <a href="ArtRay-Primitives.html#t:Viewer">Viewer</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Creates a viewer
16 </p></div></div><div class="top"><p class="src"><a name="v:colorFrom" class="def">colorFrom</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; Color</p></div><div class="top"><p class="src"><a name="v:combine" class="def">combine</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:scale" class="def">scale</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:weightedCombine" class="def">weightedCombine</a> :: Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:sumLight" class="def">sumLight</a> :: [<a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>] -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:sumColor" class="def">sumColor</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:meanColor" class="def">meanColor</a> :: [<a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>] -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
75 </p></div></div><div class="top"><p class="src"><a name="v:colorFrom" class="def">colorFrom</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; Color</p><div class="doc"><p>Convert an ArtRay color to a GD color.
76 </p></div></div><div class="top"><p class="src"><a name="v:combine" class="def">combine</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Take the product of two colors
77 </p></div></div><div class="top"><p class="src"><a name="v:scale" class="def">scale</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Multiply a color by a scalar
78 </p></div></div><div class="top"><p class="src"><a name="v:weightedCombine" class="def">weightedCombine</a> :: Double -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Weight two colors with the provided weighting factor. The first color is
79 multiplied by the weight, the second by one minus the weight.
80 </p></div></div><div class="top"><p class="src"><a name="v:sumLight" class="def">sumLight</a> :: [<a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>] -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Ensure that each component of the color is in [0, 1].
81 </p><p>Take the sum of a list of colors
82 </p></div></div><div class="top"><p class="src"><a name="v:sumColor" class="def">sumColor</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Take the sum of a pair of colors, truncating if it results in a value
83 outside [0, 1].
84 </p></div></div><div class="top"><p class="src"><a name="v:sumColor-39-" class="def">sumColor'</a> :: <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Take the sum of a pair of colors without normalizing.
85 </p></div></div><div class="top"><p class="src"><a name="v:meanColor" class="def">meanColor</a> :: [<a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>] -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Find the mean value of a list of colors.
86 </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
77 </p></td></tr><tr><td class="src">-&gt; Vec3</td><td class="doc"><p>The location of intersection
88 </p></td></tr><tr><td class="src">-&gt; Int</td><td class="doc"><p>The stack depth
99 </p></td></tr><tr><td class="src">-&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></td><td class="doc"><p>The color at that point
10 </p></td></tr></table></div></div><div class="top"><p class="src"><a name="v:occluded" class="def">occluded</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; Vec3 -&gt; Vec3 -&gt; Double</p></div><div class="top"><p class="src"><a name="v:phongLight" class="def">phongLight</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; <a href="ArtRay-Primitives.html#t:Material">Material</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; Vec3 -&gt; <a href="ArtRay-Primitives.html#t:Light">Light</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:colorAtRay" class="def">colorAtRay</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; Int -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:colorAtRay-39-" class="def">colorAtRay'</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>] -&gt; Int -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:sortTuples" class="def">sortTuples</a> :: (Double, Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>) -&gt; (Double, Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>) -&gt; Ordering</p></div><div class="top"><p class="src"><a name="v:geomAtRay" class="def">geomAtRay</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>] -&gt; Maybe (Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>)</p></div><div class="top"><p class="src"><a name="v:intersectWithScene" class="def">intersectWithScene</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>] -&gt; [(Double, Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>)]</p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
10 </p></td></tr></table></div></div><div class="top"><p class="src"><a name="v:occluded" class="def">occluded</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; Vec3 -&gt; Vec3 -&gt; Double</p></div><div class="top"><p class="src"><a name="v:phongLight" class="def">phongLight</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a> -&gt; <a href="ArtRay-Primitives.html#t:Material">Material</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; Vec3 -&gt; <a href="ArtRay-Primitives.html#t:Light">Light</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:colorAtRay" class="def">colorAtRay</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Int -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:colorAtRay-39-" class="def">colorAtRay'</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Int -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>] -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p></div><div class="top"><p class="src"><a name="v:sortTuples" class="def">sortTuples</a> :: (Double, Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>) -&gt; (Double, Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>) -&gt; Ordering</p></div><div class="top"><p class="src"><a name="v:geomAtRay" class="def">geomAtRay</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>] -&gt; Maybe (Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>)</p></div><div class="top"><p class="src"><a name="v:intersectWithScene" class="def">intersectWithScene</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; <a href="ArtRay-Primitives.html#t:Ray">Ray</a> -&gt; [<a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>] -&gt; [(Double, Vec3, <a href="ArtRay-Primitives.html#t:Primitive">Primitive</a>)]</p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
00 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ArtRay.Render</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
11 window.onload = function () {pageLoad();setSynopsis("mini_ArtRay-Render.html");};
22 //]]>
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="module-header"><p class="caption">ArtRay.Render</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:rayTraceImage-39-">rayTraceImage'</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Size -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:rayTraceImage">rayTraceImage</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Size -&gt; Point -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:applyToImage">applyToImage</a> :: (Size -&gt; Point -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>) -&gt; Image -&gt; IO ()</li><li class="src short"><a href="#v:render">render</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Int -&gt; String -&gt; IO ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:rayTraceImage-39-" class="def">rayTraceImage'</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Size -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Raytrace an image without antialiasing
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="module-header"><p class="caption">ArtRay.Render</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:rayTraceImage-39-">rayTraceImage'</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Size -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:rayTraceImage">rayTraceImage</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Size -&gt; Point -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></li><li class="src short"><a href="#v:applyToImage">applyToImage</a> :: (Size -&gt; Point -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>) -&gt; Image -&gt; IO ()</li><li class="src short"><a href="#v:render">render</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Int -&gt; FilePath -&gt; IO ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:rayTraceImage-39-" class="def">rayTraceImage'</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Size -&gt; <a href="ArtRay-Primitives.html#t:Point2D">Point2D</a> -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Raytrace an image without antialiasing
44 </p></div></div><div class="top"><p class="src"><a name="v:rayTraceImage" class="def">rayTraceImage</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Size -&gt; Point -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a></p><div class="doc"><p>Raytrace an image with antialiasing by subpixel sampling
5 </p></div></div><div class="top"><p class="src"><a name="v:applyToImage" class="def">applyToImage</a> :: (Size -&gt; Point -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>) -&gt; Image -&gt; IO ()</p></div><div class="top"><p class="src"><a name="v:render" class="def">render</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Int -&gt; String -&gt; IO ()</p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
5 </p></div></div><div class="top"><p class="src"><a name="v:applyToImage" class="def">applyToImage</a> :: (Size -&gt; Point -&gt; <a href="ArtRay-Primitives.html#t:ColorTriple">ColorTriple</a>) -&gt; Image -&gt; IO ()</p><div class="doc"><p>Turn a function into a pretty picture
6 </p></div></div><div class="top"><p class="src"><a name="v:render" class="def">render</a> :: <a href="ArtRay-Primitives.html#t:Scene">Scene</a> -&gt; Int -&gt; FilePath -&gt; IO ()</p><div class="doc"><p>Render a square image and save it to the given file.
7 </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
00 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Main</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
11 window.onload = function () {pageLoad();setSynopsis("mini_Main.html");};
22 //]]>
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="module-header"><p class="caption">Main</p></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:main" class="def">main</a> :: IO ()</p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="module-header"><p class="caption">Main</p></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:readScene">readScene</a> :: FilePath -&gt; IO <a href="ArtRay-Primitives.html#t:Scene">Scene</a></li><li class="src short"><a href="#v:main">main</a> :: IO ()</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:readScene" class="def">readScene</a> :: FilePath -&gt; IO <a href="ArtRay-Primitives.html#t:Scene">Scene</a></p><div class="doc"><p>Read a scene from a file
4 </p></div></div><div class="top"><p class="src"><a name="v:main" class="def">main</a> :: IO ()</p><div class="doc"><p>Artificially inflate my Haddock coverage.
5 </p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
00 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ArtRay: A Haskell Raytracer (Index)</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
11 window.onload = function () {pageLoad();};
22 //]]>
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="index"><p class="caption">Index</p><table><tr><td class="src">ambient</td><td class="module"><a href="ArtRay-Primitives.html#v:ambient">ArtRay.Primitives</a></td></tr><tr><td class="src">Antialiased</td><td class="module"><a href="ArtRay-Primitives.html#v:Antialiased">ArtRay.Primitives</a></td></tr><tr><td class="src">applyToImage</td><td class="module"><a href="ArtRay-Render.html#v:applyToImage">ArtRay.Render</a></td></tr><tr><td class="src">background</td><td class="module"><a href="ArtRay-Primitives.html#v:background">ArtRay.Primitives</a></td></tr><tr><td class="src">base</td><td class="module"><a href="ArtRay-Primitives.html#v:base">ArtRay.Primitives</a></td></tr><tr><td class="src">basecolor</td><td class="module"><a href="ArtRay-Primitives.html#v:basecolor">ArtRay.Primitives</a></td></tr><tr><td class="src">center</td><td class="module"><a href="ArtRay-Primitives.html#v:center">ArtRay.Primitives</a></td></tr><tr><td class="src">cmodel</td><td class="module"><a href="ArtRay-Primitives.html#v:cmodel">ArtRay.Primitives</a></td></tr><tr><td class="src">color</td><td class="module"><a href="ArtRay-Primitives.html#v:color">ArtRay.Primitives</a></td></tr><tr><td class="src">colorAtRay</td><td class="module"><a href="ArtRay-RayTrace.html#v:colorAtRay">ArtRay.RayTrace</a></td></tr><tr><td class="src">colorAtRay'</td><td class="module"><a href="ArtRay-RayTrace.html#v:colorAtRay-39-">ArtRay.RayTrace</a></td></tr><tr><td class="src">colorFor</td><td class="module"><a href="ArtRay-RayTrace.html#v:colorFor">ArtRay.RayTrace</a></td></tr><tr><td class="src">colorFrom</td><td class="module"><a href="ArtRay-Primitives.html#v:colorFrom">ArtRay.Primitives</a></td></tr><tr><td class="src">colorm</td><td class="module"><a href="ArtRay-Primitives.html#v:colorm">ArtRay.Primitives</a></td></tr><tr><td class="src">ColorMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:ColorMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">ColorTriple</td><td class="module"><a href="ArtRay-Primitives.html#t:ColorTriple">ArtRay.Primitives</a></td></tr><tr><td class="src">CombinationModel</td><td class="module"><a href="ArtRay-Primitives.html#t:CombinationModel">ArtRay.Primitives</a></td></tr><tr><td class="src">combine</td><td class="module"><a href="ArtRay-Primitives.html#v:combine">ArtRay.Primitives</a></td></tr><tr><td class="src">corner</td><td class="module"><a href="ArtRay-Primitives.html#v:corner">ArtRay.Primitives</a></td></tr><tr><td class="src">difflight</td><td class="module"><a href="ArtRay-Primitives.html#v:difflight">ArtRay.Primitives</a></td></tr><tr><td class="src">diffuse</td><td class="module"><a href="ArtRay-Primitives.html#v:diffuse">ArtRay.Primitives</a></td></tr><tr><td class="src">direction</td><td class="module"><a href="ArtRay-Primitives.html#v:direction">ArtRay.Primitives</a></td></tr><tr><td class="src">f</td><td class="module"><a href="ArtRay-Primitives.html#v:f">ArtRay.Primitives</a></td></tr><tr><td class="src">firstIntersection</td><td class="module"><a href="ArtRay-Geometry.html#v:firstIntersection">ArtRay.Geometry</a></td></tr><tr><td class="src">FlatSum</td><td class="module"><a href="ArtRay-Primitives.html#v:FlatSum">ArtRay.Primitives</a></td></tr><tr><td class="src">geom</td><td class="module"><a href="ArtRay-Primitives.html#v:geom">ArtRay.Primitives</a></td></tr><tr><td class="src">geomAtRay</td><td class="module"><a href="ArtRay-RayTrace.html#v:geomAtRay">ArtRay.RayTrace</a></td></tr><tr><td class="src">glambient</td><td class="module"><a href="ArtRay-Primitives.html#v:glambient">ArtRay.Primitives</a></td></tr><tr><td class="src">GlobalAmbient</td><td class="module"><a href="ArtRay-Primitives.html#v:GlobalAmbient">ArtRay.Primitives</a></td></tr><tr><td class="src">intersectWithScene</td><td class="module"><a href="ArtRay-RayTrace.html#v:intersectWithScene">ArtRay.RayTrace</a></td></tr><tr><td class="src">Light</td><td class="module"><a href="ArtRay-Primitives.html#t:Light">ArtRay.Primitives</a></td></tr><tr><td class="src">lights</td><td class="module"><a href="ArtRay-Primitives.html#v:lights">ArtRay.Primitives</a></td></tr><tr><td class="src">location</td><td class="module"><a href="ArtRay-Primitives.html#v:location">ArtRay.Primitives</a></td></tr><tr><td class="src">loclight</td><td class="module"><a href="ArtRay-Primitives.html#v:loclight">ArtRay.Primitives</a></td></tr><tr><td class="src">main</td><td class="module"><a href="Main.html#v:main">Main</a></td></tr><tr><td class="src">Material</td><td class="module"><a href="ArtRay-Primitives.html#t:Material">ArtRay.Primitives</a></td></tr><tr><td class="src">material</td><td class="module"><a href="ArtRay-Primitives.html#v:material">ArtRay.Primitives</a></td></tr><tr><td class="src">meanColor</td><td class="module"><a href="ArtRay-Primitives.html#v:meanColor">ArtRay.Primitives</a></td></tr><tr><td class="src">Multiply</td><td class="module"><a href="ArtRay-Primitives.html#v:Multiply">ArtRay.Primitives</a></td></tr><tr><td class="src">normal</td><td class="module"><a href="ArtRay-Geometry.html#v:normal">ArtRay.Geometry</a></td></tr><tr><td class="src">normalizeColor</td><td class="module">ArtRay.Primitives</td></tr><tr><td class="src">NullMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:NullMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">occluded</td><td class="module"><a href="ArtRay-RayTrace.html#v:occluded">ArtRay.RayTrace</a></td></tr><tr><td class="src">Option</td><td class="module"><a href="ArtRay-Primitives.html#t:Option">ArtRay.Primitives</a></td></tr><tr><td class="src">options</td><td class="module"><a href="ArtRay-Primitives.html#v:options">ArtRay.Primitives</a></td></tr><tr><td class="src">p2d</td><td class="module"><a href="ArtRay-Primitives.html#v:p2d">ArtRay.Primitives</a></td></tr><tr><td class="src">phongexp</td><td class="module"><a href="ArtRay-Primitives.html#v:phongexp">ArtRay.Primitives</a></td></tr><tr><td class="src">PhongLight</td><td class="module"><a href="ArtRay-Primitives.html#v:PhongLight">ArtRay.Primitives</a></td></tr><tr><td class="src">phongLight</td><td class="module"><a href="ArtRay-RayTrace.html#v:phongLight">ArtRay.RayTrace</a></td></tr><tr><td class="src">PhongMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:PhongMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">pixelColor</td><td class="module"><a href="ArtRay-RayTrace.html#v:pixelColor">ArtRay.RayTrace</a></td></tr><tr><td class="src">Plane</td><td class="module"><a href="ArtRay-Primitives.html#v:Plane">ArtRay.Primitives</a></td></tr><tr><td class="src">pnorm</td><td class="module"><a href="ArtRay-Primitives.html#v:pnorm">ArtRay.Primitives</a></td></tr><tr><td class="src">point</td><td class="module"><a href="ArtRay-Primitives.html#v:point">ArtRay.Primitives</a></td></tr><tr><td class="src">Point2D</td><td>&nbsp;</td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="ArtRay-Primitives.html#t:Point2D">ArtRay.Primitives</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="ArtRay-Primitives.html#v:Point2D">ArtRay.Primitives</a></td></tr><tr><td class="src">pointToRay</td><td class="module"><a href="ArtRay-Geometry.html#v:pointToRay">ArtRay.Geometry</a></td></tr><tr><td class="src">position</td><td class="module"><a href="ArtRay-Primitives.html#v:position">ArtRay.Primitives</a></td></tr><tr><td class="src">Primitive</td><td class="module"><a href="ArtRay-Primitives.html#t:Primitive">ArtRay.Primitives</a></td></tr><tr><td class="src">quadSolve</td><td class="module"><a href="ArtRay-Geometry.html#v:quadSolve">ArtRay.Geometry</a></td></tr><tr><td class="src">radius</td><td class="module"><a href="ArtRay-Primitives.html#v:radius">ArtRay.Primitives</a></td></tr><tr><td class="src">Ray</td><td>&nbsp;</td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="ArtRay-Primitives.html#t:Ray">ArtRay.Primitives</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="ArtRay-Primitives.html#v:Ray">ArtRay.Primitives</a></td></tr><tr><td class="src">rayTraceImage</td><td class="module"><a href="ArtRay-Render.html#v:rayTraceImage">ArtRay.Render</a></td></tr><tr><td class="src">rayTraceImage'</td><td class="module"><a href="ArtRay-Render.html#v:rayTraceImage-39-">ArtRay.Render</a></td></tr><tr><td class="src">RectPrism</td><td class="module"><a href="ArtRay-Primitives.html#v:RectPrism">ArtRay.Primitives</a></td></tr><tr><td class="src">refindex</td><td class="module"><a href="ArtRay-Primitives.html#v:refindex">ArtRay.Primitives</a></td></tr><tr><td class="src">reflectAbout</td><td class="module"><a href="ArtRay-Geometry.html#v:reflectAbout">ArtRay.Geometry</a></td></tr><tr><td class="src">ReflectiveMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:ReflectiveMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">reflectivity</td><td class="module"><a href="ArtRay-Primitives.html#v:reflectivity">ArtRay.Primitives</a></td></tr><tr><td class="src">refractVector</td><td class="module"><a href="ArtRay-Geometry.html#v:refractVector">ArtRay.Geometry</a></td></tr><tr><td class="src">RelPoint2D</td><td class="module"><a href="ArtRay-Primitives.html#v:RelPoint2D">ArtRay.Primitives</a></td></tr><tr><td class="src">render</td><td class="module"><a href="ArtRay-Render.html#v:render">ArtRay.Render</a></td></tr><tr><td class="src">scale</td><td class="module"><a href="ArtRay-Primitives.html#v:scale">ArtRay.Primitives</a></td></tr><tr><td class="src">Scene</td><td>&nbsp;</td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="ArtRay-Primitives.html#t:Scene">ArtRay.Primitives</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="ArtRay-Primitives.html#v:Scene">ArtRay.Primitives</a></td></tr><tr><td class="src">sortTuples</td><td class="module"><a href="ArtRay-RayTrace.html#v:sortTuples">ArtRay.RayTrace</a></td></tr><tr><td class="src">speclight</td><td class="module"><a href="ArtRay-Primitives.html#v:speclight">ArtRay.Primitives</a></td></tr><tr><td class="src">specular</td><td class="module"><a href="ArtRay-Primitives.html#v:specular">ArtRay.Primitives</a></td></tr><tr><td class="src">Sphere</td><td class="module"><a href="ArtRay-Primitives.html#v:Sphere">ArtRay.Primitives</a></td></tr><tr><td class="src">subpixels</td><td class="module"><a href="ArtRay-Primitives.html#v:subpixels">ArtRay.Primitives</a></td></tr><tr><td class="src">sumColor</td><td class="module"><a href="ArtRay-Primitives.html#v:sumColor">ArtRay.Primitives</a></td></tr><tr><td class="src">sumColor'</td><td class="module">ArtRay.Primitives</td></tr><tr><td class="src">sumLight</td><td class="module"><a href="ArtRay-Primitives.html#v:sumLight">ArtRay.Primitives</a></td></tr><tr><td class="src">toRelPoint</td><td class="module"><a href="ArtRay-Primitives.html#v:toRelPoint">ArtRay.Primitives</a></td></tr><tr><td class="src">tracei</td><td class="module">ArtRay.RayTrace</td></tr><tr><td class="src">transmittance</td><td class="module"><a href="ArtRay-Primitives.html#v:transmittance">ArtRay.Primitives</a></td></tr><tr><td class="src">TransparentMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:TransparentMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">u</td><td class="module"><a href="ArtRay-Primitives.html#v:u">ArtRay.Primitives</a></td></tr><tr><td class="src">v</td><td class="module"><a href="ArtRay-Primitives.html#v:v">ArtRay.Primitives</a></td></tr><tr><td class="src">view</td><td class="module"><a href="ArtRay-Primitives.html#v:view">ArtRay.Primitives</a></td></tr><tr><td class="src">Viewer</td><td>&nbsp;</td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="ArtRay-Primitives.html#t:Viewer">ArtRay.Primitives</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="ArtRay-Primitives.html#v:Viewer">ArtRay.Primitives</a></td></tr><tr><td class="src">viewer</td><td class="module"><a href="ArtRay-Primitives.html#v:viewer">ArtRay.Primitives</a></td></tr><tr><td class="src">weight</td><td class="module"><a href="ArtRay-Primitives.html#v:weight">ArtRay.Primitives</a></td></tr><tr><td class="src">weightedCombine</td><td class="module"><a href="ArtRay-Primitives.html#v:weightedCombine">ArtRay.Primitives</a></td></tr><tr><td class="src">WeightSum</td><td class="module"><a href="ArtRay-Primitives.html#v:WeightSum">ArtRay.Primitives</a></td></tr><tr><td class="src">x</td><td class="module"><a href="ArtRay-Primitives.html#v:x">ArtRay.Primitives</a></td></tr><tr><td class="src">y</td><td class="module"><a href="ArtRay-Primitives.html#v:y">ArtRay.Primitives</a></td></tr><tr><td class="src">z</td><td class="module"><a href="ArtRay-Primitives.html#v:z">ArtRay.Primitives</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
3 </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ArtRay: A Haskell Raytracer</p></div><div id="content"><div id="index"><p class="caption">Index</p><table><tr><td class="src">ambient</td><td class="module"><a href="ArtRay-Primitives.html#v:ambient">ArtRay.Primitives</a></td></tr><tr><td class="src">Antialiased</td><td class="module"><a href="ArtRay-Primitives.html#v:Antialiased">ArtRay.Primitives</a></td></tr><tr><td class="src">aperture</td><td class="module"><a href="ArtRay-Primitives.html#v:aperture">ArtRay.Primitives</a></td></tr><tr><td class="src">applyToImage</td><td class="module"><a href="ArtRay-Render.html#v:applyToImage">ArtRay.Render</a></td></tr><tr><td class="src">background</td><td class="module"><a href="ArtRay-Primitives.html#v:background">ArtRay.Primitives</a></td></tr><tr><td class="src">base</td><td class="module"><a href="ArtRay-Primitives.html#v:base">ArtRay.Primitives</a></td></tr><tr><td class="src">basecolor</td><td class="module"><a href="ArtRay-Primitives.html#v:basecolor">ArtRay.Primitives</a></td></tr><tr><td class="src">center</td><td class="module"><a href="ArtRay-Primitives.html#v:center">ArtRay.Primitives</a></td></tr><tr><td class="src">cmodel</td><td class="module"><a href="ArtRay-Primitives.html#v:cmodel">ArtRay.Primitives</a></td></tr><tr><td class="src">color</td><td class="module"><a href="ArtRay-Primitives.html#v:color">ArtRay.Primitives</a></td></tr><tr><td class="src">colorAtRay</td><td class="module"><a href="ArtRay-RayTrace.html#v:colorAtRay">ArtRay.RayTrace</a></td></tr><tr><td class="src">colorAtRay'</td><td class="module"><a href="ArtRay-RayTrace.html#v:colorAtRay-39-">ArtRay.RayTrace</a></td></tr><tr><td class="src">colorFor</td><td class="module"><a href="ArtRay-RayTrace.html#v:colorFor">ArtRay.RayTrace</a></td></tr><tr><td class="src">colorFrom</td><td class="module"><a href="ArtRay-Primitives.html#v:colorFrom">ArtRay.Primitives</a></td></tr><tr><td class="src">colorm</td><td class="module"><a href="ArtRay-Primitives.html#v:colorm">ArtRay.Primitives</a></td></tr><tr><td class="src">ColorMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:ColorMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">ColorTriple</td><td class="module"><a href="ArtRay-Primitives.html#t:ColorTriple">ArtRay.Primitives</a></td></tr><tr><td class="src">CombinationModel</td><td class="module"><a href="ArtRay-Primitives.html#t:CombinationModel">ArtRay.Primitives</a></td></tr><tr><td class="src">combine</td><td class="module"><a href="ArtRay-Primitives.html#v:combine">ArtRay.Primitives</a></td></tr><tr><td class="src">deformRay</td><td class="module"><a href="ArtRay-Geometry.html#v:deformRay">ArtRay.Geometry</a></td></tr><tr><td class="src">DepthOfField</td><td class="module"><a href="ArtRay-Primitives.html#v:DepthOfField">ArtRay.Primitives</a></td></tr><tr><td class="src">difflight</td><td class="module"><a href="ArtRay-Primitives.html#v:difflight">ArtRay.Primitives</a></td></tr><tr><td class="src">diffuse</td><td class="module"><a href="ArtRay-Primitives.html#v:diffuse">ArtRay.Primitives</a></td></tr><tr><td class="src">direction</td><td class="module"><a href="ArtRay-Primitives.html#v:direction">ArtRay.Primitives</a></td></tr><tr><td class="src">dofaperture</td><td class="module"><a href="ArtRay-Primitives.html#v:dofaperture">ArtRay.Primitives</a></td></tr><tr><td class="src">dofdepth</td><td class="module"><a href="ArtRay-Primitives.html#v:dofdepth">ArtRay.Primitives</a></td></tr><tr><td class="src">dofenabled</td><td class="module"><a href="ArtRay-Primitives.html#v:dofenabled">ArtRay.Primitives</a></td></tr><tr><td class="src">dofinfo</td><td class="module"><a href="ArtRay-Primitives.html#v:dofinfo">ArtRay.Primitives</a></td></tr><tr><td class="src">dofSamples</td><td class="module"><a href="ArtRay-Primitives.html#v:dofSamples">ArtRay.Primitives</a></td></tr><tr><td class="src">dofsamples</td><td class="module"><a href="ArtRay-Primitives.html#v:dofsamples">ArtRay.Primitives</a></td></tr><tr><td class="src">f</td><td class="module"><a href="ArtRay-Primitives.html#v:f">ArtRay.Primitives</a></td></tr><tr><td class="src">farpoint</td><td class="module"><a href="ArtRay-Geometry.html#v:farpoint">ArtRay.Geometry</a></td></tr><tr><td class="src">firstIntersection</td><td class="module"><a href="ArtRay-Geometry.html#v:firstIntersection">ArtRay.Geometry</a></td></tr><tr><td class="src">FlatSum</td><td class="module"><a href="ArtRay-Primitives.html#v:FlatSum">ArtRay.Primitives</a></td></tr><tr><td class="src">focalLength</td><td class="module"><a href="ArtRay-Primitives.html#v:focalLength">ArtRay.Primitives</a></td></tr><tr><td class="src">geom</td><td class="module"><a href="ArtRay-Primitives.html#v:geom">ArtRay.Primitives</a></td></tr><tr><td class="src">geomAtRay</td><td class="module"><a href="ArtRay-RayTrace.html#v:geomAtRay">ArtRay.RayTrace</a></td></tr><tr><td class="src">glambient</td><td class="module"><a href="ArtRay-Primitives.html#v:glambient">ArtRay.Primitives</a></td></tr><tr><td class="src">GlobalAmbient</td><td class="module"><a href="ArtRay-Primitives.html#v:GlobalAmbient">ArtRay.Primitives</a></td></tr><tr><td class="src">intersectWithScene</td><td class="module"><a href="ArtRay-RayTrace.html#v:intersectWithScene">ArtRay.RayTrace</a></td></tr><tr><td class="src">Light</td><td class="module"><a href="ArtRay-Primitives.html#t:Light">ArtRay.Primitives</a></td></tr><tr><td class="src">lights</td><td class="module"><a href="ArtRay-Primitives.html#v:lights">ArtRay.Primitives</a></td></tr><tr><td class="src">location</td><td class="module"><a href="ArtRay-Primitives.html#v:location">ArtRay.Primitives</a></td></tr><tr><td class="src">loclight</td><td class="module"><a href="ArtRay-Primitives.html#v:loclight">ArtRay.Primitives</a></td></tr><tr><td class="src">main</td><td class="module"><a href="Main.html#v:main">Main</a></td></tr><tr><td class="src">Material</td><td class="module"><a href="ArtRay-Primitives.html#t:Material">ArtRay.Primitives</a></td></tr><tr><td class="src">material</td><td class="module"><a href="ArtRay-Primitives.html#v:material">ArtRay.Primitives</a></td></tr><tr><td class="src">meanColor</td><td class="module"><a href="ArtRay-Primitives.html#v:meanColor">ArtRay.Primitives</a></td></tr><tr><td class="src">msaaSamples</td><td class="module"><a href="ArtRay-Primitives.html#v:msaaSamples">ArtRay.Primitives</a></td></tr><tr><td class="src">Multiply</td><td class="module"><a href="ArtRay-Primitives.html#v:Multiply">ArtRay.Primitives</a></td></tr><tr><td class="src">normal</td><td class="module"><a href="ArtRay-Geometry.html#v:normal">ArtRay.Geometry</a></td></tr><tr><td class="src">normalizeColor</td><td class="module">ArtRay.Primitives</td></tr><tr><td class="src">NullMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:NullMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">occluded</td><td class="module"><a href="ArtRay-RayTrace.html#v:occluded">ArtRay.RayTrace</a></td></tr><tr><td class="src">Option</td><td class="module"><a href="ArtRay-Primitives.html#t:Option">ArtRay.Primitives</a></td></tr><tr><td class="src">options</td><td class="module"><a href="ArtRay-Primitives.html#v:options">ArtRay.Primitives</a></td></tr><tr><td class="src">p2d</td><td class="module"><a href="ArtRay-Primitives.html#v:p2d">ArtRay.Primitives</a></td></tr><tr><td class="src">phongexp</td><td class="module"><a href="ArtRay-Primitives.html#v:phongexp">ArtRay.Primitives</a></td></tr><tr><td class="src">PhongLight</td><td class="module"><a href="ArtRay-Primitives.html#v:PhongLight">ArtRay.Primitives</a></td></tr><tr><td class="src">phongLight</td><td class="module"><a href="ArtRay-RayTrace.html#v:phongLight">ArtRay.RayTrace</a></td></tr><tr><td class="src">PhongMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:PhongMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">pixelColor</td><td class="module"><a href="ArtRay-RayTrace.html#v:pixelColor">ArtRay.RayTrace</a></td></tr><tr><td class="src">Plane</td><td class="module"><a href="ArtRay-Primitives.html#v:Plane">ArtRay.Primitives</a></td></tr><tr><td class="src">pnorm</td><td class="module"><a href="ArtRay-Primitives.html#v:pnorm">ArtRay.Primitives</a></td></tr><tr><td class="src">point</td><td class="module"><a href="ArtRay-Primitives.html#v:point">ArtRay.Primitives</a></td></tr><tr><td class="src">Point2D</td><td>&nbsp;</td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="ArtRay-Primitives.html#t:Point2D">ArtRay.Primitives</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="ArtRay-Primitives.html#v:Point2D">ArtRay.Primitives</a></td></tr><tr><td class="src">pointToRay</td><td class="module"><a href="ArtRay-Geometry.html#v:pointToRay">ArtRay.Geometry</a></td></tr><tr><td class="src">pointToRay'</td><td class="module"><a href="ArtRay-Geometry.html#v:pointToRay-39-">ArtRay.Geometry</a></td></tr><tr><td class="src">position</td><td class="module"><a href="ArtRay-Primitives.html#v:position">ArtRay.Primitives</a></td></tr><tr><td class="src">Primitive</td><td class="module"><a href="ArtRay-Primitives.html#t:Primitive">ArtRay.Primitives</a></td></tr><tr><td class="src">quadSolve</td><td class="module"><a href="ArtRay-Geometry.html#v:quadSolve">ArtRay.Geometry</a></td></tr><tr><td class="src">radius</td><td class="module"><a href="ArtRay-Primitives.html#v:radius">ArtRay.Primitives</a></td></tr><tr><td class="src">Ray</td><td>&nbsp;</td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="ArtRay-Primitives.html#t:Ray">ArtRay.Primitives</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="ArtRay-Primitives.html#v:Ray">ArtRay.Primitives</a></td></tr><tr><td class="src">rayTraceImage</td><td class="module"><a href="ArtRay-Render.html#v:rayTraceImage">ArtRay.Render</a></td></tr><tr><td class="src">rayTraceImage'</td><td class="module"><a href="ArtRay-Render.html#v:rayTraceImage-39-">ArtRay.Render</a></td></tr><tr><td class="src">readScene</td><td class="module"><a href="Main.html#v:readScene">Main</a></td></tr><tr><td class="src">refindex</td><td class="module"><a href="ArtRay-Primitives.html#v:refindex">ArtRay.Primitives</a></td></tr><tr><td class="src">reflectAbout</td><td class="module"><a href="ArtRay-Geometry.html#v:reflectAbout">ArtRay.Geometry</a></td></tr><tr><td class="src">ReflectiveMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:ReflectiveMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">reflectivity</td><td class="module"><a href="ArtRay-Primitives.html#v:reflectivity">ArtRay.Primitives</a></td></tr><tr><td class="src">refractVector</td><td class="module"><a href="ArtRay-Geometry.html#v:refractVector">ArtRay.Geometry</a></td></tr><tr><td class="src">RelPoint2D</td><td class="module"><a href="ArtRay-Primitives.html#v:RelPoint2D">ArtRay.Primitives</a></td></tr><tr><td class="src">render</td><td class="module"><a href="ArtRay-Render.html#v:render">ArtRay.Render</a></td></tr><tr><td class="src">scale</td><td class="module"><a href="ArtRay-Primitives.html#v:scale">ArtRay.Primitives</a></td></tr><tr><td class="src">Scene</td><td>&nbsp;</td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="ArtRay-Primitives.html#t:Scene">ArtRay.Primitives</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="ArtRay-Primitives.html#v:Scene">ArtRay.Primitives</a></td></tr><tr><td class="src">sortTuples</td><td class="module"><a href="ArtRay-RayTrace.html#v:sortTuples">ArtRay.RayTrace</a></td></tr><tr><td class="src">speclight</td><td class="module"><a href="ArtRay-Primitives.html#v:speclight">ArtRay.Primitives</a></td></tr><tr><td class="src">specular</td><td class="module"><a href="ArtRay-Primitives.html#v:specular">ArtRay.Primitives</a></td></tr><tr><td class="src">Sphere</td><td class="module"><a href="ArtRay-Primitives.html#v:Sphere">ArtRay.Primitives</a></td></tr><tr><td class="src">subpixels</td><td class="module"><a href="ArtRay-Primitives.html#v:subpixels">ArtRay.Primitives</a></td></tr><tr><td class="src">sumColor</td><td class="module"><a href="ArtRay-Primitives.html#v:sumColor">ArtRay.Primitives</a></td></tr><tr><td class="src">sumColor'</td><td class="module"><a href="ArtRay-Primitives.html#v:sumColor-39-">ArtRay.Primitives</a></td></tr><tr><td class="src">sumLight</td><td class="module"><a href="ArtRay-Primitives.html#v:sumLight">ArtRay.Primitives</a></td></tr><tr><td class="src">toRelPoint</td><td class="module"><a href="ArtRay-Primitives.html#v:toRelPoint">ArtRay.Primitives</a></td></tr><tr><td class="src">tracei</td><td class="module">ArtRay.RayTrace</td></tr><tr><td class="src">transmittance</td><td class="module"><a href="ArtRay-Primitives.html#v:transmittance">ArtRay.Primitives</a></td></tr><tr><td class="src">TransparentMaterial</td><td class="module"><a href="ArtRay-Primitives.html#v:TransparentMaterial">ArtRay.Primitives</a></td></tr><tr><td class="src">u</td><td class="module"><a href="ArtRay-Primitives.html#v:u">ArtRay.Primitives</a></td></tr><tr><td class="src">v</td><td class="module"><a href="ArtRay-Primitives.html#v:v">ArtRay.Primitives</a></td></tr><tr><td class="src">view</td><td class="module"><a href="ArtRay-Primitives.html#v:view">ArtRay.Primitives</a></td></tr><tr><td class="src">Viewer</td><td>&nbsp;</td></tr><tr><td class="alt">1 (Type/Class)</td><td class="module"><a href="ArtRay-Primitives.html#t:Viewer">ArtRay.Primitives</a></td></tr><tr><td class="alt">2 (Data Constructor)</td><td class="module"><a href="ArtRay-Primitives.html#v:Viewer">ArtRay.Primitives</a></td></tr><tr><td class="src">viewer</td><td class="module"><a href="ArtRay-Primitives.html#v:viewer">ArtRay.Primitives</a></td></tr><tr><td class="src">weight</td><td class="module"><a href="ArtRay-Primitives.html#v:weight">ArtRay.Primitives</a></td></tr><tr><td class="src">weightedCombine</td><td class="module"><a href="ArtRay-Primitives.html#v:weightedCombine">ArtRay.Primitives</a></td></tr><tr><td class="src">WeightSum</td><td class="module"><a href="ArtRay-Primitives.html#v:WeightSum">ArtRay.Primitives</a></td></tr></table></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>
00 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ArtRay.Geometry</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
11 window.onload = function () {pageLoad();};
22 //]]>
3 </script></head><body id="mini"><div id="module-header"><p class="caption">ArtRay.Geometry</p></div><div id="interface"><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:quadSolve" target="main">quadSolve</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:firstIntersection" target="main">firstIntersection</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:pointToRay" target="main">pointToRay</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:reflectAbout" target="main">reflectAbout</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:refractVector" target="main">refractVector</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:normal" target="main">normal</a></p></div></div></body></html>
3 </script></head><body id="mini"><div id="module-header"><p class="caption">ArtRay.Geometry</p></div><div id="interface"><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:quadSolve" target="main">quadSolve</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:firstIntersection" target="main">firstIntersection</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:pointToRay-39-" target="main">pointToRay'</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:farpoint" target="main">farpoint</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:deformRay" target="main">deformRay</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:pointToRay" target="main">pointToRay</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:reflectAbout" target="main">reflectAbout</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:refractVector" target="main">refractVector</a></p></div><div class="top"><p class="src"><a href="ArtRay-Geometry.html#v:normal" target="main">normal</a></p></div></div></body></html>
00 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ArtRay.Primitives</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
11 window.onload = function () {pageLoad();};
22 //]]>
3 </script></head><body id="mini"><div id="module-header"><p class="caption">ArtRay.Primitives</p></div><div id="interface"><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Scene" target="main">Scene</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Option" target="main">Option</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Primitive" target="main">Primitive</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Ray" target="main">Ray</a> </p></div><div class="top"><p class="src"><span class="keyword">type</span> <a href="ArtRay-Primitives.html#t:ColorTriple" target="main">ColorTriple</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Light" target="main">Light</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:CombinationModel" target="main">CombinationModel</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Material" target="main">Material</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Viewer" target="main">Viewer</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Point2D" target="main">Point2D</a> </p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:transmittance" target="main">transmittance</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:glambient" target="main">glambient</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:subpixels" target="main">subpixels</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:p2d" target="main">p2d</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:color" target="main">color</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:colorm" target="main">colorm</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:toRelPoint" target="main">toRelPoint</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:view" target="main">view</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:colorFrom" target="main">colorFrom</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:combine" target="main">combine</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:scale" target="main">scale</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:weightedCombine" target="main">weightedCombine</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:sumLight" target="main">sumLight</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:sumColor" target="main">sumColor</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:meanColor" target="main">meanColor</a></p></div></div></body></html>
3 </script></head><body id="mini"><div id="module-header"><p class="caption">ArtRay.Primitives</p></div><div id="interface"><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Scene" target="main">Scene</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Option" target="main">Option</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Primitive" target="main">Primitive</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Ray" target="main">Ray</a> </p></div><div class="top"><p class="src"><span class="keyword">type</span> <a href="ArtRay-Primitives.html#t:ColorTriple" target="main">ColorTriple</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Light" target="main">Light</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:CombinationModel" target="main">CombinationModel</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Material" target="main">Material</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Viewer" target="main">Viewer</a> </p></div><div class="top"><p class="src"><span class="keyword">data</span> <a href="ArtRay-Primitives.html#t:Point2D" target="main">Point2D</a> </p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:transmittance" target="main">transmittance</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:glambient" target="main">glambient</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:subpixels" target="main">subpixels</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:dofinfo" target="main">dofinfo</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:dofenabled" target="main">dofenabled</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:dofsamples" target="main">dofsamples</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:dofdepth" target="main">dofdepth</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:dofaperture" target="main">dofaperture</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:p2d" target="main">p2d</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:color" target="main">color</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:colorm" target="main">colorm</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:toRelPoint" target="main">toRelPoint</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:view" target="main">view</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:colorFrom" target="main">colorFrom</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:combine" target="main">combine</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:scale" target="main">scale</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:weightedCombine" target="main">weightedCombine</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:sumLight" target="main">sumLight</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:sumColor" target="main">sumColor</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:sumColor-39-" target="main">sumColor'</a></p></div><div class="top"><p class="src"><a href="ArtRay-Primitives.html#v:meanColor" target="main">meanColor</a></p></div></div></body></html>
00 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Main</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
11 window.onload = function () {pageLoad();};
22 //]]>
3 </script></head><body id="mini"><div id="module-header"><p class="caption">Main</p></div><div id="interface"><div class="top"><p class="src"><a href="Main.html#v:main" target="main">main</a></p></div></div></body></html>
3 </script></head><body id="mini"><div id="module-header"><p class="caption">Main</p></div><div id="interface"><div class="top"><p class="src"><a href="Main.html#v:readScene" target="main">readScene</a></p></div><div class="top"><p class="src"><a href="Main.html#v:main" target="main">main</a></p></div></div></body></html>
44 DepthOfField {
55 focalLength = 10,
66 aperture = 2,
7 dofSamples = 4
7 dofSamples = 2
88 }
99 ],
1010