• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.
  • We, the systems administration staff, apologize for this unexpected outage of the boards. We have resolved the root cause of the problem and there should be no further disruptions.

Making big PDF maps

Originally posted by robject:
I don't suppose you'd like to collaborate with the map gen stuff? I've wanted to do borders but just don't know the PS to do it. The algorithm seems fairly straightforward, at least to a first approximation -- if a neighbor is of a different allegiance, draw or emphasize the border, right? And map allegience codes to border colors...
We could certainly share some of the effort, and I'd be happy to streamline your PostScript a bit; the output could be a lot smaller and easier to tweak with a bit of work.

On my side, I'm in the middle of creating a comprehensive configuration system for customizing the layout of the map, and most of that code would be directly applicable to your version (the PS and PDF drawing models are substantially identical, except for the availability of programming constructs in PS).

Oh, and thanks for the amber and red zones, although red is being drawn as a complete circle, overlapping the system name. It's always something, isn't it?


To draw regional borders (as opposed to generating them based on the data, or generating complete allegiances based on the distribution of UWPs on a map, which both have the potential to be fun), what I'm doing is adding a new keyword to my metadata file that lists all of the hexes along the outside edge of a connected region, in a specific order (starting in the lowest-numbered column, select the lowest-numbered hex, then go clockwise around the region, recording each hex once, until you're back to the start). To allow regions to appear to cross sector boundaries, the range is extended to 0000-3341, which count as inside but don't print (in fact you can just set a clipping region around the map edge to keep the code simple).

So, "region 0305 0404 0504 0503 0603 0604 0605 0606 0507 0406 0405 red" describes a region containing thirteen hexes, with a red border.

-j
 
I read C well enough, although nroute dumps core on my OS X and OpenBSD machines, so it's hard to tinker with it and figure out what it's doing. I've looked at his map output before, though, and My Eyes Glaze Over pretty quickly. IMHO, his Spinward Marches map is utterly incomprehensible, especially the region borders.

I think that map is the best possible argument for being able to turn routes and borders off when printing.

-j
 
Check out some of the other non-Imperial or frontier sectors for an idea of the borders there. Delphi Sector is a good example, as there are rifts that help bring the Imperial borders out.

From what I recall, the app automatically plots out borders at two parsecs away if no other worlds are located, or closer if a world closer has a different allegiance code.

It looks good in the big picture, anyway.

-Flynn
 
Looking at Delphi, it's clearer what bothers me about his method. Everything has a region border, even if it's a single system in open space with another allied system two parsecs away. The lower-right corner subsector is filled with individually-bordered Cs systems.

A human being could take a pen to the map and produce a single large region that covered all of them. It would be a very irregular shape, but it would be a lot cleaner and more useful.

One of my side projects is a script to automatically generate such regions. My working plan is to create a 32x40 array, fill in the allegiance data, sort the list of occupied hexes by starport code and population, and then loop over them in order, claiming all empty hexes within N parsecs (tentatively, A claims 3 parsecs, B claims 2, C claims 1, D-X claim none). You could then make one or more passes across the remaining empty hexes to see if they are between two or more hexes of the same allegiance, and add them to it, to avoid gratuitous holes in large regions.

With that done, you should be able to loop over the array and find all hexes that are adjacent to a blank or differently-allied hex. That's where you draw your borders.

-j
 
That's a very cool idea. It's got a bit of the cellular-automaton feel to it, which I've always liked. Actually, a CA would be a good fit for this type of job:

Until no unclaimed hexes:
For each unclaimed hex:
allegience = most significant presence in neighbors

On the first pass, empty hexes neighboring occupied hexes will be assigned. Ties will be broken randomly. On the second pass, all hexes once removed will be assigned. If there are more passes, then the stragglers will be scooped up.
 
Yes, like many a geek, I cut my teeth on Martin Gardner's old SciAm columns, so I often use the CA model to generate "stuff". I've been thinking about taking the same approach for UWP generation, seeding a sector with random values and applying a ruleset to evolve the societies and spread out their influence (so that pre-industrial worlds grow based on planetary resources, pre-Jump worlds grow based on in-system resources, Jump-1 slowly spread influence to neighbors, etc); this sort of code is a lot easier to write if you have a convenient way to generate sector maps that show how well your rules are working...

For creating allegiances, I think that if I ran it until there were no unclaimed hexes, I'd add a pass at the end to destroy most of the smallest and/or sparsest allegiances (defined by the ratio of non-empty hexes to area), as well as one to unclaim empty hexes more than N parsecs from a starport. Those should reduce the clutter and leave room for printing region names.

-j
 
Originally posted by J Greely:
A human being could take a pen to the map and produce a single large region that covered all of them. It would be a very irregular shape, but it would be a lot cleaner and more useful.
Traveller Universe allows the user to do just that, and then generate a printout of it.
 
Good idea!

It's done. Amber zones are half the thickness (quite thin), and red zones aren't full circles anymore, by the way.
 
robject,

Are these changes to your script? If so, I'd like to get my hands on an updated copy of it.


Thanks in advance,
Flynn
 
Yes, and there are a couple more changes planned. For now, though, you can fetch the most recent version at

http://24.1.3.180/tas/webps.txt

Note the extension is for you to be able to grab the source; to run it as a CGI script, it should be 'cgi'.
 
If anyone's interested, my sector-to-PDF script has been updated with xboat/trade route support and vastly-improved layout customization, and I've added a sample metadata file for Spinward Marches that shows how to use them. Everything's here.

Next up: regions, both bordered and filled. That might take a while to get right...

-j
 
Mr. Greely, you've got the goods. My preference is to generate PDF directly; when time permits, I will be stealing vast portions of your code.

We shall form the uber-script from which all others cower in fear. Etc etc.
 
Originally posted by J Greely:

For creating allegiances, I think that if I ran it until there were no unclaimed hexes, I'd add a pass at the end to destroy most of the smallest and/or sparsest allegiances (defined by the ratio of non-empty hexes to area), as well as one to unclaim empty hexes more than N parsecs from a starport. Those should reduce the clutter and leave room for printing region names.

-j
Or better, use a temporary hash to store territory-markers ("allegiances") in.
 
Okay, this is a one-off, but it's amusing. I took the output for all four sectors in Gateway Domain and merged them onto one page as a seamless map.

At some point I'll integrate this into the main script, but for now it's an Illustrator hack, and strictly for on-screen use. The text would be completely unreadable on any normal paper size.

-j
 
Originally posted by J Greely:

At some point I'll integrate this into the main script, but for now it's an Illustrator hack, and strictly for on-screen use. The text would be completely unreadable on any normal paper size.

-j
Wow nice. Lucky for me I have access to a plotter at work!
 
Back
Top