# line intersection points on a toroid

This topic is 4695 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Given a toroidal (or "doughnut") world and lines that can go around it in any direction, how can intersection points of multiple lines be calculated? Because the world is essentially a flat plane except at the edges, can the line intersections just be calculated the same as a flat surface? Will that catch all the intersection points?

##### Share on other sites
In a repeating world like that you need to watch out, because lines can intersect an infinite number of times.

##### Share on other sites
I can see how the line wrapping around can make multiple intersections possible. Eventually the line will meet with itself though and thus become a "diameter" or circle around the toroidal globe. But viewing the toroid as a plane, the line essentially becomes a number of parallel line segments with a specific distance between each one.

Given more than one such line, I'm interested in finding out all the intersection points. The idea I'm working with is a world with ley lines. THe intersections of the ley lines become nodes of power. The only problem is that for various other reasons (mainly simplicity in other areas), the world is a toroid.

I realize that it would likely be much simpler and easier to just assign random nodes on the world, and it's likely that's exactly what I'll end up doing. But, I'm also interested in the problem itself simply because it's "interesting".

I'm sure there's some mathematician out there who's thought of this problem before and there's likely pages of gobbledygook filled with strange symbology and equations I could look up, but I'm not that interested in the proofs and translation of symbols into code. I'm mainly interested in finding a way to do this in code and seeing if there actually is a way that can compete in efficiency with simple random placements.

1. 1
2. 2
3. 3
frob
13
4. 4
5. 5

• 9
• 13
• 14
• 67
• 14
• ### Forum Statistics

• Total Topics
632132
• Total Posts
3004299

×