line intersection points on a toroid

Started by
1 comment, last by Devnull 18 years, 6 months ago
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?
How''s my programming? Call 1-800-DEV-NULLwww.devnullsoftware.com
Advertisement
In a repeating world like that you need to watch out, because lines can intersect an infinite number of times.
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.
How''s my programming? Call 1-800-DEV-NULLwww.devnullsoftware.com

This topic is closed to new replies.

Advertisement