First some background and motivation.
I recently came across a YouTube video where the creator tried to calculate the effects of portals on the gravitational field (although electrostatics should work the same way). In 2D, portals are pairs of line segments which are identified; if you touch one line segment you come out of the corresponding point on the other line segment.
The video creator tried to solve this by assuming that the potential is unique and continuous through portals, and then used FEM to solve Poisson's equation with the appropriate FEM edges identified. I didn't agree with this, since the potential is not really a physical quantity, and one should probably work with the force field directly. Since then I have become somewhat obsessed with this problem.
In 2D, we can phrase this as a complex analysis problem. Away from masses, the force field is an antiholomorphic functions and point masses correspond to poles $-1/\overline{z}$.
As a specific example, consider the following setup where the portals are the line segments $(1 - i, 1 + i)$ and $(-1 - i, -1 + i)$. A point mass is placed at $2i$:
In this case, the field lines have to "straighten" next to the portal by symmetry (if you are right next to the portal you see equal masses both to the left and to the right). I will describe how I generated the image later.
I believe the force field should be a multivalued antimeromorphic function. The above image shows the "principal branch" $f_0(z)$, with branch cuts on each portal. If we walk through the portal on the right, we get on a branch $f_1(z)$ that looks like the old one except shifted. We can keep walking through portals to get to $f_n(z)$ for any $n \in \mathbb{Z}$. Crucially, we have
$$f_{n+1}(z) = f_n (z-2)$$
So different branches are related by a translation of the argument, which I have not seen before. For other setups, the transform could involve e.g. a rotation or even a scaling.
My questions are: Do nontrivial examples of such functions actually exist, have they been studied, and can we construct them given some conditions (like poles / masses at specific points)?
In particular, the functions should go to zero for large $|z|$ on each individual branch, so periodic functions don't count.
I generated the image by assuming that I can expand the portal's disturbance in the field using a set of basis functions. After some effort I came up with ${}_2 F_1(1, k + 1/2, k + 1, 1 / z^2) / z$ and ${}_2 F_1(1, k + 1/2, k + 1, 1 / z^2) / z^2$, which decay for large $|z|$ and are comparatively benign near their branch cuts. I place basis functions at each portal and then numerically solve for the coefficients by trying to match the fields across the portals.
At least visually this seems to work, but isn't well-motivated. In particular, I don't know if this expansion can (in the limit) reproduce the real analytic structure, including the poles from the point mass. My knowledge of complex analysis is mostly limited to what comes up in physics.
Edit: To be more specific about the numerical procedure, for the above setup I write $$ f_{0} (z) = \frac{-1}{\overline{z} + 2i} + l(z) + r(z) $$ The first term is the point mass and the other terms are the contributions from the left and right portals, which are sums of scaled and shifted basis functions (with branch cuts along the respective portal lines). I solve for the coefficients in $l$ and $r$ by requiring $$f_0(1 - \epsilon + i y) = f_0(-1 + \epsilon + i y)$$ for $\epsilon \to 0$ and $y \in (-1, 1)$, so that the field is continuous across the portals.
I apologize, I see now that what I wrote was probably incomprehensible to anyone except myself.
– 4177318477 Dec 28 '25 at 21:59In general one wouldn't expect potential to be conservative even across branch cuts, (it's easy to imagine how to use portals to create infinite energy machines). In general you can still look for a multivalued potential function. A symmetry argument might show that in the example in your diagram, it's still single-valued.
– Michael Hartley Dec 30 '25 at 01:37