Category Archives: computers suck

FifteenTwenty: Commodore 1520 plotter font

FifteenTwentyFor the impatient: download FifteenTwenty-Regular-OTF.zip
Updated: now with all ASCII glyphs!

The Commodore 1520 was a tiny pen plotter sold for the Commodore 64 home computer. It looked like this:

Commodore 1520 printer plotter (adjusted).jpg
Commodore 1520 printer plotter — by Oguenther (Dr.Guenther). – This file was derived from Cbm1520-2.jpg: , Public Domain, https://commons.wikimedia.org/w/index.php?curid=39145769

I never owned one, but it seems it was more of a curiosity than a useful product.

From a nerdy point of view, however, this device was rather clever in that it packed a whole plotter command language, including a usable font, into 2048 bytes of ROM. Nothing is that small any more.

Thanks to the epic efforts of Jim Brain and others, this ROM is now archived on Project 64 Reloaded. Looking at the code, I was struck by the elegance of the encoding: it packs a full X-Y plot instruction in one byte.

Based on my work with the Hershey font collection, I thought it would be fun to extract the coordinates and make a real OpenType font from these data. I’m sure others would sense the urgency in this task, too.

Since Commodore computers used a subset of ASCII, there’s a barely-usable set of characters in this first release. Notable missing characters include:

