I am trying to implement this algorithm but am not sure how I am supposed to represent my ray and my line segments(walls).
For the r_px/r_py do I just use the position of the light? For the r_dx/r_dy do I just use the normalized vector pointing from the light position to the direction of the ray?
For the s_px/s_py do I just use the location of one of the two points of the line segment. Finally for the s_dx/s_dy do I just use the normalized vector pointing from the first point, to the second point?
Thanks!
0<T2<1. Doesn't that mean that if the vector is normalized it will only check for intersection on a minuscule portion of the line/wall. Am I right in the statement that it stays normalized for the ray as it is0<T1and not clamped to 1? Thanks! \$\endgroup\$