Codenames (game) for organic chemistry

Vlaada Chvátil‘s Codenames is a great party game for 4-8 players.  Players are divided into two teams in front of a 5 x 5 grid of words.  Each team has a “spymaster”, seated across the table, who knows which words belong to the team.

Fig 1. codenames gameplay

The teams take turns to identify all the cards belonging to their team.  They do this using only one-word clues from the spymaster.  The first game takes 20 minutes; subsequent games finishes in fifteen.

The game relies on players seeing the relationships between words.  I thought the idea would work great with chemistry as well, and tried it out with my students in a pre-Christmas class using a handwritten set of organic chem vocabulary.  It worked well — when the spymasters know their chemistry!

I tidied this up in Illustrator, and the PDF is available here: chemistry codenames PDF.  This is designed for printing to A3 size.  In the PDF you can find:

The team cards (anilinium and carboxylates):

Fig 2. Team cards – the PDF has 9 yellows, 8 purple, and 7 grays.

(These games must start with the yellow carboxylate teams.)

Scenario cards

Fig 3. Twenty scenario cards – these work with the 9-8 distribution, with one extra yellow for starting first.

Chemistry “words”

Fig 4. Organic chemistry codename words – the inverted gray words for the spymasters.
Fig 5. Organic chemistry structures.

This works with my students who will be working on the Drugs option of IB chemistry.  There is also a set of blank cards for you to write / draw your own setup.

[box type=”bio”] Customizations: If you have a Silhouette you can use the guides to directly cut out some cardboard backing, using the Cards layer.    There is an Adobe Illustrator action embedded in the PDF, called codenames that automatically generate the inverted version.  It does so by creating a copy of the selection, rotating it 180, scales, and lowers the opacity.[/box]

If you enjoy the game, please support the original creator – both Codenames and Codename Pictures are quick good fun with friends and family.

Adobe Illustrator: Batch replacing objects

Demo of scripted object replacements
[et_pb_section fb_built=”1″ _builder_version=”3.0.47″][et_pb_row _builder_version=”3.0.47″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”][et_pb_column type=”4_4″ _builder_version=”3.0.47″ parallax=”off” parallax_method=”on”][et_pb_text _builder_version=”3.0.47″ background_size=”initial” background_position=”top_left” background_repeat=”repeat”]

In Illustrator (CC 2017) there is no Find-and-Replace for objects and batch substitution of objects is not possible.  For most illustrations this is a non-problem because Illustrator supports Symbols (and recently Dynamic Symbols); editing the base symbol propagates changes through all instances.  However, this requires that the objects were to be created as Symbols, and naïve objects are forever barred from this method.

Naïve objects, however, is sometimes what we need to work with.  Sometimes we work with files passed down to us; in my case, I was working with SVGs generated programmatically (by P5 / P5.svg).

I could find two attempts to get over this problem, one by JET on Adobe Forums, and one by Loic Aigon on Scriptopedia.  Both makes use of scripts.  JET’s method is more general, allowing the choice of any symbol in the list instead of one named “Dot”.

JET’s script was 90% what I needed, but it simply sizes replacement symbols to the same height as the objects-to-be-replaced, and I wanted additionally rotation and opacity to be preserved.  Here I present my extension that preserve opacity and (conditionally) rotation: you can download the script here.  An example of what it does is shown below, along with a comparison with JET’s original effect.  The original symbols are duplicated for you to see the effect.

Demo of scripted object replacements
Demo of scripted object replacements

To use this script, first select the objects you want to replace.  If there are too many, consider the options you have available under the Select menu.  Second, use the script by going to File -> Scripts -> choose file.  A pop-up box appears.  Enter the number of the symbol you wish to replace the objects with (top in your listing is 1).

You should note two gotchas in using this script:

  1. The most important one is that Illustrator does not keep information about rotation: from the object’s perspective it does not know there is such a thing as “right way around”.  To work around the rotation I constructed this data from the nodes, and in doing so it assumes something of the geometry.  My extension is designed for objects in which the first and last nodes designate the rotation: straight lines and rectangles work great.  The script behaves strangely for other objects, as you can see from the ellipses.
  2. The object and its replacement are aligned on its left and top, and not the center.  This may give the sense that the replacement has been erroneously moved at certain rotations (see the rectangle comparisons).



