# 2010-05-20 Updated Traveller Mapping

Difference between revision 7 and current revision

Summary: $\[tag:map$\] -> [[tag:Maps]]

No diff available.

My SVG Mapper for Traveller got a bit better regarding communication routes (at least compared to last time).

It uses a two-step process:

1. it connects all the systems with a class A starport, a naval base, or an imperial consulate that are one or two parsecs from each other
2. any system with an amber or red travel code will eliminate all connections except the ones to the best and closest starport

I’m still working on the trade routes. At the moment it looks way too busy, so I’m trying to think of an elimination step that will get rid of some of them again. Anyway, I have some working code, but it needs some improvement before I’ll deploy.

I also fixed the spinward/trailing labels. I had them confused!

Note for the curious: If you check the link you’ll also find a source link at the bottom. It’s Free Software. Enjoy!

1. considering only systems that offer fuel: starport A-D, gas giant, or Wa trade code
2. connecting trade codes In or Ht with As, De, IC, or NI within 4 parsecs using a jump-2 route
3. connecting trade codes Hi or Ri with Ag, Ga, or Wa within 4 parsecs using a jump-2 route
4. but in the end, when I have the trade graph (which is part of the SVG but invisible in case you want to look at it using Inkscape), I use Kruskal's algorithm to create a minimal spanning tree based on the subset of legal trade routes thanks to a suggestion by Joshua Bell

Later: I suspect that there are still bugs in the system. It generates an unpopular trade route between Labeveri and Sogeeran, but as far as I can tell, there is no reason for it to exist. Must debug… Hm… Nope. Everything is as it should be. If you check the debug output (there’s a new checkbox) you’ll find that the system participates in other trade-routes as well:

• Inedgeus - Biveer - Sogeeran
• Biveer - Sogeeran
• Diare - Aanbi - Sogeeran
• Reisbeon - Aanbi - Sogeeran
• Lara - Aanbi - Sogeeran
• Lalala - Bemaat - Sogeeran
• Azaxe - Lara - Aanbi - Sogeeran
• Biveer - Sogeeran - Onreon
• Labeveri - Sogeeran - Onreon

Phew!

Tags:

Difference between revision 46 and current revision

Summary: http://www.emacswiki.org/alex → https://alexschroeder.ch/wiki

Deleted:

