SmtC: Show me the Code
Ole Peter Smith
Instituto de Matemática e Estatística
Universidade Federal de Goiás
http://www.olesmith.com.br

Axiomatic Geometry
Detetesto as vitimas
Quando elas respeitam os seus carrascos.
Jean Paul Sartre
< Incidence | Parallellism | Ruler >

Parallelism

TiKZ Listing: Fig/Fig.tikz.tex. PDF   PNG   SVG   ZIP*  
%Convex parameters for drawing lines
\tikzmath{\t=0.2;};
\tikzmath{\tt=1-\t;};
\tikzmath{\size=0.15;};

%Define nodes
\coordinate (A) at (-1, 1);
\coordinate (B) at ( 0, 1);
\coordinate (C) at ( 1, 1);
\coordinate (D) at (-1, 0);
\coordinate (E) at ( 0, 0);
\coordinate (F) at ( 1, 0);
\coordinate (G) at (-1,-1);
\coordinate (H) at ( 0,-1);
\coordinate (I) at ( 1,-1);


%Draw nodes
\node at (A) {\small{$A$}};
\node at (B) {\small{$B$}};
\node at (C) {\small{$C$}};
\node at (D) {\small{$D$}};
\node at (E) {\small{$E$}};
\node at (F) {\small{$F$}};
\node at (G) {\small{$G$}};
\node at (H) {\small{$H$}};
\node at (I) {\small{$I$}};


%Horisontal lines
\draw [] ($\t*(A)+\tt*(B)$) -- ($\tt*(A)+\t*(B)$);
\draw [] ($\t*(B)+\tt*(C)$) -- ($\tt*(B)+\t*(C)$);
\draw [] ($\t*(D)+\tt*(E)$) -- ($\tt*(D)+\t*(E)$);
\draw [] ($\t*(E)+\tt*(F)$) -- ($\tt*(E)+\t*(F)$);
\draw [] ($\t*(G)+\tt*(H)$) -- ($\tt*(G)+\t*(H)$);
\draw [] ($\t*(H)+\tt*(I)$) -- ($\tt*(H)+\t*(I)$);

%Vertical lines
\draw [] ($\t*(A)+\tt*(D)$) -- ($\tt*(A)+\t*(D)$);
\draw [] ($\t*(D)+\tt*(G)$) -- ($\tt*(D)+\t*(G)$);
\draw [] ($\t*(B)+\tt*(E)$) -- ($\tt*(B)+\t*(E)$);
\draw [] ($\t*(E)+\tt*(H)$) -- ($\tt*(E)+\t*(H)$);
\draw [] ($\t*(C)+\tt*(F)$) -- ($\tt*(C)+\t*(F)$);
\draw [] ($\t*(F)+\tt*(I)$) -- ($\tt*(F)+\t*(I)$);

%Inclined
\draw [] ($\t*(A)+\tt*(E)$) -- ($\tt*(A)+\t*(E)$);
\draw [] ($\t*(B)+\tt*(D)$) -- ($\tt*(B)+\t*(D)$);
\draw [] ($\t*(B)+\tt*(F)$) -- ($\tt*(B)+\t*(F)$);
\draw [] ($\t*(E)+\tt*(C)$) -- ($\tt*(E)+\t*(C)$);
\draw [] ($\t*(D)+\tt*(H)$) -- ($\tt*(D)+\t*(H)$);
\draw [] ($\t*(G)+\tt*(E)$) -- ($\tt*(G)+\t*(E)$);
\draw [] ($\t*(I)+\tt*(E)$) -- ($\tt*(I)+\t*(E)$);
\draw [] ($\t*(H)+\tt*(F)$) -- ($\tt*(H)+\t*(F)$);


\draw [] 
   ($(D)+(-\size,\size)$) 
   ..controls
   (-2,1)
   and
   (-1,2)..
   ($(C)+(-\size,\size)$);


\draw []
   ($(A)+(-\size,-\size)$)..
   controls
   (-2,-1)
   and
   (-1,-2)
   ..
   ($(H)+(-\size,-\size)$);
   
\draw []
   ($(G)+(\size,-\size)$)..
   controls
   (1,-2)
   and
   (2,-1)
   ..
   ($(F)+(\size,-\size)$);
   
\draw []
   ($(I)+(\size,\size)$)..
   controls
   (2,1)
   and
   (1,2)
   ..
   ($(B)+(\size,\size)$);
< Incidence | Parallellism | Ruler >
Messages:
0 secs.