This is a note on a particular test case: the 2D boundary of the regular 3D tetrahedron. I think that the Jog interface is concise, elegant and efficient; alas it is also confusing; indeed I write this because I am now confused.
top provides the topology. The complex is the boundary and zones are the simplexes that compose the boundary. The tetrahedron has 4 vertices and the zones are each a triangle with 3 of those vertices and each of the 4 subsets of three vertices indeed spans a zone. The zones must be given with correct orientation; if facet 0, 1 appears in cyclic order in one zone, then it must appear in just one other zone in the opposite order.
The 3rd argument to morphgen is [([0; 1], (nop, u)); ([1; 2], (v, v))] which installs taps at two facets, [0; 1] and [1; 2]. The tap u inaugurates the ray. (fun t -> ini := t; t) is called just once during morphogenesis at which time the reference ini gets a copy of the functions which introduces signals into zone [0; 1; 3] thru facet [0; 1]. These functions cannot be safely called until morphogenesis is finished whereupon the captured ray function is invoked (!ini).ray 0.0 ([|0.5|], [|0.5; (sqrt 3.) /. 2.|]) to launch the ray in the middle of the facet. The ray stops after its parameter reaches 1024.
Tap v is installed to report rays crossing facet [0; 2] in either direction. The latter tap reports a closed geodesic of the tetrahedron of length 2. To visualize this geodesic imagine a regular tetrahedron, edge length = 1, balanced on an edge, [0; 2], and then water coming up just half way to the top. The water line will be a square with sides of length 1/2. This is just the geodesic that our program computes. The geodesic continues to circulate and control-C is necessary to stop the calculation.