Difference between revisions of "Links and tangles"

(Created page with "It's a bunch of commands I wrote to rapidly draw tangle diagrams (but it can be easily extended to simple knots and braids): enjoy them and give me any clue you want in order to ...")
 
 
Line 1: Line 1:
It's a bunch of commands I wrote to rapidly draw tangle diagrams (but it can be easily extended to simple knots and braids): enjoy them and give me any clue you want in order to improve the code... In fact the underlying idea is horribly naive and simple, so I'm open to any kind of evolution (different size/colors of the strings, et cetera).
+
It's a bunch of commands I wrote to rapidly draw tangle diagrams (but it can be easily extended to simple knots and braids): enjoy it and give me any clue you want in order to improve the code... In fact the underlying idea is horribly naive and simple, so I'm open to any kind of evolution (different size/colors of the strings, et cetera).
  
 
<code>
 
<code>

Latest revision as of 19:14, 19 October 2012

It's a bunch of commands I wrote to rapidly draw tangle diagrams (but it can be easily extended to simple knots and braids): enjoy it and give me any clue you want in order to improve the code... In fact the underlying idea is horribly naive and simple, so I'm open to any kind of evolution (different size/colors of the strings, et cetera).

\newcommand{\tangleleftcross}[2]{
\psbezier[origin={#1, #2}, linewidth=2pt](0,0)(0,1)(1,1)(1,2)
\psbezier[origin={#1, #2}, linewidth=2pt,border=2pt](0,2)(0,1)(1,1)(1,0)}

\newcommand{\tanglerightcross}[2]{
\psbezier[origin={#1, #2}, linewidth=2pt](0,2)(0,1)(1,1)(1,0)
\psbezier[origin={#1, #2}, linewidth=2pt,border=2pt](0,0)(0,1)(1,1)(1,2)}

\newcommand{\tangleleftcurl}[2]{
\psbezier[origin={#1, #2}, linewidth=2pt](0,1)(0,0)(1,.7)(1,1.5)
\psbezier[origin={#1, #2}, linewidth=2pt,border=2pt](0,1)(0,2)(1,1.3)(1,.5)
\psline[origin={#1, #2}, linewidth=2pt](1,0)(1,.5)
\psline[origin={#1, #2}, linewidth=2pt](1,1.5)(1,2)}

\newcommand{\tanglerightcurl}[2]{
\psbezier[origin={#1, #2}, linewidth=2pt](0,1)(0,2)(1,1.3)(1,.5)
\psbezier[origin={#1, #2}, linewidth=2pt,border=2pt](0,1)(0,0)(1,.7)(1,1.5)
\psline[origin={#1, #2}, linewidth=2pt](1,0)(1,.5)
\psline[origin={#1, #2}, linewidth=2pt](1,1.5)(1,2)}

\newcommand{\tanglecup}[2]{
\psbezier[origin={#1, #2}, linewidth=2pt](0,2)(0,-.3)(1,-.3)(1,2)}

\newcommand{\tanglecap}[2]{
\psbezier[origin={#1, #2}, linewidth=2pt](0,0)(0,2.3)(1,2.3)(1,0)}

\newcommand{\tangleleftid}[2]{
\psline[origin={#1, #2}, linewidth=2pt](0,0)(0,2)}

\newcommand{\tanglerightid}[2]{
\psline[origin={#1, #2}, linewidth=2pt](1,0)(1,2)}

\newcommand{\tangledoubleid}[2]{
\psline[origin={#1, #2}, linewidth=2pt](0,0)(0,2)\psline[origin={#1, #2}, linewidth=2pt](1,0)(1,2)}