06-1350/Syzygies in Asymptote

From Drorbn
Revision as of 14:45, 4 December 2006 by Andy (talk | contribs) (Started guide.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

WARNING: These instructions are a work in progress and should be considered highly unreliable.

To use the syzygy script, first install Asymptote. Instructions for installing the program on several OSes is given in the documentation at the Asymptote website. The documentation also gives helpful instruction on how to run a script in Asymptote to produce a picture. Once installed, download syzygy.asy and put it in a directory where Asymptote can find it.

Once installed, we can draw a braid in Asymptote:

import syzygy;  // Accesses the syzygy module.
Braid b;        // Start a new braid.
b.n=3;          // The braid has three strands.
                // The strands are numbered left to right starting at 0.
b.add(bp, 0);   // Add a B^+ (overcrossing) component starting at strand 0,
                // the leftmost strand.
b.add(bp, 1);   // Add another B^+ starting at strand 1.
b.add(phi, 0);  // Add a trivalent vertex that merges strands 0 and 1.
                // Strand 2 is now renumbered as strand 1.
b.draw()        // Draw the resulting braid.