Drawing Braids: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
No edit summary
No edit summary
 
(18 intermediate revisions by 5 users not shown)
Line 4: Line 4:


<!--$$?BraidPlot$$-->
<!--$$?BraidPlot$$-->
<!--Robot Land, no human edits to "END"-->
<!--The lines to END were generated by WikiSplice: do not edit; see manual.-->
{{HelpLine|
{{Help1|n=2|s=BraidPlot}}
n = 2 |
BraidPlot[br, opts] produces a plot of the braid br. Possible options are Mode, HTMLOpts and Images.
in = <nowiki>BraidPlot</nowiki> |
{{Help2}}
out= <nowiki>BraidPlot[br, opts] produces a plot of the braid br. Possible options are Mode, HTMLOpts, WikiOpts and Images.</nowiki>}}
<!--END-->
<!--END-->


Line 13: Line 14:


<!--$$br = BR[5, {{1,3}, {-2,-4}, {1, 3}}];$$-->
<!--$$br = BR[5, {{1,3}, {-2,-4}, {1, 3}}];$$-->
<!--Robot Land, no human edits to "END"-->
<!--The lines to END were generated by WikiSplice: do not edit; see manual.-->
{{In1|n=3}}
{{In|
n = 3 |
br = BR[5, {{1,3}, {-2,-4}, {1, 3}}];
in = <nowiki>br = BR[5, {{1,3}, {-2,-4}, {1, 3}}];</nowiki>}}
{{In2}}
<!--END-->
<!--END-->


<!--$$Show[BraidPlot[br]]$$-->
<!--$$Show[BraidPlot[br]]$$-->
<!--Robot Land, no human edits to "END"-->
<!--The lines to END were generated by WikiSplice: do not edit; see manual.-->
{{Graphics|
{{Graphics1|n=4}}
n = 4 |
Show[BraidPlot[br]]
in = <nowiki>Show[BraidPlot[br]]</nowiki> |
{{Graphics2|n=4|imagename=Drawing_Braids_Out_4.gif}}
img= Drawing_Braids_Out_4.gif |
out= <nowiki>-Graphics-</nowiki>}}
<!--END-->
<!--END-->


Line 29: Line 32:


<!--$$Options[BraidPlot]$$-->
<!--$$Options[BraidPlot]$$-->
<!--Robot Land, no human edits to "END"-->
<!--The lines to END were generated by WikiSplice: do not edit; see manual.-->
{{InOut1|n=5}}
{{InOut|
n = 5 |
Options[BraidPlot]
in = <nowiki>Options[BraidPlot]</nowiki> |
{{InOut2|n=5}}<pre style="border: 0px; padding: 0em">{Mode -> Graphics, Images -> {0.gif, 1.gif, 2.gif, 3.gif, 4.gif}, HTMLOpts -> }</pre>
out= <nowiki>{Mode -> Graphics, Images -> {0.gif, 1.gif, 2.gif, 3.gif, 4.gif},
{{InOut3}}
HTMLOpts -> , WikiOpts -> }</nowiki>}}
<!--END-->
<!--END-->


Line 39: Line 44:


<!--$$BraidPlot[br, Mode -> "HTML"]$$-->
<!--$$BraidPlot[br, Mode -> "HTML"]$$-->
<!--Robot Land, no human edits to "END"-->
<!--The lines to END were generated by WikiSplice: do not edit; see manual.-->
{{InOut1|n=6}}
{{InOut|
n = 6 |
BraidPlot[br, Mode -> "HTML"]
in = <nowiki>BraidPlot[br, Mode -> "HTML"]</nowiki> |
{{InOut2|n=6}}<pre style="border: 0px; padding: 0em"><table cellspacing=0 cellpadding=0 border=0>
out= <nowiki><table cellspacing=0 cellpadding=0 border=0>
<tr><td><img src=1.gif><img src=0.gif><img src=1.gif></td></tr>
<tr><td><img src=1.gif><img src=0.gif><img src=1.gif></td></tr>
<tr><td><img src=2.gif><img src=3.gif><img src=2.gif></td></tr>
<tr><td><img src=2.gif><img src=3.gif><img src=2.gif></td></tr>
Line 48: Line 54:
<tr><td><img src=2.gif><img src=3.gif><img src=2.gif></td></tr>
<tr><td><img src=2.gif><img src=3.gif><img src=2.gif></td></tr>
<tr><td><img src=0.gif><img src=4.gif><img src=0.gif></td></tr>
<tr><td><img src=0.gif><img src=4.gif><img src=0.gif></td></tr>
</table></pre>
</table></nowiki>}}
{{InOut3}}
<!--END-->
<!--END-->


