debug pixel: x = 350; y = 250 cast ray: end = 0 1 4; dir = 0.0665729 -0.219699 -0.973293 torus polynomial coefficients = ( 322.248 -293.708 102.541 -16.3183 1 ) torus polynomial complex roots = ( 4.0405 + 1.67497 i , 4.0405 + -1.67497 i , 4.46413 + 0 i , 3.77322 + 0 i ) intersect test with obj[0]: hits = { {obj[0], 3.77322, false}, {obj[0], 4.46413, true} } torus polynomial coefficients = ( 262.248 -268.604 101.136 -16.5846 1 ) torus polynomial complex roots = ( 2.93449 + 0 i , 3.47006 + 0 i , 4.69678 + 0 i , 5.48331 + 0 i ) intersect test with obj[1]: hits = { {obj[1], 2.93449, false}, {obj[1], 3.47006, true}, {obj[1], 4.69678, false}, {obj[1], 5.48331, true} } closest intersection: return = obj[1]; hit = {obj[1], 2.93449, false} call Shade_Surface with: location = 0.195357 0.355295 1.14388; normal = -0.118224 0.888237 0.443913 ambient = 0.06 0.06 0.24 torus polynomial coefficients = ( -5.60441e-13 3.65492 6.1305 2.84688 1 ) torus polynomial complex roots = ( 1.53322e-13 + 0 i , -0.817351 + 0 i , -1.01476 + 1.85524 i , -1.01476 + -1.85524 i ) intersect test with obj[1]: hits = { {obj[1], 0, false}, {obj[1], 1.53322e-13, true} } closest intersection: none light 0 visible; no object on ray. shading for light 0: diffuse = 0.0292965 0.0292965 0.117186; specular = 1.13451e-07 1.13451e-07 1.13451e-07 torus polynomial coefficients = ( 5.16877 -6.06064 3.10153 -0.667707 1 ) torus polynomial complex roots = ( -0.598979 + 1.92515 i , -0.598979 + -1.92515 i , 0.932833 + 0.633531 i , 0.932833 + -0.633531 i ) intersect test with obj[0]: hits = { } torus polynomial coefficients = ( -5.60441e-13 1.08443 3.92145 -2.31092 1 ) torus polynomial complex roots = ( 5.16837e-13 + 0 i , -0.239299 + 0 i , 1.27511 + 1.70464 i , 1.27511 + -1.70464 i ) intersect test with obj[1]: hits = { {obj[1], 0, false}, {obj[1], 5.16837e-13, true} } closest intersection: none light 1 visible; no object on ray. shading for light 1: diffuse = 0.00977511 0.00977511 0.0391004; specular = 1.75825e-05 1.75825e-05 1.75825e-05 final color 0.0990893 0.0990893 0.396304