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

TikZ Examples
Liberdade é um prato facil de comer.
Mas deficil de digerir
Jean-Jaques Rousseau
Line Between Points, [;P;] and [;Q;]: $$ \overrightarrow{OX}= t \overrightarrow{OQ}+(1-t)\overrightarrow{OP} = \overrightarrow{OP}+t \overrightarrow{PQ} $$ [;X;] between [;P;] and [;Q;]: $$ (P,X,Q) $$
  • [;P;]: [;t=0;]
  • [;Q;]: [;t=1;]
  • Segment [;PQ;], [;0 < t < 1;]: $$PQ=\{X \in U| (P,X,Q)\} \cup \{P,Q\}$$
  • Semiline from [;P;] towards [;Q;]: [;t > 0;]
  • Semiline from [;Q;] towards [;P;]: [;t < 1;]
  • TikZ: $(P)!\t!(Q)$
  • Perpendicular Projection: $(P)!(R)!(Q)$
TiKZ Listing: Convex.tikz.tex. PDF   PNG   SVG   ZIP*  
\begin{tikzpicture}[scale=1]
  %Convex Parameters
  \tikzmath{\t=-0.2;};
  \tikzmath{\tt=1-\t;};

  %Points
  \coordinate (P) at (0,0);
  \coordinate (Q) at (2,2);
  \coordinate (R) at (0.5,2);

  %Projection of R on PQ
  \coordinate (RR) at ($(P)!(R)!(Q)$);

  
  \filldraw (P) circle(1pt) node [left]  { $P$};
  \filldraw (Q) circle(1pt) node [right] { $Q$};
  \filldraw (R) circle(1pt) node [above] { $R$};
  
  \draw  ($(P)!\t!(Q)$) -- ($(P)!\tt!(Q)$);
  \draw  (R) -- (RR);

  \tkzMarkRightAngle[size=0.5](R,RR,Q);
\end{tikzpicture}


Messages:
0 secs.