
Find a torus base point via the maximal-gap method.
Source:R/manifold-torus.R
auto_base_point_torus.RdFor the flat torus \(T^d\) with base point p, the cut locus is
cut(p) = {q : (q_j - p_j) mod 1 = 0.5 for some j}. A sample
point q is on the cut locus iff p_j = (q_j - 0.5) mod 1
for some coordinate j. To make the cut locus disjoint from the
sample, the function chooses, independently for each coordinate j, a
value p_j that is not equal to any of the forbidden values
(q_ij - 0.5) mod 1, i.e., a point in the largest circular gap
of the forbidden set. This yields a base point with zero cut-locus
overlap (up to floating-point tolerance) by construction, rather than
by search, but it is not centered on the data in any other sense.