Shading dark
I generated a 7-depth Penrose tiling last night. It took most of the night.
Axiom: [N]++[N]++[N]++[N]++[N] Rules: M=OA++pA—-NA[-OA----MA]++; N=+OA–PA[---MA--NA]+; O=-MA++NA[+++OA++PA]-; P=–OA++++MA[+PA++++NA]–NA; A= Angle:36
The tiled SVG’s generated by the L-System are prone to very high rates of duplicate elements. They’re also extremely slow and system intensive to process under Inkscape as the entire graph is rendered as a single bazillion-point object. Handling the performance problem is simple enough: Inkscape/Edit/Select_All and then break up the object with Inkscape/Path/Break_Apart. Ahh, much better.
Handling the duplicates is tougher. There are simple duplicate elements, PATH elements with identical attributes and vertices and there are path elements which are identical except that they list the vertices in a different order. The former are easy to remove. Just fold the raw XML document so that all PATH entries occupy but a single line, sort the PATH elements and then remove all duplicates. In my case I just extracted the PATH elements to an external text file, wrote a quick XEmacs macro to make each PATH element single-line and then did:
$ sort < infile.xml | uniq > outfile.xml
Voila! All identical PATH elements removed. This simplistic dupe-removal reduced the file size by approximately 30%.
I looked at removing the duplicate-vertex elements but found it too hard for a quick hack fix. In short I’d have to extract all the path elements and then the vertices for each element, sort them and then do duplicate removal. That was more than I was willing to be bothered with. However while wandering the data I noticed that there were many 7 vertex elements whose vertices precisely overlaid the vertexes of other elements (exception: a small few elements at the edge of the graph). With the exception of the ones at the edge of the graph, they were all redundant. Remove them:
$ grep -v "path.*M.*L.*L.*L.*L.*L.*L" < infile.svg > outfile.svg
While a plain white mesh is pleasantly clear, I had the idea of colouring the tiles to give a bit of a stereoscopic effect.
#! env python
import sys
in_f = open (sys.argv[1], "r")
out_f = open (sys.argv[2], "w")
ndx = 0
for line in in_f:
if ndx % 3 == 1:
line = line.replace ('fill:none', 'fill:#999999')
if ndx % 3 == 2:
line = line.replace ('fill:none', 'fill:#cccccc')
out_f.write (line)
ndx += 1
in_f.close ()
out_f.close ()
The effect of which is to assign a fill colour to two thirds of the elements, a different colour for each third
I like it.
Inkscape, L-Systems, SVG, Penrose and other tilings
I’ve been playing with the L-System support in Inkscape, generating Penrose Tilings. Damn this is clever neat nifty fun!
Axiom: [N]++[N]++[N]++[N]++[N] Rules: M=OA++pA----NA[-OA----MA]++; N=+OA--PA[---MA--NA]+; O=-MA++NA[+++OA++PA]-; P=--OA++++MA[+PA++++NA]--NA; A= Angle:36
Just drop that into Inkscape/Effect/Render/L-System (put all the rules on one line) and you should get this:
Increase the Order value and it will iterate more, drawing a larger graph. Be careful though as execution time grows exponentially as the number of iterations grows.
Some other L-system-derived graphs produced with Inkscape:
Axiom: f Rules: f=-f+f+g[+f+f]-; g=gg; Angle: 60
Or perhaps more entertainingly:
Axiom: W Rules: W=+++X--F--ZFX+; X=---W++F++YFW-; Y=+ZFX--F--Z+++; Z=-YFW++F++Y---; Angle: 30
Yes, that’s a single continuous line in what is known as a space filling curve. Wander about Wikipedia or with a search engine and you’ll find many other little L-system programs for other tilings or space filling curves. Plug them in and play! They’re not only a heck of a lot of fun but such curious tilings can easily form the backdrop for interesting games and there are many many such interesting patterns.
Share lessons
I made paper shares for Muck & Brass tonight using the share PDFs I genned yesterday. I don’t need them, the glass bits I have been using work well enough, but I suspect that a slightly crisper presentation (and demonstration of personal investment?) will make acceptance of a very early stage prototype easier.
A quick trip to an office supply store produced a pad of craft paper in 8 colours (sadly one of the colours was a very dark purple). A couple aisles over revealed two packs of copier paper in 5 colours, one set rather pastel and the other day-glo. I grabbed the craft paper and pastel sets, printed four sheets of each share sheet, cut them quickly with a Fiskar’s rotary cutter and slipped them into penny sleeves. 390 penny sleeves no less. However, they’re really quite nice. The paper colours are bold and clear, the black printing shows well, the company abbreviations on the ends of the shares allows them to be fanned easily (as often done in the 18XX) etc. Fair dinkum.
Meanwhile yesterday’s trip to the paper supply store revealed a business card cutter: feed printed stock in one end, turn the handle and out fall cut business cards. Cost ~$150. I suspect card production is not as trivial as it suggests and that a vice-based paper cutter remains the better choice there. Lastly, while business cards could make good shares/cards but there are narrow limitations on available stock colours and relatively high media costs. Bah.
The paper supply store also had a manual corner rounder for $300 (essentially a jig with a vice and a curved blade). It was a rather heavy-duty piece of equipment; likely to survive WWIII unscathed. it was tempting to be tempted. I have a hard time resisting such well-formed mechanical engineering. Thank the gods nobody is waving a Curta calculator in my face.
Lessons from tonight’s production run:
- Colour copier paper in a wide range of colours (I need 10 colours for the 10 companies in Muck & Brass) is readily available outside my local office supply stores (Stapes, Office Max, Office Depot etc). eg this store
- Sleeves are constant size. This can hide a multitude of sins surrounding cut shares not being of constant size.
- Craft paper is nice stuff to work with
- Craft paper easily jams in the printer. Treat it carefully and ensure the guides and feed are aligned well!
- Coloured copier paper is not so nice to work with, tending to crease, crumple and stick
- With a little care the rotary cutter will handle and cut stacks of 8 sheets well enough. That makes for 8 cuts for 64 shares. Not bad.
The goal is to play tomorrow at the Endgame Anniversary party. It isn’t likely, but worth a shot.
Commentary and processes of 

Comments