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
Quando Pedro me fala sobre Paulo
Sei mais do Pedro do que do Paulo
Sigmund Freud
< 01 | Separation | 01 >

Separation of the Plane, $\mathcal{P}$

Every Line, $r$, separates the Plane

That is:
TiKZ Listing: Fig.tikz.tex. PDF   PNG   SVG   ZIP*  
\tikzmath{\t=-0.15;};
\tikzmath{\tt=\t-0.05;};

\tikzmath{\a=2;};
\tikzmath{\b=3;};
\tikzmath{\c=4;};

\tikzmath{\xl=-2;};
\tikzmath{\xu=2;};

\tikzmath{\yl=(\c-\a*\xl)/\b;};
\tikzmath{\yu=(\c-\a*\xu)/\b;};

\tikzmath{\d=(\xu-\xl)*(\xu-\xl)+(\yu-\yl)*(\yu-\yl);};
\tikzmath{\d=sqrt(\d);};

\coordinate (O) at (-5,-0.5);

%Line through A and B
\coordinate (A) at (\xl,\yl);
\coordinate (B) at (\xu,\yu);
\coordinate (M) at ($(A)!0.5!(B)$);

\coordinate (N) at ($(\a/\d,\b/\d)$);
\coordinate (V) at ($(\b/\d,-\a/\d)$);


\filldraw (A) circle(1pt) node [anchor=north east] {$A$};
\filldraw (B) circle(1pt) node [anchor=north east] {$B$};

\draw ($(A)!\t!(B)$) -- ($(B)!\t!(A)$);
\draw ($(A)!\tt!(B)$) node [font={\tiny}] {$ax+by=c$};
\draw ($(B)!\tt!(A)$) node [font={\small}] {$r$};


\draw [-Latex,thin] (O) -- +(1,0) node [right] {$\underline{j}$};
\draw [-Latex,thin] (O) -- +(0,1) node [above] {$\underline{j}$};

\draw [-Latex,thin] (A) -- +(V) node [below,font={\scriptsize}] {$\underline{v}$};
\draw [-Latex,thin] (A) -- +(N) node [right,font={\scriptsize}] {$\underline{n}=(a,b)$};


\coordinate (H1) at ($(M)+3*(N)+2.5*(V)$);
\coordinate (H2) at ($(M)-3*(N)-2.5*(V)$);

\draw (H1) node {$H_1$};
\draw (H2) node {$H_2$};


%Nodes in H+
\coordinate (P1) at ($(M)+1.5*(N)-1*(V)$);
\coordinate (P2) at ($(M)+1.5*(N)+1.5*(V)$);
\filldraw (P1) circle(1pt) node [above] {$P_1$};
\filldraw (P2) circle(1pt) node [above] {$P_2$};

\draw [orange] (P1) -- (P2);

%Nodes in H-
\coordinate (Q1) at ($(M)-1.5*(N)-1*(V)$);
\coordinate (Q2) at ($(M)-1.5*(N)+1.5*(V)$);
\filldraw (Q1) circle(1pt) node [below] {$Q_1$};
\filldraw (Q2) circle(1pt) node [below] {$Q_2$};

\draw [orange] (Q1) -- (Q2);

\draw [red] (P1) -- (Q1);
\draw [red] (P2) -- (Q2);
< 01 | Separation | 01 >
Messages:
0 secs.