Keywords: Directed medial graph example.svg en Example of a plane graph in blue and its directed medial graph in red <source lang latex > \documentclass standalone \usepackage tikz \usetikzlibrary arrows backgrounds positioning \begin document \def\nodeDist 2 5cm \def\arrowType triangle 60 \def\fillColor black 20 \def\position 0 6 \tikzstyle origVertex draw blue fill shape circle \tikzstyle newVertex draw red fill shape circle \tikzstyle invisibleVertex shape circle \tikzstyle origEdge blue \tikzstyle newEdge red densely dashed \tikzstyle invisibleEdge draw opacity 0 \begin tikzpicture node distance \nodeDist > \arrowType semithick \nodeorigVertex 0 ; \nodeorigVertex 1 right of 0 ; \nodeorigVertex 2 below of 1 ; \nodeorigVertex 3 left of 2 ; \path 0 edgeorigEdge nodeinvisibleVertex m0 1 1 edgeorigEdge nodeinvisibleVertex m1 2 2 edgeorigEdge nodeinvisibleVertex m2 3 3 edgeorigEdge nodeinvisibleVertex m3 0 ; \path m0 edgeinvisibleEdge m1 edgeinvisibleEdge out 45 in 45 looseness 3 overlay nodeinvisibleVertex pos \position e0 m1 m1 edgeinvisibleEdge m2 edgeinvisibleEdge out -45 in -45 looseness 3 overlay nodeinvisibleVertex pos \position e1 m2 m2 edgeinvisibleEdge m3 edgeinvisibleEdge out -135 in -135 looseness 3 overlay nodeinvisibleVertex pos \position e2 m3 m3 edgeinvisibleEdge m0 edgeinvisibleEdge out 135 in 135 looseness 3 overlay nodeinvisibleVertex pos \position e3 m0 ; \nodeinvisibleVertex below 0cm of e0 ; \nodeinvisibleVertex left 0cm of e1 ; \nodeinvisibleVertex above 0cm of e2 ; \nodeinvisibleVertex right 0cm of e3 ; \end tikzpicture \qquad \begin tikzpicture node distance \nodeDist > \arrowType semithick \nodeorigVertex 0 ; \nodeorigVertex 1 right of 0 ; \nodeorigVertex 2 below of 1 ; \nodeorigVertex 3 left of 2 ; \path 0 edgeorigEdge nodenewVertex m0 1 1 edgeorigEdge nodenewVertex m1 2 2 edgeorigEdge nodenewVertex m2 3 3 edgeorigEdge nodenewVertex m3 0 ; \path m0 edge-> newEdge m1 edge<- newEdge out 45 in 45 looseness 3 overlay nodeinvisibleVertex pos \position e0 m1 m1 edge-> newEdge m2 edge<- newEdge out -45 in -45 looseness 3 overlay nodeinvisibleVertex pos \position e1 m2 m2 edge-> newEdge m3 edge<- newEdge out -135 in -135 looseness 3 overlay nodeinvisibleVertex pos \position e2 m3 m3 edge-> newEdge m0 edge<- newEdge out 135 in 135 looseness 3 overlay nodeinvisibleVertex pos \position e3 m0 ; \nodeinvisibleVertex below 0cm of e0 ; \nodeinvisibleVertex left 0cm of e1 ; \nodeinvisibleVertex above 0cm of e2 ; \nodeinvisibleVertex right 0cm of e3 ; \begin scope on background layer overlay \fillfill \fillColor m0 45 to out 45 in 45 looseness 3 m1 45 to m1 center to m0 center to m0 45 ; \fillfill \fillColor m1 -45 to out -45 in -45 looseness 3 m2 -45 to m2 center to m1 center to m1 -45 ; \fillfill \fillColor m2 -135 to out -135 in -135 looseness 3 m3 -135 to m3 center to m2 center to m2 -135 ; \fillfill \fillColor m3 135 to out 135 in 135 looseness 3 m0 135 to m0 center to m3 center to m3 135 ; \end scope \end tikzpicture \qquad \begin tikzpicture node distance \nodeDist > \arrowType semithick \nodeinvisibleVertex 0 ; \nodeinvisibleVertex 1 right of 0 ; \nodeinvisibleVertex 2 below of 1 ; \nodeinvisibleVertex 3 left of 2 ; \path 0 edgeinvisibleEdge nodedraw opacity 100 newVertex m0 1 1 edgeinvisibleEdge nodedraw opacity 100 newVertex m1 2 2 edgeinvisibleEdge nodedraw opacity 100 newVertex m2 3 3 edgeinvisibleEdge nodedraw opacity 100 newVertex m3 0 ; \path m0 edge-> newEdge m1 edge<- newEdge out 45 in 45 looseness 3 overlay nodeinvisibleVertex pos \position e0 m1 m1 edge-> newEdge m2 edge<- newEdge out -45 in -45 looseness 3 overlay nodeinvisibleVertex pos \position e1 m2 m2 edge-> newEdge m3 edge<- newEdge out -135 in -135 looseness 3 overlay nodeinvisibleVertex pos \position e2 m3 m3 edge-> newEdge m0 edge<- newEdge out 135 in 135 looseness 3 overlay nodeinvisibleVertex pos \position e3 m0 ; \nodeinvisibleVertex below 0cm of e0 ; \nodeinvisibleVertex left 0cm of e1 ; \nodeinvisibleVertex above 0cm of e2 ; \nodeinvisibleVertex right 0cm of e3 ; \begin scope on background layer overlay \fillfill \fillColor m0 45 to out 45 in 45 looseness 3 m1 45 to m1 center to m0 center to m0 45 ; \fillfill \fillColor m1 -45 to out -45 in -45 looseness 3 m2 -45 to m2 center to m1 center to m1 -45 ; \fillfill \fillColor m2 -135 to out -135 in -135 looseness 3 m3 -135 to m3 center to m2 center to m2 -135 ; \fillfill \fillColor m3 135 to out 135 in 135 looseness 3 m0 135 to m0 center to m3 center to m3 135 ; \end scope \end tikzpicture \end document </source> Self 2013-03-26 Graph theory Images with LaTeX source code Cc-zero |