Drawing Braids: Difference between revisions
DrorsRobot (talk | contribs) No edit summary |
No edit summary |
||
| (8 intermediate revisions by 4 users not shown) | |||
| Line 5: | Line 5: | ||
<!--$$?BraidPlot$$--> |
<!--$$?BraidPlot$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{HelpLine| |
|||
{{Help1|n=1|s=BraidPlot}} |
|||
n = 2 | |
|||
| ⚫ | |||
in = <nowiki>BraidPlot</nowiki> | |
|||
{{Help2}} |
|||
| ⚫ | |||
<!--END--> |
<!--END--> |
||
| Line 14: | Line 15: | ||
<!--$$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"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{ |
{{In| |
||
n = 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"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{Graphics| |
|||
{{Graphics1|n=3}} |
|||
n = 4 | |
|||
Show[BraidPlot[br]] |
in = <nowiki>Show[BraidPlot[br]]</nowiki> | |
||
{{Graphics2|n=3|imagename=Drawing_Braids_Out_3.gif}} |
|||
img= Drawing_Braids_Out_4.gif | |
|||
out= <nowiki>-Graphics-</nowiki>}} |
|||
<!--END--> |
<!--END--> |
||
| Line 30: | Line 33: | ||
<!--$$Options[BraidPlot]$$--> |
<!--$$Options[BraidPlot]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{ |
{{InOut| |
||
n = 5 | |
|||
in = <nowiki>Options[BraidPlot]</nowiki> | |
|||
out= <nowiki>{Mode -> Graphics, Images -> {0.gif, 1.gif, 2.gif, 3.gif, 4.gif}, |
|||
HTMLOpts -> }</nowiki> |
HTMLOpts -> , WikiOpts -> }</nowiki>}} |
||
{{InOut3}} |
|||
<!--END--> |
<!--END--> |
||
| Line 42: | Line 45: | ||
<!--$$BraidPlot[br, Mode -> "HTML"]$$--> |
<!--$$BraidPlot[br, Mode -> "HTML"]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{ |
{{InOut| |
||
n = 6 | |
|||
in = <nowiki>BraidPlot[br, Mode -> "HTML"]</nowiki> | |
|||
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 50: | 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></nowiki> |
</table></nowiki>}} |
||
{{InOut3}} |
|||
<!--END--> |
<!--END--> |
||
| Line 74: | Line 77: | ||
<!--$$Images /. Options[BraidPlot]$$--> |
<!--$$Images /. Options[BraidPlot]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{ |
{{InOut| |
||
n = 7 | |
|||
<pre style="color: red; border: 0px; padding: 0em"><nowiki>Images /. Options[BraidPlot]</nowiki></pre> |
|||
in = <nowiki>Images /. Options[BraidPlot]</nowiki> | |
|||
out= <nowiki>{0.gif, 1.gif, 2.gif, 3.gif, 4.gif}</nowiki>}} |
|||
{{InOut3}} |
|||
<!--END--> |
<!--END--> |
||
| Line 84: | Line 87: | ||
<!--$$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"--> |
<!--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=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> |
||
</table></nowiki> |
</table></nowiki>}} |
||
{{InOut3}} |
|||
<!--END--> |
<!--END--> |
||
| Line 100: | Line 103: | ||
<!--$$?CollapseBraid$$--> |
<!--$$?CollapseBraid$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{HelpLine| |
|||
{{Help1|n=8|s=CollapseBraid}} |
|||
n = 9 | |
|||
| ⚫ | |||
in = <nowiki>CollapseBraid</nowiki> | |
|||
{{Help2}} |
|||
| ⚫ | |||
<!--END--> |
<!--END--> |
||
| Line 109: | Line 113: | ||
<!--$$br1 = BR[TorusKnot[5, 4]]$$--> |
<!--$$br1 = BR[TorusKnot[5, 4]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--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>}} |
|||
{{InOut3}} |
|||
<!--END--> |
<!--END--> |
||
<!--$$Show[BraidPlot[br1]]$$--> |
<!--$$Show[BraidPlot[br1]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{Graphics| |
|||
{{Graphics1|n=10}} |
|||
n = 11 | |
|||
Show[BraidPlot[br1]] |
in = <nowiki>Show[BraidPlot[br1]]</nowiki> | |
||
{{Graphics2|n=10|imagename=Drawing_Braids_Out_10.gif}} |
|||
img= Drawing_Braids_Out_11.gif | |
|||
out= <nowiki>-Graphics-</nowiki>}} |
|||
<!--END--> |
<!--END--> |
||
<!--$$br2 = CollapseBraid[BR[TorusKnot[5, 4]]]$$--> |
<!--$$br2 = CollapseBraid[BR[TorusKnot[5, 4]]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{InOut| |
|||
{{InOut1|n=11}} |
|||
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> |
{3}}]</nowiki>}} |
||
{{InOut3}} |
|||
<!--END--> |
<!--END--> |
||
<!--$$Show[BraidPlot[br2]]$$--> |
<!--$$Show[BraidPlot[br2]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{Graphics| |
|||
{{Graphics1|n=12}} |
|||
n = 13 | |
|||
Show[BraidPlot[br2]] |
in = <nowiki>Show[BraidPlot[br2]]</nowiki> | |
||
{{Graphics2|n=12|imagename=Drawing_Braids_Out_12.gif}} |
|||
img= Drawing_Braids_Out_13.gif | |
|||
out= <nowiki>-Graphics-</nowiki>}} |
|||
<!--END--> |
<!--END--> |
||
Latest revision as of 17:20, 21 February 2013
(For In[1] see Setup)
| ||||
Thus for example,
In[3]:=
|
br = BR[5, {{1,3}, {-2,-4}, {1, 3}}];
|
In[4]:=
|
Show[BraidPlot[br]]
|
| |
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
,
,
,
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[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:
| ||||
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]]
|
| |
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]]
|
| |
Out[13]=
|
-Graphics-
|