The table produced contains an array of image inclusions that together draws the braid using 5 fundamental building blocks: a horizontal "unbraided" line (<tt>0.gif</tt> above), the upper and lower halves of an overcrossing (<tt>1.gif</tt> and <tt>2.gif</tt> above) and the upper and lower halves of an underfcrossing (<tt>3.gif</tt> and <tt>4.gif</tt> above).
The table produced contains an array of image inclusions that together draws the braid using 5 fundamental building blocks: a horizontal "unbraided" line (<tt>0.gif</tt> above), the upper and lower halves of an overcrossing (<tt>1.gif</tt> and <tt>2.gif</tt> above) and the upper and lower halves of an underfcrossing (<tt>3.gif</tt> and <tt>4.gif</tt> above).


Assuming <tt>0.gif</tt> through <tt>4.gif</tt> are [[Image:BraidPart0]], [[Image:BraidPart1]], [[Image:BraidPart2]], [[Image:BraidPart3]] and [[Image:BraidPart4]],
Assuming <tt>0.gif</tt> through <tt>4.gif</tt> are [[Image:BraidPart0.gif]], [[Image:BraidPart1.gif]], [[Image:BraidPart2.gif]], [[Image:BraidPart3.gif]] and [[Image:BraidPart4.gif]], the above table is rendered as follows:

{| cellspacing=0 cellpadding=0 border=0 align=center
|[[Image:BraidPart1.gif]][[Image:BraidPart0.gif]][[Image:BraidPart1.gif]]
|-
|[[Image:BraidPart2.gif]][[Image:BraidPart3.gif]][[Image:BraidPart2.gif]]
|-
|[[Image:BraidPart1.gif]][[Image:BraidPart4.gif]][[Image:BraidPart1.gif]]
|-
|[[Image:BraidPart2.gif]][[Image:BraidPart3.gif]][[Image:BraidPart2.gif]]
|-
|[[Image:BraidPart0.gif]][[Image:BraidPart4.gif]][[Image:BraidPart0.gif]]
|}

The meaning of the <code>Images</code> option to <code>BraidPlot</code> should be clear from reading its default definition:

<!--$$Images /. Options[BraidPlot]$$-->
<!--Robot Land, no human edits to "END"-->
{{InOut|
n = 7 |
in = <nowiki>Images /. Options[BraidPlot]</nowiki> |
out= <nowiki>{0.gif, 1.gif, 2.gif, 3.gif, 4.gif}</nowiki>}}
<!--END-->

The <code>HTMLOpts</code> option to <code>BraidPlot</code> allows to insert options within the HTML <tt>&lt;img&gt;</tt> tags. Thus

<!--$$BraidPlot[BR[2, {1, 1}], Mode -> "HTML", HTMLOpts -> "border=1"]$$-->
<!--Robot Land, no human edits to "END"-->
{{InOut|
n = 8 |
in = <nowiki>BraidPlot[BR[2, {1, 1}], Mode -> "HTML", HTMLOpts -> "border=1"]</nowiki> |
out= <nowiki><table cellspacing=0 cellpadding=0 border=0>
<tr><td><img border=1 src=1.gif><img border=1 src=1.gif></td></tr>
<tr><td><img border=1 src=2.gif><img border=1 src=2.gif></td></tr>
</table></nowiki>}}
<!--END-->

The above table is rendered as follows:

<center>[[Image:BraidPlotHTMLExample2.gif]]</center>


<!--$$?CollapseBraid$$-->
<!--Robot Land, no human edits to "END"-->
{{HelpLine|
n = 9 |
in = <nowiki>CollapseBraid</nowiki> |
out= <nowiki>CollapseBraid[br] groups together commuting generators in the braid br. Useful in conjunction with BraidPlot to produce compact braid plots.</nowiki>}}
<!--END-->

Thus compare the plots of <code>br1</code> and <code>br2</code> below:

<!--$$br1 = BR[TorusKnot[5, 4]]$$-->
<!--Robot Land, no human edits to "END"-->
{{InOut|
n = 10 |
in = <nowiki>br1 = BR[TorusKnot[5, 4]]</nowiki> |
out= <nowiki>BR[4, {1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3}]</nowiki>}}
<!--END-->

<!--$$Show[BraidPlot[br1]]$$-->
<!--Robot Land, no human edits to "END"-->
{{Graphics|
n = 11 |
in = <nowiki>Show[BraidPlot[br1]]</nowiki> |
img= Drawing_Braids_Out_11.gif |
out= <nowiki>-Graphics-</nowiki>}}
<!--END-->