Reefcheck: building “abstract transects” for substrate

There are two primary missions to our Coral Monitoring program at UWC-HK: first, to transform our students into skilled and environmentally-conscientious citizens, and second, to acquire longitudinal data of coral health at the Hoi Ha Wan (西貢海下灣) marine park.  The compiled reports go to inform policies, locally at AFCD & WWF, and globally to Reefcheck and Coral Watch, eponymous non-profit organizations that compile global data on ocean health.

Coral monitoring dive sites
Coral monitoring dive sites

The reef-check protocol is an extensive operation, where divers sequentially

  1. Identify a site, an optimal band of coral growth
  2. Lay a transect line, where a measuring tape is drawn and temporarily anchored over 100 m
  3. Monitor fish population, including their species, sizes, and types
  4. Monitor invertebrate population, including their species, sizes, and types
  5. Monitoring the substrate (more details in this post)
  6. Acquire supporting video and photos
Linda Olson drawing out and anchoring a transect line
Linda Olson drawing out and anchoring a transect line
Identifying substrate from a transect line
Identifying substrate from a transect line.  The substrate directly under the transect line is noted at 50 cm intervals.  This picture shows an example of a Hard Coral (HC).

The underwater data is then fed into a standardized spreadsheet by the Reefcheck organization, which outputs some standard graphs to help understand what goes on in the water.  The standard representations for substrate — what’s on the sea-bed at 50 cm intervals — is shown as follows:

Default reefcheck output
Default reefcheck output (LPCUWC coral monitoring, 30 Sept 2006, site 2)
Standard 3D (yikes!) pie chart (double yikes!)
Standard 3D (yikes!) pie chart (double yikes!)

Besides not being visually attractive, the standard graphs all focus on the average and omits all details of which the average is comprised of.  As an example, the above graph is usually interpreted as sand (SD) present between gaps of coral (HC); it could also mean a perfect lawn of coral, but the transect line veered half way to deeper waters where there is nothing but sand.

There is a second, less conspicuous drawback, which we realized only when we were processing the dives after the term ends.  The bar-graphs were simply no good at telling the story of what we saw.  All the divers recognized clearly the difference between Site 5 and Site 2 underwater: the same people, however, were hard-pressed to match this impression to individual bar-graphs.

The essence of longitudinal monitoring is to observe changes.  The graphs — with their ten categories, lengths, arbitrary colors, and uncertainties — are not very good for compare and contrast during the analysis, and not compelling when putting together a narrative.  Consider the following bar-graph of Site 3: what difference would you pick out?

Site 3 standard barchart for comparison
Site 3 standard barchart for comparison

Considering that we want to be able to compare between different sites, and to monitor how these sites evolve over Fall and Spring across multiple years, it seems that something else is needed.

A brief interlude: the team this year had some fantastic students.  The following owes a large part to Nancy Hui (HK), Jolie Lau (HK), Tech Tana (Thailand), and Norbert Monti (Hungary).

Specifically, we wondered if it would be possible to lay out an “abstract transect”, where each 0.5 m is represented by a box, and the boxes stack side-by-side:

blank boxes...
blank boxes…

…clearly marked off at intervals by a length marker:

Length-marked boxes
Length-marked boxes

Each box can then be color-coded to represent a different kind of substrate, and the transect tells a story of what the divers saw.

Color scheme, iteration 1
Color scheme, iteration 1
Mock up of a transect segment using the "abstract transect" representation
Mock up of a transect segment using the “abstract transect” representation

Choosing the color scheme took us many iterations, and we are still not sure if we have picked out the most useful scheme.  We thought we would mark off similar “things” with a similar key, such that sand resembles silt/clay, and rock resembles rubble; these inorganic substrates are represented additionally with stunted bars.  Hard and coral coral resembles one another, and the blue — together with the difference in length — makes it stand out clearly.  Sponges and algae, non-coral growth forms, were colored in green — in hindsight I suspect that others is less important than the bright red we assigned it, and nutrient-indicator algae (NIA) should really take on more importance.