U+005C    \    REVERSE SOLIDUS
U+005E    ^    CIRCUMFLEX ACCENT
U+0060    `    GRAVE ACCENT
U+007B    {    LEFT CURLY BRACKET
U+007C    |    VERTICAL LINE
U+007D    }    RIGHT CURLY BRACKET
U+007E    ~    TILDE

I’ll get to those later, perhaps.

Huge thanks to all who helped get the data, and make the bits of software I used to make this outline font.

(Note: although the Project 64 Reloaded contains some extraction code to nominally produce an SVG font, it doesn’t work properly — and SVG fonts are pretty much dead anyway. I didn’t base any of my work on their Ruby code.)

Work-in-progress: Sayso Globord audio decoding

You may still be able to get surplus Sayso Globord programmable LED signs in surplus stores. It’s a 7×24 LED scrolling sign that you can program with a lightpen or with audio input.

sayso-001The unit comes with no software, but has a link to https://www.dropbox.com/sh/q1q9yhahwtblb23/AACpMeXQjYyD8ZWC-65vNgcxa printed on the box. It’s an archive of the programming software, manual, and canned audio files for a whole bunch of standard messages. Here’s an archive if the dropbox link goes away: SaySo.zip

The audio files used for programming the display are clearly FSK-encoded, but I haven’t quite worked out the relationship between the tones and the display bits. Here’s what I’ve worked out so far:

  • Files are made up of 12 audio blocks, each about 0.9 seconds long. Each block appears to correspond to one 7×24 display screen.
  • Mark (1 bit): Three cycles, 96 samples at 44100 Hz: 1378.125 Hz
  • Space (0 bit): Four cycles, 256 samples at 44100 Hz:  689.0625 Hz

The editor runs nicely under DOSBox, so you can experiment and save samples as WAV files. Here’s a sample display with its corresponding audio linked underneath:

sayed1_0_003I’m not sure how much extra work I have time or inclination to put in on getting this working, but I hope that my preliminary work will be useful to someone (maybe this person).

Building the Stick of Joy

Not-even-remotely over-engineered retrogaming joystick

 

Tracking down old Atari-style joysticks is expensive, and you don’t know if you’ll get something reliable. So I built one, using Protolab‘s laser cutter.

The guts of the unit comprise:

The case is made from 6.4 mm high quality plywood, using a template generated by BoxMaker.  The external dimensions of the box are 163.05 mm x 143.05 mm x 83.05 mm, including kerf.

joystick-box

I might recommend just nabbing the top plate dimensions from the above drawing, as I made a couple of rookie mistakes in the design:

  1. I overcompensated for the laser kerf, so had to spend several hours sanding the box down to size to make it fit together. You might want to set it to zero to leave room for glue.
  2. I flipped one of the box sides to compact the cutting job. While this might’ve saved a small amount of wood, it means that the grain matches on three of the sides, but not for the fourth.

You’ll also need M4 screws to secure the joystick and stacks of washers to space the dust washer correctly. The connection is made with a couple of metres of 8-core stranded signal cable and a 9-pin female D plug. You should refer to digital joystick connector pinouts for the wiring.

Parts and materials for this joystick cost less than a used stick shipped from eBay.  It works well, and its probably the only gaming device ever to have a logo written in Akzidenz-Grotesk.

Broken Pen Girih

broken_pen_girihWell, I didn’t expect that to happen. I was plotting this simple girih frame when something went wrong, and the plotter slammed the (new-old stock, almost unused … sniff) HP drafting pen into the side of the thick watercolour paper, breaking off the tip.

I didn’t notice the damage, so I restarted the plot, and the above smeary and uncertain lines came out. It’s certainly more organic than a mechanical plot would tend to be …

[tɒk bɒks] — a tiny hardware speech synthesizer/TTS

[tɒk bɒks]: case
[tɒk bɒks]: case
[tɒk bɒks]: inside
[tɒk bɒks]: inside. The observant amongst you will notice that the speech board is 1/10″ further in than it should be for ideal alignment with the USB serial adapter.
Back in the 1980s, the now-defunct Digital Equipment Corporation (“DEC”) sold a hardware speech synthesizer based on Dennis Klatt’s research at MIT.  These DECTalk boxes were compact and robust, and — despite not having the greatest speech quality — gave valuable speech, telephone and reading accessibility to many people. Stephen Hawking’s distinctive voice is from a pre-DEC version of the MIT hardware.

DEC is long gone, and the licensing of DECTalk has wandered off into mostly software. Much to the annoyance of those in earshot, I’ve always enjoyed dabbling in speech synthesis. DECTalk hardware remains expensive, partly because of demand from electronic music producers (its vocoder-like burr is on countless tracks), but also because there are still many people who rely on it for daily life. I couldn’t justify buying a real DECTalk, but I found this: the Parallax Emic 2 Text-to-Speech Module.  For about $80, this stamp-sized board brings a hardware DECTalk implementation to embedded projects.

The Emic 2 is really marketed to microcontroller hobbyists: Make Your Arduino Speak! sorta thing. But I wanted to make a DECTalk-ish hardware box, with serial input, a speaker, and switchable headphone/line jack.  [tɒk bɒks] (a fair approximation of how I pronounce “Talk Box”) is the result.

Hardware

  • Parallax Emic 2 Text-to-Speech Module
  • OSEPP FTDI USB-Serial Breakout — there are many USB-Serial boards that would do this, but two points in this one’s favour are: i) it has header pins for breadboard use, and ii) I had a spare one.
  • Small 8Ω speaker element — the one I used is most likely a headphone element, bought from Active Surplus (RIP). This should be as small as you can get away with (and still hear) as the USB-Serial connection isn’t designed to supply audio power.
  • Header pins and sockets
  • Toggle switch
  • Small project box with perfboard
  • Jumper wires and solder

Connections

Emic 2             Serial
======             ======
 GND                GND
 5V                 Vcc
 SOUT               RXD
 SIN                TXD

Emic 2             Speaker
======             =======
 SP-                -
 SP+  (via switch)  +

Using it

You’ll need some kind of serial terminal connection. In a pinch, you can use the serial monitor that is in the Arduino development environment. Either way, identify your serial port (/dev/ttyUSBN, COMN:, or /dev/tty-usbserialNNNN) and find a way to send 9600 baud, 8N1 characters to it. Hit Return, and you should be greeted by the Emic 2’s : prompt (or a ?, followed by :). Whether you get the prompt or not depends on whether local echo is set or not. Either way, try sending this line:

SAll watched over by machines of loving grace.

You should hear a voice say the title of Richard Brautigan’s lovely poem All Watched Over by Machines of Loving Grace (caution: video link contains nekkid hippies). You should get the : prompt back once the the speech has stopped. And that’s all there is to it: send an S, followed by up to 1023 bytes of (basically ASCII) text, followed by a newline, and it will be spoken. There’s more detail, of course, in the Emic 2 documentation and the Emic 2 Epson/Fonix DECTalk 501 User’s Guide for changing voices, etc. Yes, you can make it sing. No, you probably shouldn’t, though.

Notes

  1. The Emic 2 has no serial flow control, so you have to wait until the module stops speaking (or you send it the stop command) before you can send more. The easiest way is to poll the serial port and see if there’s the : prompt waiting. Until you see the prompt, any text you send it may be lost.
  2. The Emic 2 is an embedded device; Unicode is a bit of a stretch. It’s supposed to accept ISO Latin-1 8-bit characters (handy for Spanish mode), though.
  3. Starting every speech line with S may make this board incompatible with assistive technology software such as the JAWS screen reader. I don’t think that this was the goal for Emic 2’s designers (Grand Idea Studio), however.
  4. The output from the audio jack has a fair bit of noise on it, and you need to set the volume quite low to avoid hiss and hum. Your experience may be different, as I may have accidentally made a ground loop. There is a faintly  audible click at the start and end of the text, too.
  5. The Emic 2 uses DECTalk v5 commands and phonemes. Many DECTalk resources on the web (like these songs) use v4 or older, which are subtly incompatible. I haven’t found a reliable conversion protocol yet.

To end, here’s the Emic 2’s “Dennis” voice reading all of Brautigan’s All Watched Over By Machines of Loving Grace:


(plain link: molg-dennis-140wpm-16khz.mp3)

(recorded and edited for length with Audacity. No hippies — nekkid, or otherwise — were harmed in the making of this recording.)

Hershey Complex font – works (mostly)

hershey sampleI’m pretty happy with this still-early version of AVHershey Complex Medium. There’s a PDF type sample embedded underneath the image. It’s from Augustus Carp, Esq., a book (and epub) that is now really and truly in the public domain in Canada.

There’s still a lot to do. Even the regular Complex font (which has the best glyph coverage of all of the styles in the Hershey font collection) is needing more work:

  1. No pair kerning
  2. Weak currency character support; only $, when it really should have ¢, €, £ and ¥ too
  3. Not-very-complete Western European accents and regional characters
  4. Some frankly ropey decisions were made in filling in missing characters from composites/modifications of other glyphs.

And now I’ve got to do the same for two other weights of Complex Roman — and then think about all the other variants! I’m not going to touch the Japanese glyphs, by the way; given how limited my knowledge of even Western typography, I doubt I’d be able to advance the representation of Kanji in any useful way.

Considering that the glyphs are made up only of straight line segments, they look not bad in print. Sensitive typographers look away now; here are the control points for ‘g’:

ugh!
ugh!

Hershey Writes Again

Update: very preliminary OTF font files are available here: scruss/AVHershey-OTF. These don’t yet even encode all of ASCII, so aren’t yet generally useful.

Major breakthrough: yesterday (Feb 5th), I got the old Hershey fonts outlined properly, and today I have compiled them (sorta) into vector fonts. They’re not yet ready for release, as they have no metadata and are missing some key characters (even for ASCII).

I based the line thicknesses for the fonts as if I were drawing a 16 pt character, and using a plotter with a 0.3 mm (light), 0.7 mm (medium) and 1.0 mm (heavy) pen. You can see in the individual characters from the Hershey Complex font shown below, that the double hairline strokes merge into thicker single strokes. The same effect occurs on a real plotter, too:

S_AVHersheyComplexLightS_AVHersheyComplexMediumS_AVHersheyComplexHeavy

Here are some preliminary bitmap samples:

Complex Heavy
Complex Heavy
Complex Light
Complex Light
Complex Medium
Complex Medium
Simplex Heavy
Simplex Heavy
Simplex Light
Simplex Light
Simplex Medium
Simplex Medium

q absolves data sins and makes CSV queries easy

The cryptically-named q (it also bills itself as being able to “Run SQL directly on CSV files | Text as Data”) is very nifty indeed. It allows you to run SQL queries on delimited text files. It seems to support the full SQLite SQL dialect, too.

I used to frequently query the IESO‘s Hourly Wind Generator Output report (which now hides behind a JS link to obscure the source URL, http://www.ieso.ca//imoweb/pubs/marketReports/download/HourlyWindFarmGen_20160122.csv).  Now that the file has nearly 10 years of hourly data and many (but not all) wind projects, it may have outlived its usefulness. But it does allow me to show off some mad SQLite skills …

The first problem is that the file uses nasty date formats. Today would be 23-Jan-16 in the report’s Date field, which is filled with the ugh. You can fix that, though, with a fragment of SQL modified from here:

printf("%4d-%02d-%02d", substr(Date, 8,2)+2000, (instr("---JanFebMarAprMayJunJulAugSepOctNovDec", substr(Date, 4,3))-1)/3, substr(Date, 1, 2)) as isodate

The above data definition sets the isodate column to be in the familiar and useful YYYY-MM-DD ISO format.

A related example would be to query the whole CSV file for monthly mean generation from Kingsbridge and K2 Wind projects (they’re next to one another) for months after K2’s commissioning in March 2015. Here’s what I did in q:

q -T -O -H -d, 'select printf("%4d-%02d", substr(Date, 8,2)+2000, (instr("---JanFebMarAprMayJunJulAugSepOctNovDec", substr(Date, 4,3))-1)/3) as isomonth, avg(KINGSBRIDGE) as kavg, avg(K2WIND) as k2avg from Downloads/HourlyWindFarmGen_20160122.csv where isomonth>"2015-03" group by isomonth'

which gave the results:

isomonth    kavg    k2avg
2015-04    12.7277777778    37.4569444444
2015-05    8.94623655914    67.6747311828
2015-06    6.05833333333    66.6847222222
2015-07    3.96370967742    45.372311828
2015-08    6.34811827957    67.436827957
2015-09    7.29027777778    79.7194444444
2015-10    14.5658602151    128.037634409
2015-11    15.9944444444    130.729166667
2015-12    17.6075268817    152.422043011
2016-01    19.6408730159    163.013888889

Neat! (or at least, I think so.)

Self-similar petals

Self-similar petals

Original drawn in hand-coded PostScript from a path worked out using InkScape. Translating from InkScape’s SVG paths to PostScript is slightly annoying: PS uses Cartesian conventions, while SVG inverts the Y-axis. At least the SVG path commands map well to PostScript: mmoveto, ccurveto, Zclosepath, Sstroke.

There’s no magic to this figure. Each row of petals is half the length of the row outside it. As there are 6 petals arranged in a circle, each petal is 60° of arc. To make the half-step between rows, the petals are rotated 30°, so the rows have to be scaled by sin 30°, or ½.

Instagram filter used: Normal

View in Instagram ⇒

GTALUG Lightning Talk(s): Mostly Searchable and Mini Printers

My lightning talk for GTALUG seemed to go down quite well. Here are the slides. It’s mostly based on experience gleaned from My bank broke PDF … and how I used PDFBeads to fix it. I really must write this up properly.

I also prepared — but didn’t get to use — notes on using Mini Printers and Linux. Again, this is from Thermal Printer driver for CUPS, Linux, and Raspberry Pi: zj-58 and Notes on mini-printers and Linux.

svgo: silently destroying creators’ rights since whenever

svgo is, on the face of it, pretty neat: it takes those huge vector graphic files and squozes them down to something more acceptable. Unfortunately, though, the authors have seen too many files with junk machine-generated <metadata> sections, and decided that it’s all worthless.

Metadata isn’t junk; it’s provenance. Your RDF? Gone. Your diligently researched and carefully crafted Dublin Core entries? Blown away. The licence you agonized over? teh g0ne, man. svgo does this by default. It would be very easy to use this tool to take someone else’s graphic, strip out the ownership information, and claim it as your own. It would be wrong to do that, but the original creator would have to find your rip-off and go to the effort of challenging your use of it. All so much work, all so easily avoided.

You can make svgo do the right thing by calling it this way:

svgo  --disable=removeMetadata -i infile.svg -o outfile.svg

There’s apparently a config option to make this permanent, but the combination of javascript, no docs and YAML brings me out in hives. Given that the metadata section of a complex file is typically a couple of percent of the total, it’s worth keeping. Software passes; but data lives forever, so be kind to it.

Inkscape: circles from a point and radius

Drawing a circle between a centre point and one on the circumference is a common requirement in working up geometric patterns. If you need lines parallel to a radial line, or indeed any line at a fixed distance from another point, you need to draw a circle as a construction guide. the figure below will never be destined for design greatness, but it shows how they could be used:

(source SVG is linked from image, unfortunately)
(source SVG is linked from image, unfortunately)

The turquoise circles define the green parallel lines, and also the smaller green hexagon inside the black one. Drawing circles from a centre is what compasses do, yet Inkscape doesn’t have a tool to do it easily.

There is a way around this, though, that I picked up from this forum post. The poster’s method isn’t very clear, but in very brief summary, you need to construct a 3 point or 2 line-segment polyline with its nodes equidistant from the centre point, then use Render → Draw from Triangle … → Circumcircle to construct the circle. Simple? Um …

Okay, dodgy animation and point by point explanation coming up. With cusp, intersection and centre snapping all enabled:

badly drawn circumcircle animation for Inkscape
badly drawn circumcircle animation for Inkscape
  1. Draw two points: one for the centre, one on the circumference
    (I usually draw a short diagonal line as the pointand snap to the cusp node, as they are unobtrusive but easy to pick up the rotation centre.)
  2. Click on the circumference point to select it
  3. Click on the circumference point again to select the rotation centre and handles
  4. Move the rotation centre of the point to the centre of your circle
  5. Duplicate the point (Ctrl+D)
  6. Rotate the point 90° (Object → Rotate 90° CW)
  7. Duplicate the new point (Ctrl+D)
  8. Rotate the new point 90° (Object → Rotate 90° CW)
    (You should now have three points arranged around a semicircle)
  9. Draw two straight line segments through the three points
  10. Select the line
  11. Render → Draw from Triangle … → Circumcircle — and there’s your circle.

There’s probably another way to do this by creating a point (Ctrl+click in Line mode) giving it a line width, setting rounded line ends, then doing Path→Stroke to Path to get a buffer around the point, but I can’t work out how to do this reliably.

Oh, and the patten I made from the construction? Well, it might look okay on a paper towel …

kitchen_towel-maybe

Simple tools and techniques for making patterns with Inkscape

You might have noticed that I’ve become a bit obsessed with Arabic/Islamic geometric designs lately. Clues include posts like this, this, also this, and maybe even this. When I refer to Islamic Geometric Design, I’m more talking about the frameworks, repeat units or grids that are the starting point for the intricate and hypnotic abstract designs that have traditionally been used in Islamic architecture for over a thousand years. Here’s an example of the larger patterns in context:

A close up of Tomb by Usman Ghani.jpg
A close up of [The Tomb of Bibi Jawindi, Uch, Pakistan] by Usman Ghani” by Usman.pg – Licensed under CC BY-SA 3.0 via Wikimedia Commons.

I’ve been following Eric Broug‘s methods of construction that use a ruler and compass exclusively. Not being that great with manual dexterity, I’ve found these much slower to draw than I could on a computer. Consequently, I looked around for a good, free tool that people could use to start making these drawings. Most of the operations (including drawing from one intersection to another, rotating objects around a point, buffering lines into polygons) can be done by CAD packages, but these often have a steep learning curve. CAD packages also don’t tend to have many artistic functions.

Thankfully, the free drawing packing Inkscape has almost all of the features I need. Just one of the features I use quite often (creating a circle from a centre point and a point on the circumference; in other words, emulating a compass) isn’t built in, but can be done with a simple sequence of operations. In this article, I hope to show you some techniques you can build on for making your own patterns.

Installing Inkscape

This is covered well on the Inkscape website, so I won’t repeat it here. It’s important to get the most recent stable version of Inkscape. Some Linux distributions provide a really old version, so make sure you’re using at least version 0.91.

Inkscape runs on Linux, Mac and Windows. On Mac, it’s a little slow and uses some non-(Mac-)standard keyboard shortcuts. You may also have to install XQuartz on your Mac for it to run. It works fine on Windows (I tested 8.1).

Snapping is your friend

Screenshot from 2015-08-23 22:29:52

You’re going to have to get to know and love the Snapping Toolbar, shown at right. When you enable snapping, the items you draw or modify are locked to the node, intersection, object centre or grid point nearest to your cursor. When snapping is active, you get a little hovering info box showing you what Inkscape thinks you want to snap to:

2015-09-10-082038_913x440_scrot

I’ve enlarged the screen grab so you can make the info box out more clearly.

Snapping allows you to place lines in geometrically precise locations if you work up a drawing from a template or construction lines. All of the templates I made have the most useful snapping modes enabled:

  • Snap to Intersection — prefer where lines cross
  • Snap to Cusp Node —prefer end points of lines, or local extrema of polygons
  • Snap to Object Centre —prefer the centre of objects.
path4174
Triangle from intersections
(source SVG is linked from image)

Here’s a simple example of a triangle drawn from construction lines. I couldn’t ever draw a perfect equilateral triangle freehand, but with snapping, it’s four clicks (three vertices, then a final click on the first vertex to close the figure), and it’s done perfectly.

Incidentally, most of the patterns I make use straight lines. In Inkscape, you’ll want to use the Pen tool (Screenshot from 2015-09-10 08:50:22) with straight lines enabled (Screenshot from 2015-09-10 08:50:41).

Moving the Centre of Rotation

When you double-click an object in Inkscape in Select & Transform mode (Screenshot from 2015-09-10 21:46:02), you get shown the rotation handles and the all-important Centre of Rotation. By default, the centre of rotation is in the centre of the bounding box of the object; that is, the centre of the smallest horizontal box that encloses the object. Here it’s marked by a small cross:

Screenshot from 2015-09-10 21:26:15

Let’s say we want to make a six-pointed star from this triangle. You might think that if you duplicated it (keyboard shortcut: Ctrl+D) and flipped it horizontally (keyboard shortcut: h), you’d get your star. Alas, no star for you:

Screenshot from 2015-09-10 21:26:46

What we wanted to do was to flip the triangle around the centre of rotation of the radial construction lines, and to do that we need to drag the triangle’s centre of rotation over to the centre of the construction lines:

path4174

You’ll know when you’ve got it in the right place, as Inkscape’s snapping info box should tell you:

2015-09-10-212843_1600x876_scrot

Let’s try that duplication and flipping thing again:

Screenshot from 2015-09-10 21:30:56

Moving the centre of rotation makes all the difference.

Rotation & Duplication

Now that we can move the centre of rotation, we can use that to build up compound objects:

anim-pentagons-strap

This interleaved set of strapwork pentagons is made from 10 segments:

Segment for interleaved pentagons(SVG is linked under this image)
Segment for interleaved pentagons
(source SVG is linked from image)

Since there are 10 segments, we have to rotate each segment 36° (= 360°/10) to fill up the whole circle. For this, we use the Transform tool’s Rotate tab:

Screenshot from 2015-09-10 23:09:03

If you’re wanting to avoid doing even division in your artwork, here’s a table for many common values:

Number of Segments Rotation / °
2 180
3 120
4 90
5 72
6 60
8 45
10 36
12 30
16 22.5
18 20
20 18
24 15
36 10

Applying nine duplicate-rotate steps, we get this result:

pentagons-strap

Stroke to Path

(work in progress …)

Simple fine lines (SVG source linked from image)
Simple fine lines
(SVG source linked from image)

Most geometric figures have lines with some thickness to them. Guide lines alone are pretty boring.

You can use Object → Fill & Stroke and set Stroke Style on a path to make it wider, but sometimes you might want to work with the intersections of the edges of these paths. Fortunately, Inkscape makes this relatively easy.

First, give your path the width you want, say 3-5 mm. Then, with the path selected, use Path → Stroke to Path. At first, nothing appears to have happen, but change the Fill to none (the ‘×’ icon) and the Stroke Paint to solid. Suddenly, the path will appear to get really thick, but reduce the Stroke Style: Width down to a fine line, and you’ll end up with the outline of your original path.

Stroke to path, and partially filled (SVG source linked from image)
Stroke to path, and partially filled
(SVG source linked from image)

I’ve jumped ahead a bit with the illustration, and started to fill in the strapwork. Inkscape will snap to the nodes on the edges of your figure, and you can decorate it any way you wish.

(The Stroke Style: Join and Stroke Style: Cap permanently affect the outline path. You’ll get quite good at using Undo until you get the effects you want. Really pointy shapes will need a custom Stroke Style: Mitre Limit, as graphics programs try to limit really acute intersections, as they can get awkwardly long and trail off the page.)

A gratuitously pointy star that needed a custom mitre limit
A gratuitously pointy star that needed a custom mitre limit
(SVG source linked from image)

 

Other useful techniques

  • Separating construction lines from drawing objects by using Layers is very helpful. Once you hide the construction lines, your patterns look much more impressive, as you can’t easily see how it was put together.
  • The Select Same command allows you to select objects with the same fill and/or stroke style. I find this useful for selecting objects for grouping, or moving to other layers.
  • Clipping objects to basic tile shapes can help to make seamless repeat units for tiling.
  • The Clone → Create Tiled Clones … command is immensely powerful for making patterns out of repeat units. It’s also rather hard to use. I hope to add some basic examples later, though it’s hard to get this exactly seamless. This tutorial helps for a limited number of cases.

Raspbian: Getting Alt-Tab to work properly in Openbox/LXDE

I’m still happily using a Raspberry Pi 2B as a lightweight desktop machine. It’s not my main computer, but it’s pleasantly capable. Set up with a couple of paged desktops (or virtual desktops, as we used to call ’em), I can get a bunch of things done with it.

One feature that really irked me, though, was the way that window switching worked. Or, for greater clarity, didn’t work. Openbox, the standard window manager in Raspbian, didn’t allow you to switch to windows on another desktop with Alt+Tab. As I have a smallish screen, I typically have very few windows per desktop, so I want that ability to move from task to task.

This, however, can be fixed. In your ~/.config/openbox/lxde-pi-rc.xml file, change the keybinding sections for Alt+Tab and Alt-Shift+Tab to read:

    <keybind key="A-Tab">
      <action name="NextWindow">
        <allDesktops>yes</allDesktops>
      </action>
    </keybind>
    <keybind key="A-S-Tab">
      <action name="PreviousWindow">
        <allDesktops>yes</allDesktops>
      </action>
    </keybind>

Log out, log back in, and Alt+Tab across desktops should Just Work. If you’re not using the default pi user, I suspect you’ll have to edit the ~/.config/openbox/lxde-user-rc.xml file instead.

Credit for this tip: user crunchworksyeay on the CrunchBang Linux Forums.

This has been a Memo To Myself™ production.

Working with case-sensitive CD-ROM images on Linux

I bought a CD-ROM, The World of Patterns. It’s supposed to work on ‘Any computer with an Internet browser and a CD-ROM drive’. Guess I don’t just have any computer, then …

The disk — an interesting mathematical/artistic study of patterns — is arranged as a tree of HTML files, with internal links and images. This is how the folders appear on my computer:

├── art
│   ├── islam
│   ├── preislam
│   └── pstislam
│   ├── latt
│   ├── other
│   └── quilts
│   ├── modern
│   │   ├── large
│   │   ├── patch3
│   │   └── patch4
│   └── usa
├── info
├── maths

All neatly lower case, as one might expect. Unfortunately, the internal links are hard-coded to access links such as /art/Islam/over.htm, and Linux, being good and literal, can’t find the upper case ones.

Unfortunately, the majority of computers quietly ignore the case of letters on removable media. Linux’s insistence on being correct is at odds with what is generally considered useful. But there’s a way around this. You can give the mount command options to tell it to be more chill about case:

sudo mount -t iso9660 -o loop,check=relaxed,map=normal,norock,nojoliet disk.iso /mnt/scratch/

This works for me quite well:

Screenshot from 2015-09-08 10:57:54

The CD-ROM is interesting, if a little dated. The author has gone on to produce the website tilingsearch.org, a huge database of historical tile patterns.

Islamic Radial Geometric Design: SVG Templates for Inkscape

These SVG templates are modelled after Eric Broug‘s drawing templates for Islamic Geometric Design pattern elements. Although written for Inkscape, they should be usable with almost any graphics program.

By enabling snapping to nodes and object centres, your drawing program can act like an accurate straight edge and compass for constructing geometric figures.

File Nomenclature

The files are name N-LL-S.svg, where:

  • N — is the root symmetry: 4-fold, 5-fold, 6-fold, etc.
  • LL — the total number of lines arranged evenly around the circle. This will always be a multiple of N.
  • S — If the total number of lines has another symmetry that is a factor, this is S. If S = 0, then only the root symmetry is marked.

Examples:

  1. 4-12-6.svg — base symmetry 4-fold (square/diamond), with 12 lines or 30° spacing. Hexagonal (6-fold) guidelines are highlighted in a different colour.
  2. 5-10-0.svg — base symmetry 5-fold (pentagonal), with 10 lines or 36° spacing. No other guidelines are highlighted.

Features

In Inkscape 0.91:

  • units set to mm
  • snapping set to cusp nodes, intersections, and object rotation centres
  • construction lines on a separate layer (‘construction’) from the active layer (‘drawing’)
  • templates are initially sized at 100 x 100 mm
  • hair-line (0.1 mm) construction lines

Licence

WTFPL (srsly).

Files

All files, zipped: radial-templates-for-inkscape.zip

Individual files, with SVG linked behind image:

4-08-0
4-08-0
4-12-6
4-12-6
4-16-0
4-16-0
4-20-5
4-20-5
4-24-6
4-24-6
4-28-7
4-28-7
4-32-0
4-32-0
4-36-6
4-36-6
4-36-9
4-36-9
4-40-5
4-40-5
4-48-6
4-48-6
4-60-5
4-60-5
4-60-6
4-60-6
4-72-6
4-72-6
4-72-9
4-72-9
5-10-0
5-10-0
5-20-4
5-20-4
5-30-6
5-30-6
5-40-4
5-40-4
5-50-0
5-50-0
5-60-4
5-60-4
5-60-6
5-60-6
6-12-4
6-12-4
6-24-4
6-24-4
6-30-5
6-30-5
6-36-4
6-36-4
6-36-9
6-36-9
6-42-7
6-42-7
6-48-4
6-48-4
6-60-4
6-60-4
6-60-5
6-60-5
6-72-4
6-72-4
6-72-9
6-72-9
7-28-4
7-28-4
7-42-6
7-42-6
9-36-4
9-36-4
9-36-6
9-36-6
9-72-4
9-72-4
9-72-6
9-72-6