Drawing Braids: Difference between revisions
DrorsRobot (talk | contribs) No edit summary |
No edit summary |
||
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.--> |
|||
{{Help1|n= |
{{Help1|n=1|s=BraidPlot}} |
||
BraidPlot[br, opts] produces a plot of the braid br. Possible options are Mode, HTMLOpts and Images. |
BraidPlot[br, opts] produces a plot of the braid br. Possible options are Mode, HTMLOpts and Images. |
||
{{Help2}} |
{{Help2}} |
||
Line 13: | Line 13: | ||
<!--$$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= |
{{In1|n=2}} |
||
br = BR[5, {{1,3}, {-2,-4}, {1, 3}}]; |
<pre style="color: red; border: 0px; padding: 0em"><nowiki>br = BR[5, {{1,3}, {-2,-4}, {1, 3}}];</nowiki></pre> |
||
{{In2}} |
{{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.--> |
|||
{{Graphics1|n= |
{{Graphics1|n=3}} |
||
Show[BraidPlot[br]] |
Show[BraidPlot[br]] |
||
{{Graphics2|n= |
{{Graphics2|n=3|imagename=Drawing_Braids_Out_3.gif}} |
||
<!--END--> |
<!--END--> |
||
Line 29: | Line 29: | ||
<!--$$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= |
{{InOut1|n=4}} |
||
<pre style="color: red; border: 0px; padding: 0em"><nowiki>Options[BraidPlot]</nowiki></pre> |
|||
Options[BraidPlot] |
|||
{{InOut2|n= |
{{InOut2|n=4}}<pre style="border: 0px; padding: 0em"><nowiki>{Mode -> Graphics, Images -> {0.gif, 1.gif, 2.gif, 3.gif, 4.gif}, HTMLOpts -> }</nowiki></pre> |
||
{{InOut3}} |
{{InOut3}} |
||
<!--END--> |
<!--END--> |
||
Line 39: | Line 39: | ||
<!--$$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= |
{{InOut1|n=5}} |
||
BraidPlot[br, Mode -> "HTML"] |
<pre style="color: red; border: 0px; padding: 0em"><nowiki>BraidPlot[br, Mode -> "HTML"]</nowiki></pre> |
||
{{InOut2|n= |
{{InOut2|n=5}}<pre style="border: 0px; padding: 0em"><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 71: | Line 71: | ||
<!--$$Images /. Options[BraidPlot]$$--> |
<!--$$Images /. Options[BraidPlot]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
|||
<!--The lines to END were generated by WikiSplice: do not edit; see manual.--> |
|||
{{InOut1|n= |
{{InOut1|n=6}} |
||
Images /. Options[BraidPlot] |
<pre style="color: red; border: 0px; padding: 0em"><nowiki>Images /. Options[BraidPlot]</nowiki></pre> |
||
{{InOut2|n= |
{{InOut2|n=6}}<pre style="border: 0px; padding: 0em"><nowiki>{0.gif, 1.gif, 2.gif, 3.gif, 4.gif}</nowiki></pre> |
||
{{InOut3}} |
{{InOut3}} |
||
<!--END--> |
<!--END--> |
||
Line 81: | Line 81: | ||
<!--$$BraidPlot[BR[2, {1, 1}], Mode -> "HTML", HTMLOpts -> "border=1"]$$--> |
<!--$$BraidPlot[BR[2, {1, 1}], Mode -> "HTML", HTMLOpts -> "border=1"]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
|||
<!--The lines to END were generated by WikiSplice: do not edit; see manual.--> |
|||
{{InOut1|n= |
{{InOut1|n=7}} |
||
BraidPlot[BR[2, {1, 1}], Mode -> "HTML", HTMLOpts -> "border=1"] |
<pre style="color: red; border: 0px; padding: 0em"><nowiki>BraidPlot[BR[2, {1, 1}], Mode -> "HTML", HTMLOpts -> "border=1"]</nowiki></pre> |
||
{{InOut2|n= |
{{InOut2|n=7}}<pre style="border: 0px; padding: 0em"><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=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> |
<tr><td><img border=1 src=2.gif><img border=1 src=2.gif></td></tr> |
||
Line 97: | Line 97: | ||
<!--$$?CollapseBraid$$--> |
<!--$$?CollapseBraid$$--> |
||
<!--Robot Land, no human edits to "END"--> |
|||
<!--The lines to END were generated by WikiSplice: do not edit; see manual.--> |
|||
{{Help1|n= |
{{Help1|n=8|s=CollapseBraid}} |
||
CollapseBraid[br] groups together commuting generators in the braid br. Useful in conjunction with BraidPlot to produce compact braid plots. |
CollapseBraid[br] groups together commuting generators in the braid br. Useful in conjunction with BraidPlot to produce compact braid plots. |
||
{{Help2}} |
{{Help2}} |
||
Line 106: | Line 106: | ||
<!--$$br1 = BR[TorusKnot[5, 4]]$$--> |
<!--$$br1 = BR[TorusKnot[5, 4]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
|||
<!--The lines to END were generated by WikiSplice: do not edit; see manual.--> |
|||
{{InOut1|n= |
{{InOut1|n=9}} |
||
br1 = BR[TorusKnot[5, 4]] |
<pre style="color: red; border: 0px; padding: 0em"><nowiki>br1 = BR[TorusKnot[5, 4]]</nowiki></pre> |
||
{{InOut2|n= |
{{InOut2|n=9}}<pre style="border: 0px; padding: 0em"><nowiki>BR[4, {1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3}]</nowiki></pre> |
||
{{InOut3}} |
{{InOut3}} |
||
<!--END--> |
<!--END--> |
||
<!--$$Show[BraidPlot[br1]]$$--> |
<!--$$Show[BraidPlot[br1]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
|||
<!--The lines to END were generated by WikiSplice: do not edit; see manual.--> |
|||
{{Graphics1|n= |
{{Graphics1|n=10}} |
||
Show[BraidPlot[br1]] |
Show[BraidPlot[br1]] |
||
{{Graphics2|n= |
{{Graphics2|n=10|imagename=Drawing_Braids_Out_10.gif}} |
||
<!--END--> |
<!--END--> |
||
<!--$$br2 = CollapseBraid[BR[TorusKnot[5, 4]]]$$--> |
<!--$$br2 = CollapseBraid[BR[TorusKnot[5, 4]]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
|||
<!--The lines to END were generated by WikiSplice: do not edit; see manual.--> |
|||
{{InOut1|n= |
{{InOut1|n=11}} |
||
br2 = CollapseBraid[BR[TorusKnot[5, 4]]] |
<pre style="color: red; border: 0px; padding: 0em"><nowiki>br2 = CollapseBraid[BR[TorusKnot[5, 4]]]</nowiki></pre> |
||
{{InOut2|n= |
{{InOut2|n=11}}<pre style="border: 0px; padding: 0em"><nowiki>BR[4, {{1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3}}]</nowiki></pre> |
||
{{InOut3}} |
{{InOut3}} |
||
<!--END--> |
<!--END--> |
||
<!--$$Show[BraidPlot[br2]]$$--> |
<!--$$Show[BraidPlot[br2]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
|||
<!--The lines to END were generated by WikiSplice: do not edit; see manual.--> |
|||
{{Graphics1|n= |
{{Graphics1|n=12}} |
||
Show[BraidPlot[br2]] |
Show[BraidPlot[br2]] |
||
{{Graphics2|n= |
{{Graphics2|n=12|imagename=Drawing_Braids_Out_12.gif}} |
||
<!--END--> |
<!--END--> |
Revision as of 19:43, 27 August 2005
(For In[1] see Setup)
In[1]:= ?BraidPlot
BraidPlot[br, opts] produces a plot of the braid br. Possible options are Mode, HTMLOpts and Images. |
Thus for example,
In[2]:= |
br = BR[5, {{1,3}, {-2,-4}, {1, 3}}]; |
In[3]:= |
Show[BraidPlot[br]] |
Out[3]= | -Graphics- |
BraidPlot
takes several options:
In[4]:= |
Options[BraidPlot] |
Out[4]= | {Mode -> Graphics, Images -> {0.gif, 1.gif, 2.gif, 3.gif, 4.gif}, HTMLOpts -> } |
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[5]:= |
BraidPlot[br, Mode -> "HTML"] |
Out[5]= | <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 , , , and , the above table is rendered as follows:
The meaning of the Images
option to BraidPlot
should be clear from reading its default definition:
In[6]:= |
Images /. Options[BraidPlot] |
Out[6]= | {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[7]:= |
BraidPlot[BR[2, {1, 1}], Mode -> "HTML", HTMLOpts -> "border=1"] |
Out[7]= | <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:
In[8]:= ?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[9]:= |
br1 = BR[TorusKnot[5, 4]] |
Out[9]= | BR[4, {1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3}] |
In[10]:= |
Show[BraidPlot[br1]] |
Out[10]= | -Graphics- |
In[11]:= |
br2 = CollapseBraid[BR[TorusKnot[5, 4]]] |
Out[11]= | BR[4, {{1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3, 1}, {2}, {3}}] |
In[12]:= |
Show[BraidPlot[br2]] |
Out[12]= | -Graphics- |