Calculating the Distance Between Points in Wrap Around (Toroidal) Space
blog.demofox.org
blog.demofox.org
In the 2d example in the post, you would rescale the coordinates so the unit cell is from (-pi,pi) in both dimensions, and then the distance formula would be
sqrt(((cos(x1) - cos(x2))**2 + ((sin(x1) - sin(x1))**2 + ((cos(y1) - cos(y2))**2 + ((sin(y1) - sin(y1))**2)
This works well for doing things like determining the "nearest" point to another point, and similar operations, and has some other nice properties.(I forget the name of this system, but it is commonly used for calculations involving dihedral angles in MD simulations)
Folks who use this kind of distance measure might note that it also works well as a metric between angles (i.e. rotations) or between points on the projective line. For instance, see https://www.youtube.com/watch?v=oJAn--vsAzc (unfortunately not too self-contained a source)
x2 = 0
x1-x2 = 0.9 => -0.4
I don't see how this works.
-0.4 + 0.5 => 0.1Mathematically, you'd say that a sphere is simply connected and hence is its own universal cover and hence is not the quotient of a plane. Meanwhile, the universal cover of a torus is a plane and the fundamental domain of that covering can always be taken to be a parallelogram. The study of all possible such parallelograms is the standard example of a Teichmuller space [1] which is well-known recently due to both the use of the idea in "inter-universal Teichmuller theory" developed for the famous ABC conjecture work in 2012 as well as for being the subject of study of a winner of the most recent Fields medal [2] who is especially notable for being the first female recipient and was in the news again recently sadly for having died of cancer at a young age.
[1] https://en.wikipedia.org/wiki/Teichm%C3%BCller_space [2] https://en.wikipedia.org/wiki/Maryam_Mirzakhani
Sperical wraparound can be viewed as a disk with it's perimeter identified to a point.
Maybe I'm just missing something obvious in the discussion here? Also, how is Teichmüller Theory relevant? Is there some deep insight I'm just missing?
Teichmuller theory isn't actually important here, just a connection to a piece of mathematics that's been in the news.
The discussion just says "torus" leaving everyone to infer what category we are working in. It seems like people are inferring different things, and that's what confused me.
I'm not super familiar with homotopy theory but do know that universal covers pull back a lot of nice structure from the base space. Is there a theorem that makes this precise?
Anyway, since the original article here discusses distances, I'd have thought that we'd be wanting to hold ourselves to isometries or something, which universal covers usually aren't, e.g. R^2/Z^2 isn't isometric to a doughnut.
Yeah coverings can't be isometries (unless they're trivial), but they can always be local isometries which is what we'd most likely want here. R^2/Z^2 is (isometric to) a flat torus, which is, I'd argue, the nicest (though not the tastiest) torus. (Though the question of which flat torus is nicest is another matter and many would say it's not the torus that comes from the square!)
I don't know of any general statement for you about what pulls back by coverings but in general anything you can describe as "local" pulls back. That's pretty vague though, sorry!
However, the sections on a torus are not always parallelograms. Take your donut and lay it on the table. It has an equator of sorts where the oil didn't cook it as dark. Imagine little rectangles around the donut, long sides resting on this outer equator, short sides touching adjacent rectangles. We continue stacking rectangles over the donut and toward the inner equator. If we maintain the same number of rectangles circling around the central axis (the one that passes through the center, perpendicular to the equatorial plane, but never intersects the donut), then the long sides of the rectangles must get shorter as we approach the inner equator. If we look at one of these rectangles, we can see that the long side toward the outer equator is longer than the side toward the inner equator. And that the short sides are no longer parallel. Thus, these sections are not parallelograms.
Nonetheless, you're right that the domains don't always have to be parallelograms. Each covering has a parallelogram domain but in general coverings have an infinite number of possible domains. They satisfy some conditions though: essentially they're a parallelogram where the edges don't have to be straight lines so long as the left and the right edges (and the top and bottom edges) are the same curve just translated. So generally the parallelogram domain is easiest to work with (and in fact there are multiple parallelogram domains you can choose so one usually chooses the one with the smallest edge lengths).
The post says that for a torus, which is a product space of two (or more?) circles, we can analyze the the distance "along each circle" from a shared origin for a chosen basis. One circle is our "x" and the other is our "y". (Contrast with a plane and two lines.)
This seems reasonable if the objects we're looking to measure our distance to are expressed in terms of those circles as well, since this allows us to simply put a measure on each circle and get a distance formula for any two points that behaves the way we would like.
A torus is a circle and a circle. One circle goes from the outside to the inside and back around, and the other goes around the outside, if we're talking about a donut. We can see that any point on the surface of the donut is some combination of "go around the outside" and "walk around towards the center". You can also imagine taking a cylinder and bending it around to make a torus -- this changes the 'height' line into a second circle.
We're talking about the product space, so what that means is you can describe the space by (two) coordinates, one drawn from each "shape" (actually, manifold). A "torus" then differs from a "plane" in that you can wrap around in the x-direction and wrap around in the y-direction, independently, since the x-direction on a torus is a circle instead of a line and the y-direction on a torus is a circle instead of a line. By contrast, a cylinder you can only wrap around one way, because you can only wrap in the direction that has a circle for its coordinate space.
in your interpretation, the red circle moving to the boundary would look like this https://cdn.pixabay.com/photo/2013/03/08/05/53/frame-91452_9...
Instead, look at how the arrow types match here: https://upload.wikimedia.org/wikipedia/commons/3/37/Projecti...
the side you choose to glue first matters (compare before/after) https://upload.wikimedia.org/wikipedia/commons/b/ba/Inside-o...
and the orientation of the arrows https://upload.wikimedia.org/wikipedia/commons/6/64/Klein_Bo... also matters https://upload.wikimedia.org/wikipedia/commons/5/5c/Klein_bo...
In the surface of a real donut you have a lot of problems due to the curvature and the different sizes, so the calculation is very complicated. For example, in a real donut the circle at the top and at the bottom of the donut have different length that the two circles at the equator. In the torus in this page all the horizontal circles have the same length.
This is a magical torus, where all the horizontal and vertical circles have the same length. It also has no Gaussian curvature. You can't construct one of this magical torus as a surface in the 3D space, but you can construct one as a surface in the 4D space.
But, is this construction injective? I.E. do the little waves not produce any fake crossings in the surface?
IIRC from my Differential Geometry classes, immersions and embeddings are more general that I expected, and they include some strange cases. I don't remember the details, but looking at the Wikipedia page they include the embedding of the Klein bottle in R^3.
Klein bottles can't be embedded into R^3.
1.0 % 5.0 = 1.0
6.0 % 5.0 = 1.0
7.0 % 5.0 = 2.0
7.4 % 5.0 = 2.4
7.4 % 1.0 = 0.4
With that in place, the torodial distance becomes a one-liner without any case distinctions (i.e. without ifs).They are a part of modern (and not-so-modern) programming languages (% in Python, Rust, etc.). Even C from quarter of a century ago supports them (fmod). There are also at least two CPU instructions on x86, fprem and fprem1.