
26 2. Basic theory and mathematical results
practice a triangle where this happen s can be ignored because if one of its
sides has zero length, it has zero area and will therefore not be visible in a
rendered image.
3. Retur n hit code as follows:
i f ( α < −0.001 or α > 1.0 0 1 or
β < −0.001 or β > 1.001 ) miss polyg o n
i f ( (α + β) > 1.001) miss polygon b eyond edge P
1
→ P
2
i f ( α ≥ 0.0005 and α ≤ 0.9995
and β ≥ 0.0005 and β ≤ 0.9 9 9 5
and (α + β) ≤ 0.9995) inside polygon
e ls e i f (α < 0.0005) {
along edge P
0
→ P
1
i f ( β < 0.0005 ) at vertex P
0
e ls e ( i f β > 0.9995) at vertex P
1
e ls e On edge P
0
→ P
1
not near vertex
}
e ls e i f (β < 0.0005) {
along ...