Drawing Planar Diagrams: Difference between revisions
No edit summary |
No edit summary |
||
(7 intermediate revisions by 2 users not shown) | |||
Line 7: | Line 7: | ||
<!--$$?DrawPD$$--> |
<!--$$?DrawPD$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{HelpAndAbout| |
|||
{{HelpAndAbout1|n=1|s=DrawPD}} |
|||
n = 2 | |
|||
⚫ | |||
n1 = 3 | |
|||
{{HelpAndAbout2|n=2|s=DrawPD}} |
|||
in = <nowiki>DrawPD</nowiki> | |
|||
⚫ | |||
out= <nowiki>DrawPD[pd] takes the planar diagram description pd and creates a graphics object containing a picture of the knot. |
|||
{{HelpAndAbout3}} |
|||
DrawPD[pd,options], where options is a list of rules, allows the user to control some of the parameters. OuterFace->n sets the face at infinity to the face numbered n. |
|||
⚫ | |||
⚫ | |||
<!--END--> |
<!--END--> |
||
Line 18: | Line 21: | ||
<!--$$Show[DrawPD[TorusKnot[4, 3]]]$$--> |
<!--$$Show[DrawPD[TorusKnot[4, 3]]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{Graphics| |
|||
{{Graphics1|n=3}} |
|||
n = 4 | |
|||
Show[DrawPD[TorusKnot[4, 3]]] |
in = <nowiki>Show[DrawPD[TorusKnot[4, 3]]]</nowiki> | |
||
{{Graphics2|n=3|imagename=Drawing_Planar_Diagrams_Out_3.gif}} |
|||
img= Drawing_Planar_Diagrams_Out_4.gif | |
|||
out= <nowiki>-Graphics-</nowiki>}} |
|||
<!--END--> |
<!--END--> |
||
One problem we currently have is that crossings come out at non-uniform sizes, hence in the picture below you may need magnifying glasses to decide who's over and who's under: |
One problem we currently have is that crossings come out at non-uniform sizes, hence in the picture below you may need magnifying glasses to decide who's over and who's under: |
||
<!--$$MillettUnknot = PD[ |
|||
<!--$$MillettUnknot = PD[X[1,10,2,11], X[9,2,10,3], X[3,7,4,6], X[15,5,16,4], X[5,17,6,16],X[7,14,8,15], X[8,18,9,17], X[11,18,12,19], X[19,12,20,13], X[13,20,14,1]];$$--> |
|||
X[1,10,2,11], X[9,2,10,3], X[3,7,4,6], X[15,5,16,4], |
|||
X[5,17,6,16],X[7,14,8,15], X[8,18,9,17], X[11,18,12,19], |
|||
X[19,12,20,13], X[13,20,14,1] |
|||
];$$--> |
|||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{ |
{{In| |
||
n = 5 | |
|||
<pre style="color: red; border: 0px; padding: 0em"><nowiki>MillettUnknot = PD[X[1,10,2,11], X[9,2,10,3], X[3,7,4,6], X[15,5,16,4], X[5,17,6,16],X[7,14,8,15], X[8,18,9,17], X[11,18,12,19], X[19,12,20,13], X[13,20,14,1]];</nowiki></pre> |
|||
in = <nowiki>MillettUnknot = PD[ |
|||
{{In2}} |
|||
X[1,10,2,11], X[9,2,10,3], X[3,7,4,6], X[15,5,16,4], |
|||
X[5,17,6,16],X[7,14,8,15], X[8,18,9,17], X[11,18,12,19], |
|||
X[19,12,20,13], X[13,20,14,1] |
|||
];</nowiki>}} |
|||
<!--END--> |
<!--END--> |
||
<!--$$Show[DrawPD[MillettUnknot]]$$--> |
<!--$$Show[DrawPD[MillettUnknot]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{Graphics| |
|||
{{Graphics1|n=5}} |
|||
n = 6 | |
|||
Show[DrawPD[MillettUnknot]] |
in = <nowiki>Show[DrawPD[MillettUnknot]]</nowiki> | |
||
{{Graphics2|n=5|imagename=Drawing_Planar_Diagrams_Out_5.gif}} |
|||
⚫ | |||
out= <nowiki>-Graphics-</nowiki>}} |
|||
<!--END--> |
<!--END--> |
||
Line 43: | Line 58: | ||
<!--$$Show[DrawPD[MillettUnknot, {Gap -> 0.03}]]$$--> |
<!--$$Show[DrawPD[MillettUnknot, {Gap -> 0.03}]]$$--> |
||
<!--Robot Land, no human edits to "END"--> |
<!--Robot Land, no human edits to "END"--> |
||
{{Graphics| |
|||
{{Graphics1|n=6}} |
|||
n = 7 | |
|||
Show[DrawPD[MillettUnknot, {Gap -> 0.03}]] |
in = <nowiki>Show[DrawPD[MillettUnknot, {Gap -> 0.03}]]</nowiki> | |
||
⚫ | |||
img= Drawing_Planar_Diagrams_Out_7.gif | |
|||
out= <nowiki>-Graphics-</nowiki>}} |
|||
<!--END--> |
<!--END--> |
||
<div id="How does it work?"> |
<div id="How does it work?"> |
||
== How does it work? == |
==== How does it work? ==== |
||
</div> |
</div> |
||
⚫ | |||
⚫ | <code>DrawPD</code> uses Andreev's theorem {{ref|Andreev1}}, {{ref|Andreev2}}, which states that every planar graph can be realized, nearly uniquely, as the graph of tangencies of circles drawn within the unit disk. That is, to every vertex of <math>G</math> one may associate a disk within the unit disk, so that the interiors of these disks are disjoint and they are tangent iff the corresponding vertices are connected by an edge. The Andreev "circle packing" corresponding to the knot [[4_1]] is the first |
||
⚫ | <code>DrawPD</code> uses Andreev's theorem {{ref|Andreev1}}, {{ref|Andreev2}}, which states that every planar graph can be realized, nearly uniquely, as the graph of tangencies of circles drawn within the unit disk. That is, to every vertex of <math>G</math> one may associate a disk within the unit disk, so that the interiors of these disks are disjoint and they are tangent iff the corresponding vertices are connected by an edge. The Andreev "circle packing" corresponding to the knot [[4_1]] is the first picture on the right (circle 13 is the unit disk itself). |
||
⚫ | |||
But now every ingredient of the original knot (every arc, crossing and face) has a disk in the plane in which it can be cleanly drawn and clashes are guaranteed not to occur. Furthermore, knowing the precise coordinates of all the tangency points allows us to represent each ingredient by some nice smooth arcs that meet smoothly. The result is the second |
But now every ingredient of the original knot (every arc, crossing and face) has a disk in the plane in which it can be cleanly drawn and clashes are guaranteed not to occur. Furthermore, knowing the precise coordinates of all the tangency points allows us to represent each ingredient by some nice smooth arcs that meet smoothly. The result is the second picture on the right. Removing all the circles, what remains is the desired clean planar picture of [[4_1]]. |
||
{{note|Andreev1}} A. Andreev, ''On convex polyhedra in Lobacevskii spaces'' (in Russian), Math. Sbornik USSR, Nov. Ser. '''81''' (1970) 445-478. |
{{note|Andreev1}} A. Andreev, ''On convex polyhedra in Lobacevskii spaces'' (in Russian), Math. Sbornik USSR, Nov. Ser. '''81''' (1970) 445-478. |
Latest revision as of 17:20, 21 February 2013
My summer student Emily Redelmeier is in the process of writing a program that uses circle packing to draw an arbitrary object given as a PD
as in Planar Diagrams. At the moment her program is still slow, limited and sometimes buggy, but it is already quite useful, as the following lines show:
(For In[1] see Setup)
|
|
Thus, for example, here's the torus knot T(4,3):
In[4]:=
|
Show[DrawPD[TorusKnot[4, 3]]]
|
Out[4]=
|
-Graphics-
|
One problem we currently have is that crossings come out at non-uniform sizes, hence in the picture below you may need magnifying glasses to decide who's over and who's under:
In[5]:=
|
MillettUnknot = PD[
X[1,10,2,11], X[9,2,10,3], X[3,7,4,6], X[15,5,16,4],
X[5,17,6,16],X[7,14,8,15], X[8,18,9,17], X[11,18,12,19],
X[19,12,20,13], X[13,20,14,1]
];
|
In[6]:=
|
Show[DrawPD[MillettUnknot]]
|
Out[6]=
|
-Graphics-
|
In such a situation, the option Gap
is sometimes handy:
In[7]:=
|
Show[DrawPD[MillettUnknot, {Gap -> 0.03}]]
|
Out[7]=
|
-Graphics-
|
How does it work?
DrawPD
uses Andreev's theorem [Andreev1], [Andreev2], which states that every planar graph can be realized, nearly uniquely, as the graph of tangencies of circles drawn within the unit disk. That is, to every vertex of one may associate a disk within the unit disk, so that the interiors of these disks are disjoint and they are tangent iff the corresponding vertices are connected by an edge. The Andreev "circle packing" corresponding to the knot 4_1 is the first picture on the right (circle 13 is the unit disk itself).
But now every ingredient of the original knot (every arc, crossing and face) has a disk in the plane in which it can be cleanly drawn and clashes are guaranteed not to occur. Furthermore, knowing the precise coordinates of all the tangency points allows us to represent each ingredient by some nice smooth arcs that meet smoothly. The result is the second picture on the right. Removing all the circles, what remains is the desired clean planar picture of 4_1.
[Andreev1] ^ A. Andreev, On convex polyhedra in Lobacevskii spaces (in Russian), Math. Sbornik USSR, Nov. Ser. 81 (1970) 445-478.
[Andreev2] ^ A. Andreev, On convex polyhedra of finite volume in Lobacevskii spaces (in Russian), Math. Sbornik USSR, Nov. Ser. 83 (1970) 256-260.