programlibs/RayTrace/demos/diagnostic.xtl

source · imports rt: libs/RayTrace/src/RayTrace.xtl; sc: libs/Scene/src/Scene.xtl libs/Scene/src/Scene.xtlm; v: libs/Vector3/src/Vector3.xtl

clip : Float

value · line 5
clip ← 1e-6 100.0 1e-10 1e-5

camera : Float

value · line 6
camera ← 0.0 0.0 3.0  0.0 0.0 0.0  0.0 1.0 0.0  0.9

triangles : Float

value · line 7
triangles ← 2 3 3 r̲eshape -1.0 -1.0 0.0  1.0 -1.0 0.0  1.0 1.0 0.0  -1.0 -1.0 0.0  1.0 1.0 0.0  -1.0 1.0 0.0

materialids : Int

value · line 8
materialids ← 1 2
Used in: ᵘp̲ixels

materials : Float

value · line 9
materials ← 2 4 r̲eshape 0.8 0.3 0.1 0.0  0.1 0.3 0.8 0.35
Used in: ᵘp̲ixels

lights : Float

value · line 10
lights ← 1 6 r̲eshape 0.0 1.0 3.0  30.0 30.0 30.0
Used in: ᵘp̲ixels

environment : Float

value · line 11
environment ← 2 3 r̲eshape 0.05 0.05 0.05  0.01 0.02 0.04

ᵘo̲rigins : a -> Float

function · line 12
ᵘo̲rigins ← { pixels → camera ʳᵗo̲rigins t̲ally pixels }

ᵘd̲irections : Int -> Float

function · line 13
ᵘd̲irections ← { pixels → ((camera ʳᵗr̲ays 4 4) pixels) }

ᵘp̲ixels : Int -> Float

function · line 14
ᵘp̲ixels ← { pixels →
  (((((((clip ʳᵗr̲ender triangles) materialids) materials) lights) environment) ᵘo̲rigins pixels) ᵘd̲irections pixels)
}

ᵘm̲ove : (Num a, Num b) => a -> b -> Float

function · line 26
ᵘm̲ove ← { offset mesh →
  (s̲hape mesh) r̲eshape offset ᵛt̲ranslate ((3 × t̲ally mesh) c̲at 3) r̲eshape mesh
}
Used in: box, crystal

box : Float

value · line 29
box ← -1.0 -0.2 0.2 ᵘm̲ove ˢᶜb̲ox 1.1 1.1 1.1
Used in: sceneMesh

crystal : Float

value · line 30
crystal ← 0.9 0.05 -0.1 ᵘm̲ove ˢᶜo̲ctahedron 0.7 0.85 0.7
Used in: sceneMesh

floor : Float

value · line 31
floor ← ˢᶜr̲ectangle 3 3 r̲eshape -4.0 -0.8 -4.0  0.0 0.0 8.0  8.0 0.0 0.0
Used in: sceneMesh

sceneMesh : Float

value · line 32
sceneMesh ← box c̲at crystal c̲at floor
Used in: sceneColor

sceneIds : Int

value · line 33
sceneIds ← (12 r̲eshape 1) c̲at (8 r̲eshape 2) c̲at 2 r̲eshape 3
Used in: sceneColor

sceneMaterials : Float

value · line 34
sceneMaterials ← 3 4 r̲eshape 0.8 0.25 0.06 0.1  0.05 0.25 0.85 0.45  0.18 0.2 0.24 0.4
Used in: sceneColor

sceneLight : Float

value · line 35
sceneLight ← 1 6 r̲eshape -3.0 5.0 3.0  220.0 200.0 170.0
Used in: sceneColor

sceneCamera : Float

value · line 36
sceneCamera ← 3.0 2.0 5.0  -0.1 -0.1 0.0  0.0 1.0 0.0 0.62

size : Int

value · line 37
size ← 32 24

sceneOrigins : Float

value · line 39
sceneOrigins ← sceneCamera ʳᵗo̲rigins '× r̲/ size
Used in: sceneColor

sceneDirections : Float

value · line 40
sceneDirections ← ((sceneCamera ʳᵗr̲ays size) r̲ange '× r̲/ size)
Used in: sceneColor

sceneColor : Float

value · line 41
sceneColor ← (((((((clip ʳᵗr̲ender sceneMesh) sceneIds) sceneMaterials) sceneLight) environment) sceneOrigins) sceneDirections)
Used in: picture

picture : Char

value · line 43
picture ← size ʳᵗs̲how! 1.5 ʳᵗs̲rgb sceneColor