Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Mar 2011 14:12 Edited at: 8th Mar 2011 14:30
Hi,
Anyone fancy a challenge? I have a problem that I can't solve and don't even know if it is possible.

I have a toroidal world (a square that wraps in both x and y). The size if the world is a known constant (in this case 900x900 units).
I want to determine four points within the world that are of equal distance to all other points.

My initial idea was to divide the world into four equal quadrants (half in X and half in Y) then place the point in the centre of each quadrant. That works for two of the other points but the one diagonal opposite is further away.


Above you can see that red is equal distance from blue in all directions but further from magenta.

So, is it possible to place four points in a wrapable square that are of equal distance to all of the other points?

If so ... how?

Thanks

Van B
Moderator
23
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 8th Mar 2011 14:39
I don't think it can be done with a square, only a triangle. What do you need it for? - maybe the problem has an alternative solution, or maybe the solution works for an alternative problem. What do you need to split the terrain into quadrants for?, and why does each middle quadrant need to be equidistant?

Health, Ammo, and bacon and eggs!
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Mar 2011 15:20
Quote: "What do you need it for?"

I'm writing a tribal simulator and each village needs to be equally distant from each other village.

Quote: "What do you need to split the terrain into quadrants for?"

I don't. That was just an initial idea that proved incorrect.

Quote: "and why does each middle quadrant need to be equidistant?"

It doesn't - it's just the points that need to be equidistant.

HowDo
23
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 8th Mar 2011 18:00
would Van B triangle idea work if all the points of the triangle are were the red dot is.

eg ><

just a thought

Dark Physics makes any hot drink go cold.
Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Mar 2011 18:01 Edited at: 8th Mar 2011 18:05
Equidistant "as the crow flies" or equidistant by road or path? Is putting the villages at different altitudes an option?

If the villages are equidistant by path then you could have as many villages as you like positioned at the ends of "spokes" (as in a wheel) and the path between any two villages would pass through the centre of the wheel and could be the same for all pairs of villages.

Edit I should add that I didn't understand what you meant by "I have a toroidal world (a square that wraps in both x and y)." so I could have completely misunderstood what you are trying to do.
Scraggle
Moderator
23
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 8th Mar 2011 19:03 Edited at: 8th Mar 2011 19:04
Quote: "I didn't understand what you meant by "I have a toroidal world"

Consider the blue dot in the top right. It is the same distance from the red dot to the left of it as it is to the same red dot to the right and wrapping around the world. The same applies in the Y axis.

Quote: "would Van B triangle idea work if all the points of the triangle are were the red dot is."

No, because it is a toroidal world.

Green Gandalf
VIP Member
21
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 8th Mar 2011 22:38
Thanks. I get it now. A bit like a seamless texture I suppose.

Login to post a reply

Server time is: 2026-07-14 22:23:50
Your offset time is: 2026-07-14 22:23:50