<!--$$br2 = CollapseBraid[BR[TorusKnot[5, 4]]]$$-->
<!--Robot Land, no human edits to "END"-->
{{InOut|
n = 12 |
in = <nowiki>br2 = CollapseBraid[BR[TorusKnot[5, 4]]]</nowiki> |
out= <nowiki>BR[4, {{1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3, 1}, {2},
{3}}]</nowiki>}}
<!--END-->

<!--$$Show[BraidPlot[br2]]$$-->
<!--Robot Land, no human edits to "END"-->
{{Graphics|
n = 13 |
in = <nowiki>Show[BraidPlot[br2]]</nowiki> |
img= Drawing_Braids_Out_13.gif |
out= <nowiki>-Graphics-</nowiki>}}
<!--END-->

Latest revision as of 18:20, 21 February 2013


(For In[1] see Setup)

In[2]:= ?BraidPlot
BraidPlot[br, opts] produces a plot of the braid br. Possible options are Mode, HTMLOpts, WikiOpts and Images.

Thus for example,

In[3]:= br = BR[5, {{1,3}, {-2,-4}, {1, 3}}];
In[4]:= Show[BraidPlot[br]]
Drawing Braids Out 4.gif
Out[4]= -Graphics-

BraidPlot takes several options:

In[5]:= Options[BraidPlot]
Out[5]= {Mode -> Graphics, Images -> {0.gif, 1.gif, 2.gif, 3.gif, 4.gif}, HTMLOpts -> , WikiOpts -> }

The Mode option to BraidPlot defaults to "Graphics", which produces output as above. An alternative is setting Mode -> "HTML", which produces an HTML <table> that can be readily inserted into HTML documents:

In[6]:= BraidPlot[br, Mode -> "HTML"]
Out[6]= <table cellspacing=0 cellpadding=0 border=0> <tr><td><img src=1.gif><img src=0.gif><img src=1.gif></td></tr> <tr><td><img src=2.gif><img src=3.gif><img src=2.gif></td></tr> <tr><td><img src=1.gif><img src=4.gif><img src=1.gif></td></tr> <tr><td><img src=2.gif><img src=3.gif><img src=2.gif></td></tr> <tr><td><img src=0.gif><img src=4.gif><img src=0.gif></td></tr> </table>

The table produced contains an array of image inclusions that together draws the braid using 5 fundamental building blocks: a horizontal "unbraided" line (0.gif above), the upper and lower halves of an overcrossing (1.gif and 2.gif above) and the upper and lower halves of an underfcrossing (3.gif and 4.gif above).

Assuming 0.gif through 4.gif are BraidPart0.gif, BraidPart1.gif, BraidPart2.gif, BraidPart3.gif and BraidPart4.gif, the above table is rendered as follows:

BraidPart1.gifBraidPart0.gifBraidPart1.gif
BraidPart2.gifBraidPart3.gifBraidPart2.gif
BraidPart1.gifBraidPart4.gifBraidPart1.gif
BraidPart2.gifBraidPart3.gifBraidPart2.gif
BraidPart0.gifBraidPart4.gifBraidPart0.gif

The meaning of the Images option to BraidPlot should be clear from reading its default definition:

In[7]:= Images /. Options[BraidPlot]
Out[7]= {0.gif, 1.gif, 2.gif, 3.gif, 4.gif}

The HTMLOpts option to BraidPlot allows to insert options within the HTML <img> tags. Thus

In[8]:= BraidPlot[BR[2, {1, 1}], Mode -> "HTML", HTMLOpts -> "border=1"]
Out[8]= <table cellspacing=0 cellpadding=0 border=0> <tr><td><img border=1 src=1.gif><img border=1 src=1.gif></td></tr> <tr><td><img border=1 src=2.gif><img border=1 src=2.gif></td></tr> </table>

The above table is rendered as follows:

BraidPlotHTMLExample2.gif


In[9]:= ?CollapseBraid
CollapseBraid[br] groups together commuting generators in the braid br. Useful in conjunction with BraidPlot to produce compact braid plots.

Thus compare the plots of br1 and br2 below:

In[10]:= br1 = BR[TorusKnot[5, 4]]
Out[10]= BR[4, {1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3}]
In[11]:= Show[BraidPlot[br1]]
Drawing Braids Out 11.gif
Out[11]= -Graphics-
In[12]:= br2 = CollapseBraid[BR[TorusKnot[5, 4]]]
Out[12]= BR[4, {{1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3}}]
In[13]:= Show[BraidPlot[br2]]
Drawing Braids Out 13.gif
Out[13]= -Graphics-