Question: Geodesics on cube

Hello everybody! I want to build closed geodesic on a cube. I know how to determine the next face, but I do not know how to determine which edge and in what proportion the geodesic will cross.

Here is NET for geodesic on cube. Geodesic type (3,9). Yes, 3 and 9 is not relative prime, but geodesic (1,3) not closed. 
  

Or did I choose the wrong way to solve the problem? Help pls. Thanks.

Please Wait...