How does this first iteration work?  Pretty admirably I’d say — the following picture encapsulates all elements of our Fall dives, and it’s easy to pick out the similarity and differences between each site.

Visualizing substrate data across 4 dives
Visualizing substrate data across 4 dives (expand to view at full resolution)

It is also possible, down the line, to align the data isometrically to “see the flow of time”.

Mock up of a time series
Mock up of a time series

So far all of these visualization are manually constructed, really tedious, and no fun at all.  At some point I’d like to sit down to first automate this (which would allow the visual representations to be optimized), and then make it a browser tool such that one can simply dump a Google Spreadsheet with raw reefcheck data and it plops out a visual.  That would be spiffy.  What would be even more spiffy is if there can be a link directly to a transect photo upon mouse-over… or perhaps even time-code to a transect video.  That would be really spiffy.


In the long run, there is probably some way of integrating Fish and Invertebrate data into the “abstract transects”.  I don’t know what that is yet.  If you have any ideas I’m all ears.


Jmol chemical element swatches

Here is an RGB swatch palette for chemical elements, using the Jmol/JSmol convention as defined on its wiki page.  This is an ASE (Adobe Swatch Exchange) file and should be of use across the entire Creative Cloud suite (including Photoshop, Illustrator, and InDesign).  Download here [icon name=”icon-download”]; details, installations, and caveats follow.

Read moreJmol chemical element swatches

Our “Course Outline” Display

I teach chemistry, but I am a kindergarten teacher by heart.  I favor the bright, vibrant, tactile, and physical.  I’m also deeply of the meta persuasion, believing that one must care about the details but never lose sight of the bigger picture.

As the school year kicks off, I mused about how to present the course outline.  Do I send off two pages of PDF?  Do I send off a spreadsheet?  Should it be “moodle-lized”?  The progress should be planned, and the plan clearly communicated to students and co-teachers.  But the plan must also be flexible.  The best of planners draft plans that survives unscathed with reality; I am not one of them.  (There are also plan-pushers-come-hell-or-high-water, but I’m not one of those either.)

There happened to be an empty board outside the lab/classroom, and I decided we’ll do a bright, vibrant, tactile, and physical display!

How should it be structured?  The structure of the display has to conform with the inherent structure of the calendar.  At UWC Hong Kong, academics are structured in cycles, with 7 different academic days in each cycle.  Each day contains 5 classes.

The 7 different academic days — note that A always precedes B, B before C, and so on.

The upshot is that each class is present for 5 times in a cycle.

All classes happen 5 times in each cycle.

Which means that instead of labeling lessons sequentially with 1, 2, […] 40 for a term, they can be organized instead into cycle 1 – class 1 (1-1), cycle 1 – class 2 (1-2), […], 2-1, 2-2, […], 8-5.  Which means a single term with 8 cycles can be planned with a grid like this:

Or, in my world of card-board and stickies, this:

Planning an academic term
Term planning with color stickies and big sheet of paper

Now it’s time to work on the actual board!  Outside our lab there’s a pair of big white-boards, so I went with measuring tape and markers, to doodle and erase and doodle and erase while contributing to the mosquitoes’ welfare.

Scribbling on the white-board with markers. The basic idea here is conserved to the end, but the final display was corralled into the board on the right.

Some drawing, fidgeting with sizes, printing, shopping, cutting, laminating, more cutting, more shopping, and a thousand little unexpected minutiae later (quoting Sally Brown, “Fold? Crease? Cut?! WHY IS IT SO COMPLICATED?!“)… we have our bright, vibrant, tactile, and physical display!

The “course outline” display by mid-term time.


Hong Kong is humid and sometimes windy, which means that anything affixed by tape falls off shortly.  Tape also makes it (relatively) hard to move elements around.  A solution to this dual problem is to use neodynium disc magnets (1mm thick, 10mm diam.) to attach all pieces to the board — they are at once strong enough to keep things on, and allow simple repositioning.