< (*waves from travellermap.com*)
< For automated communication route generation I was pondering trying a [Wikipedia:Euclidean_minimum_spanning_tree minimal spanning tree].
< -- [http://travellermap.com Joshua Bell] 2010-05-24 05:01 UTC
< ----
< … just remember that the maximum node length is 4, since XBoats have Jump-4 drives.
< -- [http://www.google.com/profiles/wagener Harald Wagener] 2010-05-24 09:48 UTC
< ----
< Traveller Map is the best! :)
< Thanks for the excellent suggestion! I'm still calculating the trade routes according to the rules:
< # considering only systems that offer fuel: starport A-D, gas giant, or Wa trade code
< # connecting trade codes In or Ht with As, De, IC, or NI within 4 parsecs using a jump-2 route
< # connecting trade codes Hi or Ri with Ag, Ga, or Wa within 4 parsecs using a jump-2 route
< # but in the end, when I have the trade graph, I use -> Kruskal's algorithm (en) to create a minimal spanning tree based on the subset of legal trade routes
< I'm not quite sure whether I like the result, but it's already good enough to be used, I think.
< I can already see the next problems:
< # I'm not happy with the colors I've picked. Suggestions?
< # I can't used dashed lines -- assume I have four systems A B C D in a line, A connects to C, B connects to D -- the overlapping lines between B and C will result in a mess (not in Inkscape but in Firefox it sucks).
< # Using Bézier curves would be awesome. :)
< # I added a _random_ button which queries the [[UWP Generator]] for a random subsector.
< # I extended the generator such that it accepts a seed value.
< # I extended the mapper such that it adds a link back to the UWP (bottom right corner) if it was randomly generated.
< # I'm not sure I want to start generating Traveller appropriate names [http://eaglestone.pocketempires.com/lang/vilani/vilanigen4.html][http://www.yarranet.net.au/phill/fudge/traveller/wordgen/] -- I'm still happy with the [[http://www.emacswiki.org/alex/2009-09-11_Elite_Names|Elite-like names]] I'm generating.
< # The generator now also has a button to generate a map.
< # The generator also had a bug which I fixed; that bug led to systems with no starport still having bases.
< I announced it on [http://www.travellerrpg.com/CotI/Discuss/showthread.php?t=22247 Citizens of the Imperium].
< -- [[AlexSchroeder]]
< ----
< I like the work you have done ... I only found one small problem which was you limit the law code to 9 ... when in theory it can rise higher than that.
< Because the Law Level code is restricted, any worlds with Law higher than 9 just don't appear on the map. I can see the Regex expression is 0-9 and could be changed to 0-9A-F
< All of that aside I think you did a great job :)
< -- [http://www.bolterandchainsword.com Brennall] 2010-05-31 19:50 UTC
< ----
< Indeed, I looked at the tables on the Imperial Encyclopedia [http://traveller.wikia.com/wiki/Law_level][http://traveller.wikia.com/wiki/Government] and fixed both the [[UWP Generator]] and the [[SVG Mapper for Traveller]].
< -- [[AlexSchroeder]] 2010-05-31 23:41 UTC
< ----
< Alex, I was looking at the SVG you generate, and I noticed the special symbols you used for the Gas Giants etc. When I attempted to save the SVG locally and look at them in an editor it replaced the symbols with "?". Obviously my editor defaulted to the wrong character set, but I am curious what character set you did use which had the emblems in?
< -- [http://www.bolterandchainsword.com Brennall] 2010-06-02 12:29 UTC
< ----
< Its ok .. should have looked further in the extended UTF-8 Character set. Found them now.
< -- [http://www.bolterandchainsword.com Brennall] 2010-06-02 12:44 UTC
< ----
< For future readers looking for help:
< | ◉ |gas giant |[http://www.fileformat.info/info/unicode/char/25C9/index.htm 0x25C9] |FISHEYE
< | ■ |imperial consulate |[http://www.fileformat.info/info/unicode/char/25A0/index.htm 0x25A0] |BLACK SQUARE
< | ☼ |TAS |[http://www.fileformat.info/info/unicode/char/263C/index.htm 0x263C] |WHITE SUN WITH RAYS
< | ▲ |scout base |[http://www.fileformat.info/info/unicode/char/25B2/index.htm 0x25B2] |BLACK UP-POINTING TRIANGLE
< | ★ |navy base |[http://www.fileformat.info/info/unicode/char/2605/index.htm 0x2605] |BLACK STAR
< | π |research base |[http://www.fileformat.info/info/unicode/char/03C0/index.htm 0x03C0] |GREEK SMALL LETTER PI
< | ☠ |pirate base |[http://www.fileformat.info/info/unicode/char/2620/index.htm 0x2620] |SKULL AND CROSSBONES
< | ▮ |communication/trade |[http://www.fileformat.info/info/unicode/char/25AE/index.htm 0x25AE] |BLACK VERTICAL RECTANGLE
< -- [[AlexSchroeder]] 2010-06-02 13:06 UTC
< ----
< Thanks Alex .. Very helpful
< -- [http://www.bolterandchainsword.com Brennall] 2010-06-02 13:36 UTC
< ----
< I am curious Alex ... have considered a method of saving the SVG output from the map ?
< -- [http://www.bolterandchainsword.com Brennall] 2010-06-04 13:41 UTC
< ----
< Uh... What browser are you using? I just hit Ctrl+S and save the SVG file. And since I also have the option of printing to a file, producing a PDF is no problem either.
< In fact, I sometimes update the UWP of my campaign, regenerate the SVG map, save it, and use Inkscape to add the spheres of influence we have. The result:
< At one point the party caused civil war in a system by dropping a tactical nuke on large part of a government. I then assigned a red zone to the system, which caused the major trade routes to shift. Result:
< |= before |= after |
< | note the spheres of influence | but I forgot them here, hehe |
< -- [[AlexSchroeder]] 2010-06-04 14:26 UTC
< ----
< After some quick testing the following results
< * Chrome saves the HTM file by default not the SVG.
< * IE doesnt show the map and tries to save it only.
< * Safari gives the option to save it when doing Save As.
< * Firefox gives the option to save it when doing Save As.
< * Opera gives the option to save it when doing Save As.
< Interesting difference given Chrome and Safari both use Webkit.
< I will have to switch over to Firefox from Chrome to get what I want!
< I will also have to give Inkscape a try as I haven't used it yet.
< Cheers Alex.
< -- [http://www.bolterandchainsword.com Brennall] 2010-06-04 15:03 UTC
< ----
< Yeah, I <3 [[Inkscape]]! :)
< I wasn't aware that browser reactions varied so much. But then again, I was surprised when I learnt that Firefox was going to support SVG in the first place.
< -- [[AlexSchroeder]] 2010-06-04 22:57 UTC
< ----
< [[gravatar: Mark Merrell:e9fd8cc11357b02628ae452f3ec781c5]]
< Great work! I love this program.
< A few quick questions though...
< 1) I'm importing my own UWP codes so that I can make my own sub-sector but I can't seem to get the Amber or Red Zones to show up on my map. I can see them when I do a randomly generated map, but just not my own.
< Here is an example of my UWP code:
< Darkgate 0810 X563401-B Ni G R 124 Ukn
< It shows the: Gas Giant, Research Lab,X Spaceport and name (Darkgate) but no red circle.
< Name
< 2) What UWP code do I use for asteroid belts (to see the circle in the hex)?
< -- Mark Merrell 2011-08-03 01:28 UTC
< ----
< [[gravatar: Mark Merrell:e9fd8cc11357b02628ae452f3ec781c5]]
< Nevermind, I figured it out. I had extraneous info in my UWP line.
< Also, figured out the grey circle is in fact the amber zone.
< I learned something today!
< Again, thanks for the program!
< -- Mark Merrell 2011-08-03 01:35 UTC
< ----
< [[gravatar: AlexSchroeder:e33b88db6bc04e1c93db25c702baea28]]
< Heh, excellent. No idea regarding the asteroid belts – those didn't show up in my Mongoose Traveller book. :)
< -- [[AlexSchroeder]] 2011-08-03 08:26 UTC

(waves from travellermap.com)

For automated communication route generation I was pondering trying a minimal spanning tree.

Joshua Bell 2010-05-24 05:01 UTC

… just remember that the maximum node length is 4, since XBoats have Jump-4 drives.

Harald Wagener 2010-05-24 09:48 UTC

Traveller Map is the best!

Thanks for the excellent suggestion! I’m still calculating the trade routes according to the rules:

1. considering only systems that offer fuel: starport A-D, gas giant, or Wa trade code
2. connecting trade codes In or Ht with As, De, IC, or NI within 4 parsecs using a jump-2 route
3. connecting trade codes Hi or Ri with Ag, Ga, or Wa within 4 parsecs using a jump-2 route
4. but in the end, when I have the trade graph, I use Kruskal's algorithm to create a minimal spanning tree based on the subset of legal trade routes

I’m not quite sure whether I like the result, but it’s already good enough to be used, I think.

I can already see the next problems:

1. I’m not happy with the colors I’ve picked. Suggestions?
2. I can’t used dashed lines – assume I have four systems A B C D in a line, A connects to C, B connects to D – the overlapping lines between B and C will result in a mess (not in Inkscape but in Firefox it sucks).
3. Using Bézier curves would be awesome.
4. I added a random button which queries the UWP Generator for a random subsector.
5. I extended the generator such that it accepts a seed value.
6. I extended the mapper such that it adds a link back to the UWP (bottom right corner) if it was randomly generated.
7. I’m not sure I want to start generating Traveller appropriate names [1][2] – I’m still happy with the Elite-like names I’m generating.
8. The generator now also has a button to generate a map.
9. The generator also had a bug which I fixed; that bug led to systems with no starport still having bases.

I announced it on Citizens of the Imperium.

I like the work you have done … I only found one small problem which was you limit the law code to 9 … when in theory it can rise higher than that.

Because the Law Level code is restricted, any worlds with Law higher than 9 just don’t appear on the map. I can see the Regex expression is 0-9 and could be changed to 0-9A-F

All of that aside I think you did a great job

Brennall 2010-05-31 19:50 UTC

Indeed, I looked at the tables on the Imperial Encyclopedia [3][4] and fixed both the UWP Generator and the SVG Mapper for Traveller.

AlexSchroeder 2010-05-31 23:41 UTC

Alex, I was looking at the SVG you generate, and I noticed the special symbols you used for the Gas Giants etc. When I attempted to save the SVG locally and look at them in an editor it replaced the symbols with “?”. Obviously my editor defaulted to the wrong character set, but I am curious what character set you did use which had the emblems in?

Brennall 2010-06-02 12:29 UTC

Its ok .. should have looked further in the extended UTF-8 Character set. Found them now.

Brennall 2010-06-02 12:44 UTC

For future readers looking for help:

 ◉ gas giant 0x25C9 FISHEYE ■ imperial consulate 0x25A0 BLACK SQUARE ☼ TAS 0x263C WHITE SUN WITH RAYS ▲ scout base 0x25B2 BLACK UP-POINTING TRIANGLE ★ navy base 0x2605 BLACK STAR π research base 0x03C0 GREEK SMALL LETTER PI ☠ pirate base 0x2620 SKULL AND CROSSBONES ▮ communication/trade 0x25AE BLACK VERTICAL RECTANGLE

AlexSchroeder 2010-06-02 13:06 UTC

Brennall 2010-06-02 13:36 UTC

I am curious Alex … have considered a method of saving the SVG output from the map ?

Brennall 2010-06-04 13:41 UTC

Uh… What browser are you using? I just hit Ctrl+S and save the SVG file. And since I also have the option of printing to a file, producing a PDF is no problem either.

In fact, I sometimes update the UWP of my campaign, regenerate the SVG map, save it, and use Inkscape to add the spheres of influence we have. The result:

At one point the party caused civil war in a system by dropping a tactical nuke on large part of a government. I then assigned a red zone to the system, which caused the major trade routes to shift. Result:

before after
note the spheres of influence but I forgot them here, hehe

AlexSchroeder 2010-06-04 14:26 UTC

After some quick testing the following results

• Chrome saves the HTM file by default not the SVG.
• IE doesnt show the map and tries to save it only.
• Safari gives the option to save it when doing Save As.
• Firefox gives the option to save it when doing Save As.
• Opera gives the option to save it when doing Save As.

Interesting difference given Chrome and Safari both use Webkit.

I will have to switch over to Firefox from Chrome to get what I want!

I will also have to give Inkscape a try as I haven’t used it yet.

Cheers Alex.

Brennall 2010-06-04 15:03 UTC

Yeah, I <3 Inkscape!

I wasn’t aware that browser reactions varied so much. But then again, I was surprised when I learnt that Firefox was going to support SVG in the first place.

AlexSchroeder 2010-06-04 22:57 UTC

Great work! I love this program.

A few quick questions though…

1) I’m importing my own UWP codes so that I can make my own sub-sector but I can’t seem to get the Amber or Red Zones to show up on my map. I can see them when I do a randomly generated map, but just not my own.

Here is an example of my UWP code: Darkgate 0810 X563401-B Ni G R 124 Ukn

It shows the: Gas Giant, Research Lab,X Spaceport and name (Darkgate) but no red circle. Name

2) What UWP code do I use for asteroid belts (to see the circle in the hex)?

– Mark Merrell 2011-08-03 01:28 UTC

Nevermind, I figured it out. I had extraneous info in my UWP line.

Also, figured out the grey circle is in fact the amber zone.

I learned something today!

Again, thanks for the program!

– Mark Merrell 2011-08-03 01:35 UTC

Heh, excellent. No idea regarding the asteroid belts – those didn’t show up in my Mongoose Traveller book.

AlexSchroeder 2011-08-03 08:26 UTC

Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. See Info for text formatting rules. You can edit the comment page if you need to fix typos. You can subscribe to new comments by email without leaving a comment.