Ray Tracing thru a Complex

Some early code with which the even earlier text below should be reconciled.

There are several reasons to compute geodesics; they are simple and they may support graphic output. My code now extends a geodesic in its current direction thru zones, in distinction to finding the shortest path between two points in the complex, which may be difficult. The geometry in a zone is flat and when the geodesic comes to the zone’s edge, we hand the geodesic thru the facet to the neighboring zone.

For a geodesic to cross over to a new zone, we determine the facet from which the geodesic will depart the current zone, deliver to that facet the location of the intersection of the geodesic with that facet, and also the vector guiding the geodesic. We need to keep the ‘velocity’ of the geodesic, which is coded as the magnitude of its vector, because physics cares.

There is the niggling issue of how to code the bcc facet coordinates. I assume that the facet is unaware of its relationship to either of the zones it connects. In the logic of the boundary computing code routine sl elides a vertex number of a zone to depict the facet— [3; 4; 5; 6; 7] becomes [3; 4; 6; 7]. That plan causes alternating orientation in the yield of sl which is a source of confusion. A slightly easier and faster plan may be to move the last coordinate of the zone’s bcc to the position that is zero by virtue of the point lying on the facet. Thus the point whose zone bcc is [|.21; .22; 0.; .24; .33|] is given facet bcc [|.21; .22; .33; .24|]. Note that I speak here as if we carry n+1 coordinates, which sum to 1, for each n-simplex bcc.

The facet thus takes a point designation in the form of an array of n non-negative floats that sum to 1. It will permute these to suit the vertex numbering plan of the next zone.

When a (p, q) tensor of covariant order p and contravariant order q is passed to the facet in the form of a p+q dimensional array of floats, then coordinate permutation is subsumed in the construction of the transformation matrix. A scalar is a (0, 0) tensor.

To bootstrap the facet we modify a variation of the boundary calculator to produce a zone which has a reference to each of its n+1 facets each of which has a reference to its two zones.