A cycle is represented by a laminated strip with 5 boxes, each perfectly sized for a 3″ post-it note.  I got 5 colors of sticky-notes, each signaling a different kind of event:

  • yellow: a HL/SL class
  • orange: a HL only topic
  • green: lab
  • pink: test!
  • blue: homework.  This sits on a parallel track, and comes with arrows to show when they are expected.

Each sticky-note describes the subject for the day, the relevant topic in the IB syllabus (e.g., “periodic table” is 3.1), and page number references for different textbooks.  I try to update it about a week ahead, so students can read ahead for class if they care enough.  (Some EAL students appreciate being able to do this.)  It seems fine enough for what we need (survey to students at end of term), but this was not the original idea.

The original, more ambitious idea was to hold all the additional information (syllabus, text page#) in a companion website which has systematic URLs.  (For example, topic x.y is always represented as  Then we can paste onto the post-its stickers with only topic numbers and QR-codes: all that the students need to do is either to search the topic number in the website, or scan the QR-code.  This will be tied in to the Badges system too (a “Steam achievements”-like awards for above-and-beyond efforts):

What happened?  To my chagrin, I greatly overestimated my abilities.  I thought I can teach new curricula (chem+ToK), lead new activities, supervise 5 EEs, and simultaneously be writing and illustrating “the best interactive IB chemistry” website.  It’s so crazy I don’t even know why I tried…

(But then, it’s so crazy it might just work!)

Clocks of History (Chinese Dynasty edition)

This was something I worked on-and-off in Spring/Summer 2012.  I won’t have time to finish this until much later.  It sitting on my drive does no one good.  If you’re interested in the project, I’ll be happy to get in touch with you to set the idea free.

History is usually represented as a sequential time-line, stretching from the beginning on the left to the end on the right.  As a picture-thinker I have a hard time visualizing and placing in events.  Our visual width is usually not enough to take in the entire span, and if it is zoomed in, I quickly lost sense of the scale and reference to events outside the current view.

When I see a zoomed in view, I get the relationship between the events within the “scene”. I can tell that M precedes N and P. However, unless the history is already intimately familiar to me, I have only a faint idea of where and how far A and G are relative to the field of view.

I would be surprised that Richard the Lionheart is as far away from Shakespeare as Shakespeare is from us, or that Cleopatra is temporally closer to the moon landing than the construction of the pyramids (h/t wonderfuldog on Reddit).

This becomes even more of a problem when different sources or systems of time is used.  In particular, I had absolutely no sense of whether the Tang (唐) dynasty co-exists with Jesus, St Augustine, or Thomas Moore.  (The answer is “none of the above”.)  I really wanted to make sense of this once and for all.

The solution, I thought, was to roll time into a clock, so that each point in time sits at a unique spatial location.  (I first came across a mentioning of this in a lecture by a Catholic priest around 2004, whose name I have long forgotten.)  The challenge was then two-fold:

  1. establishing a useful scale, and
  2. preparing it allaccurately.
I did say bones, didn’t I?

Since history had no beginning or end, the choice of a scale (and thus ends) is necessarily arbitrary.  I sketched out all reasonable combinations: scale of 100-500 yr / “hour” against sliding the end-times from 2000 to 2200.  For the history I’m interested in (where meaningful oral / written records exists), a scale of 300 yr/hr ending at 2100AD worked best.

The outstanding problem is to chart things accurately (and not break too much sweat about it).  I wrote some simple Processing code that sketches out a backbone of the a tab-delimited text file of (i) spot events, and (ii) events with duration.

(The code is nothing to write home about.  It simply converts time into polar coordinates, and draw arcs on the frame.  It really should do more to help the next steps, but that’s what I don’t have time for!)

I could then bring the backbone into Illustrator to spice it up, and overlay different timelines together.  The final output for Chinese dynasties against European civilizations is shown here.  (With the usual disclaimer that periods are fuzzy around the beginning or end; dynasties and periods often languish and blend into the next.)

[gview file=””]

The final output surprised me on a few things:

  • The brevity of the Qin (秦) dynasty — after uniting a China which had been at war for 600 years (!), this dynasty only lasted for a paltry 19 years.
  • The chaos that was historical Europe.  It turned out to be extraordinarily difficult to sketch out detail timelines for Europe, since borders, names, faith, factions, and races are all continuously shifting and war was perpetual.  It seems to be more fruitful to speak of defining (localized) events rather than (large scale) patterns, but I’m no historian.  (On that note: pundits jeer at the selection of the European Union as a Nobel Peace prize recipient, but one would be hard-pressed to find a (Western) Europe in peace for 60+ years.  Taking the long view, the period of peace we dwell in is truly remarkable.)
  • The even longevity of Chinese empires.  The “registered” dynasties all have lengths within the same magnitude, and there does not seem to be a hastening of pace as time marches on.  I’m mystified onwhy should lifetimes NOT be power law distributed, given that mass riots are power law distributed (note to self: citation needed).

The future of the project: what I’d like is to move the entire work-flow into Processing, and use Processing.js to make this an interactive application that readers can zoom-in/out, filter, and get access to more details via tool-tips.  A poor man’s Simile Timeline, but with a meaningful beginning and end.  If you want to help out, or take the idea and run with it, give me a shout and I can get the (ugly, elementary) Processing code to you.

Project Preview: Multi-functional Wall Map

In moving to Hong Kong, I decided to detach myself from possessions and live a minimalist life.  My place at the College, however, doubles as a meeting place for meeting with students, and certain furniture comes part and parcel with the flat.

The flat at move in (August 2012). Moving involved only two trips, each journey with one suitcase and backpack. The guards were surprised.

But I have no use whatsoever for the TV stand.  (I haven’t watched TV for more than 15 years.)  The maintenance staff kindly took that away, and left behind a blank wall.  I decided to do something with it.   I like chalk, maps, and magnets; the wall would be all that.

There shall be a magnetic chalkboard on the wall, in the shape of a world map.

Rust oleum carries separately a magnetic primer, and a chalkboard paint.  I picked up a gallon each, and tinted the chalkboard to be a navy blue.  The painting, however, would not be done for several months.

The first step involves drawing a world map on the wall.  Borrowing a projector from the Art Department, I traced out a simplified world map onto the wall with a 2B pencil.  Then I sanded the surface with a fine-grit sand-paper, so chalk goes on evenly.  The entire process takes about 3 hours.

In hindsight I should have learnt about a place called New Zealand. Or the Caspian Sea.

(In hindsight I should also have polished first, and traced later, even if that means more elbow grease.  The pencil marks don’t entirely go away when sanded, but it occasionally streaks out to the side, and the streaks were difficult to remove by eraser.)

Leila helping mask Asia.

The next step, which I’m chiseling away for a few minutes each day, is masking it with tape, so the 3 coats of primer and 2 coat of paints can have sharp edges.  This turned out to be not too bad… until I was stuck.

Well, you see, masking with artist’s tape was a fine solution except that it fails on irregular shapes.  And it fails especially badly when there is an indentation.  However, Leila discovered that tape can go on (lightly), the needed portion traced on top with pencil, and then cut to right size.  Sticky scissors and huge time sink aside, it works really well.

Since then I’ve been shaping and pasting tape for a few minutes every other day.  With much additional help from Leila, the Americas and Africa are now finished, and only the Mediterranean and the SE Asian coastlines remain unmasked.  Paint shall soon be applied.  Stay tuned!

Further along…

(More hindsights: if I were to do this again, knowing now how long it takes to mask irregular shapes, I would have made a stencil of the map.  There are so many things that was opaque and unknowable in front but crystal clear looking back.)

Reflecting on ToK Art Day

In August our Theory of Knowledge (ToK) class had an Art Day.  The day began with three lectures weaving together music, visual art, dance, and theatre, and concluded with a visit to Osage, a contemporary art gallery.  One of our students blogged about the exhibit; here are my observations and reflections on art, specifically, visual art.

“Yes, but…”

The day reminded us of the vast variety of creations that have been referred to as “art”.  Even within visual arts, there are different techniques, media, intentions, popularity, and a myriad of factors.  A large part of the day’s discussion revolved around “what is art”.

The issue is complex.  The discussions, as with many discussions of complex issues, went nowhere.  Throughout the day I sat back, musing why it went nowhere.

I first noted the poorly articulated positions.  This is not a function of the lack of ability by the students, but intrinsically that our (default) language is incapable of expressing the nuances required.  We live in a messy world with exceptions, corner cases, and chaos that cannot be neatly enclosed, interpreted by monkeys raised in vastly different conditions.  Any statement will be true in some cases, false in others, with a “truthiness” that vary between individual monkey.

Take the assertion A, “something mass-produced by non-artists cannot be art”.  This is true-at-first-glance.  At the same time, most people would recognize Ai Wei Wei’s Sunflower Seeds as art, contradicting what we just agreed as true.  We could have modified the statement to be “something mass-produced by non-artists cannot be art except […]“, but that, you’d agree, is far from the default way we think or speak.

Truth in a continuum.

The “intermediate truthiness” has an interesting and ugly consequence in discussions.  Because we do not default to speaking in exceptions and probabilities, utterances can always be shot down by counter-examples.  I describe these as “sniping at positions”, because when Peter shoots Jane down with a counter-example, he is himself invulnerable (since he never attempts to hold any position to start with).  At the end of the day, nihilism rules, and we are forced to admit we know nothing.  Socrates triumphs.

And then there is the “individual monkey” problem.  In the Osage Market Forces exhibit, a piece by Kentaro Hiroki named “My Work is Rubbish” reproduces the rubbish collected from the street.  It’s a technical marvel.  The ticket stub, in all its verisimilitude, was hand-drawn.  Is this art?  To my grandma, this is just a waste of time.

Ticket replica, in “My Work is Rubbish” by Kentaro Hiroki.

I took home a few messages and a lingering inquiry.  As a facilitator I should frame the discussion as a collective construction effort.  A first step that can be taken is encouraging note-taking, and allowing periodic breaks for consolidating what was spoken and how it all feeds into a central picture.  (As a picture-thinker, I think we should all have enough visual literacy to draw and arrange our thoughts.  I admire Betrand Russell, but I’m firmly with Wittgenstein in “what can be shown, cannot be said”.)

A second step is in pointing out sniping as it is: a purely destructive action that does not advance the collective understanding, but could have easily be constructive by articulating the underlying phenomena.  With the Ai Wei Wei example, one could have continued on to list political statement as one of the factors worth consideration, and that would have advanced our collective understanding.

Then there is the specific question of how to approach What is (Visual) Art.  My intuition is that the first step is to develop an ontology (“explicit formal specifications of the terms and relations among them”), so I sat down to

  1. list possible criteria (concepts), and
  2. their possible values (slots/properties).
Some factors that are definitely (definitely?) in play. Any more that should be added to the list?

The next steps are

  • to think through their (i) types and (ii) relationships, and slot them into something like Protege.
  • Use the ontology to generate allowedall allowed combinations, and
  • Find examples that illustrate each combination.

An individual can then clarify what their positions are by classifying these examples as art or non-art.  There could be downstream investigations of whether experts have different weighing than non-experts, or cultural / age differences.

Chalk one more “large project” on the 70+ items to-do list.

Image Trace Comparison: Illustrator CS5, CS6, and VectorMagic

Illustrator CS6 came out a few weeks ago.  Mostly it’s engine upgrade, with a few (I count two) artistic upgrade thrown in.  The first is allowing gradient on strokes (woohoo!); the second is an “improved” image trace.  How good is it?  I installed a trial version to find out.  The comparisons are between

  1. Live Trace of CS5
  2. Image Trace of CS6
  3. Vector Magic

I conducted two sections of tests.  The first section consists of throwing different types of image at the tracing engines.  This includes (1) simple B&W line art, (2) a Burberry pattern, (3) a clean illustration of a flute, and (4) a photograph.  The second section looks at how the engines deal with deteriorating quality of input, and re-uses the flute illustration in diminishing sizes, from 2000px in width to 500px in width.  Click on the images to expand.

Types of Image

B & W Line Art

The source image is a PNG diagram from Wikimedia Commons (indicatorbuis.png).  It’s a simple line-art diagram, with type, non-antialiased edges, and white background.

Vectorization of B&W line-art.  From left to right: (1) Source image.  (2) Using lettering presets, with small “mix px”.  (3) With fully auto option in CS6.  (4) Recommended options in Vector Magic.
Anchor points for expanded vectorization

With CS6, the fully-automated option misses thin lines (see lower right diagonal line), rounded out sharp corners (see corners of inverted U-shape at the bottom), and present inexplicable artefacts (see white space within the cross-shape).

Applying the lettering preset, with smaller minimum pixel, gave much better looking results, a pseudo-transparent background (more on this later), more fidelity to the letters — but many more anchor points on the circle.  Notably, there are few extraneous anchor points on the straight lines.

With VectorMagic, the default option does very well on the lines, less so on the lettering.  Its algorithm preserve the sharp corners, but also erroneously straightened out supposingly rounded corners.  I’m not quite sure why the lines leading out were tapered.

Burberry Pattern

The second image is a JPG of the Burberry pattern, which have significant defects on the edges and was something I expected all programs to have a hard time with.

Enlargement of Burberry pattern. Note the defects underneath the lowest black stripes.
Burberry pattern, vectorized.

That turned out to be true… to some extent.  The surprise was how VectorMagic failed abysmally on this task; no amount of fidgeting with the (limited) parameters gave results better than this.  CS6’s default didn’t do so great either.  Fidgeting with the parameters on CS5, I got something that’s visually alright, but the details still don’t work out.

Illustration – 2000 x 400px

This is the task I see most relevant to myself in using the image trace function.  The source is an illustration of flute terms I drew for Wikipedia, rasterized to 2000 pixels across.  (In the next section we’ll look at how each engine handles the same illustration, at lower resolutions.)  The edges are sharp.  The background is transparent, and there are partially transparent objects in the image.

Vectorizing a clean illustration. I optimize some parameters for CS5/CS6 engine to generate these results; within my explorations these are the best the engines could get to.
Outlines from vectorization.

CS5’s Live Trace gave questionable results, with much blurry shapes throughout, most easily seen from the confused outlines near the head (left) of the foot-joint.  Simple lines became thick-and-thin lines.  The type are not rendered particular well, even with this high resolution source.

CS6’s Image Trace did much better in terms of following lines: simple straight-lines remain simple straight lines, and circular shapes remain circular.  It did not handle type any better than CS5.  There are some missing lines (see barrel) and odd added shapes (see the black dot underneath the first key on the left).  The main defect here was with color: it somehow handles color differently than the other two engines, and not in a good way either.  The dash-lines were rendered funny; the dark gray in the center of the open keys were too dark, and I could not get it to pick up the subtle light shades of gray present on the keys or the flute (which CS5’s Live Trace did), even when expanding the colors it used by double the recommended numbers.

Results from VectorMagic looks very, very good, with no optimizing done.  Type, lines, and shapes all reproduce faithfully and economically – the outline looks just about as clean as my original vector drawing!  The colors were pretty much spot on, even with the somewhat tricky overlay dash-line between the red and blue keys.  (The only deficiency was the mis-colored embouchure hole.)  It was also the only engine that handles transparency and partial transparency – the only option in CS5/CS6 was to “ignore white”.  It’s hard to tell, but the dark gray in the middle of the keys are partially transparent, and VectorMagic picked up on that.


In general vectorizing photographs are bad idea – they’ve always looked like machine-vectorized pictures, and with resource-hogging numbers of anchor-points to boot.   Nonetheless, to complete the evaluation, I handed a 8MP picture to each vectorizing engine.  The setting for both CS5 and CS6 were “photo high fidelity”, and likewise highest detail on VectorMagic.

Photo vectorizing.
Paths for vectorized photos

Vector Magic seems to optimize for simplicity, so it generates far less anchor points than either CS5 or CS6.  This comes at an expense of less fidelity to the photo.

While CS5 performs better than VectorMagic, vectorizing photos is where CS6’s Image Trace really shine.  Man, does it look good! Look at the brown on the side of the guitar, the tuning keys, and the gradient on the tube of the flute.  I’ve never seen such a nice result.

Quality Dependence on Source

This section compares the performance of the engines when the source resolution progressively degrades for the flute illustration above.

1000 x 200 px

At 1000 x 200 px, this is about the lowest resolution in which manual tracing can be done.  Files smaller than this would miss lines and require subjective interpretation to fill in the details.  As with above, the edges are unblended, and the background is partially transparent.

Vectorization for 1000px (1/4 resolution of 2000px above).
Paths for vectorizing from intermediate resolution source.

It is note-worthy that there are presets can have the same name in CS5 and CS6, but give very different results.  Sometimes the “same” preset give much better looking results in CS5 than CS6.  The default suggested, or expected, option is frequently not what the optimal one for the situation.  In this case, CS5 gives extraneous paths, to the tune of being unusable, whereas CS6 generally misses shapes with the same parameter.

Vector Magic, once again, does extremely well.  Its output is only marginally different from the result from a 4x higher resolution source.  The notably different parts is the fidelity loss on the type, the dash-lines between the red/blue keys, and the rightmost curve at the end of the flute.  Color me impressed.

500 x 100px

At 1/16th of the original size, the source image has text that can barely be read and lines that are no longer pixel-contiguous.  General trend from above holds: CS5 gives a mess of shapes, CS6 gives cleaner lines, and Vector Magic gets the idea across better than either of Adobe’s versions.

Low resolution vectorization.


(Early) Conclusion on CS6’s Trace

The tracing engine in CS6 is better than that in CS5 for all kinds of images.  It gives much more logical, clean, and faithful lines on non-photorealistic images, and sets the bar for photo-vectorization.  However, when it comes to non-photorealistic images, especially as the sources gets lower in quality, VectorMagic is still the king of the hill and probably not going out of business anytime soon.

I’m not so sure about Adobe’s claim in a feature video that CS6’s trace is simpler to use – there are similar plethora of presets to CS5, plus dozens of adjustable parameters, and the automated choices are often not the optimal one.  I remain confused by the presence of different presets in the control drop-down box and the Image Trace panel, and identically named presets behave altogether differently.

In terms of additional options, there is a new “overlapping shape” option in CS6 which I have not tried out yet.  There was an “outline” option that was new in CS6 Image Trace panel – I imagined that it searches for the boundaries between objects and strokes them.  It doesn’t do that – it just renders the shapes it find with a 1pt black stroke (identical to expand -> select all -> D (default appearance) -> / (remove fill)).

Personally, I can’t see myself relying on CS6’s trace any more than I would on CS5.  Most of the things I vectorize are relatively simple, non-photorealistic images from low-quality sources.  Being a pretty quick tracer (and armed with a tablet), most of these are 5-10 minutes effort with guaranteed clean lines in a logical structure.  That said, seeing its success with photographic images, I might try the CS6 ImageTrace for tracing complex gradients (matching them manually is painful and time-consuming).  It’s certainly not in itself a valid reason to upgrade…

Pictorial IR & NMR Guides in Spanish

Thanks to Henry Hughes‘ (UNGS Argentina) attentive work (and patient prodding), both the IR and NMR guides are now available in Spanish.

This edition contains one of the long-anticipated “technology upgrade”.  Since the first spreads were one-off efforts intended for private use with my students, I simply chose a readable free font (WebLetterer).  As more spreads, and translations, come into the horizon, the limits of the font-set (only capital letters A-Z, limited symbols) came into focus.  After investigating a large number of fonts, these spreads are re-set to a new set of more feature-complete fonts by Kimberley Geswein (LikeASkyscraper).

To view the full-size picture, click on the images.

Interpretando Espectros IR, traducido por Henry Hughes.
Interpretando RMN-1H. Traducido por Henry Hughes.

For print, the PDF versions would provide best results: IR illustrated EspanolInterpretingNMR_r5_Espanol.