I need some help.
A while ago I created this
for alliance use. We left the alliance so it is no longer classified, besides, all the info used is public.
What I hate about it is that GD is bad at anti-aliasing and SVG didn't work for everyone.
I'd like to take it one step further and make it completely dynamic so it will work "out-of-the-box" for any region. The problem is I need an algorithm to arrange the systems nicely (so jumps don't intersect) and also generate the constellation zones. The current version uses a png mask to hide the ugly region zones shapes. All the systems are also placed manually and it was a very time-consuming task and I will not do it again for all the regions :)
So, I want the next version to be able to auto-generate any region with nice, non-intersecting jumps, nice the constellation shapes (i was thinking of tangents to circles with the centers in each system) and auto-picking a color for all the alliances in those regions (this is the easiest part). Also, I want to use MySQL this time to make it run faster and be more flexible.
Question 1: What would be the best way to transform the coordinated in the DB dump to be used with GD/SVG (no negative coordinates)?
Question 2: Is there an algorithm that can place the systems in such a way that the links/jumps don't interesect while still keeping them as much as possible near their original position (the map you seen has them mixed together pretty wildly)
Question 3: Is there a good algorithm to generate the constellation shapes?
PS: If anyone wants the code I can provide it but you will have to spend a long time to make it work for any other region (new png mask, place all systems).