title: How do I initialize the t-variables in "A Fast Voxel Traversal Algorithm for Ray Tracing"?
body: <p>I am trying to implement the algorithm explained on this paper, used to traverse grid cells in order following a straight line, which is useful for ray tracing:</p>
  
  <p><a href="http://www.cse.yorku.ca/~amana/research/grid.pdf">http://www.cse.yorku.ca/~amana/research/grid.pdf</a></p>
  
  <p>The paper describes the algorithm as two parts: initialisation and iterative traversal. I can undersand the iterative traversal part, but I'm having trouble understanding how some of the variables in the initialisation part are calculated.</p>
  
  <p>I need help initialising <code>tMaxX</code>, <code>tMaxY</code>, <code>tDeltaX</code> &amp; <code>tDeltaY</code>. Their initialisation procedure is explained as follows:</p>
  
  <blockquote>
    <p>Next, we determine the value of t at which the ray crosses the ﬁrst
    vertical voxel boundary and store it in variable tMaxX. We perform a
    similar computation in y and store the result in tMaxY. The minimum of
    these two values will indicate how much we can travel along the ray
    and still remain in the current voxel.</p>
    
    <p>Finally, we compute tDeltaX and tDeltaY. TDeltaX indicates how far
    along the ray we must move (in units of t) for the horizontal
    component of such a movement to equal the width of a voxel. Similarly,
    store in tDeltaY the amount of movement along the ray which has a
    vertical component equal to the height of a voxel.</p>
  </blockquote>
  
  <p>I'm not able to deduce the code I need form the English description given above. Can someone translate it to a math/pseudocode expression for me?</p>