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
Life is a mystery to be lived.
Not a problem to be solved.
Søren Kierkegaard.
< Circle | Others | Sivent2 >

More Examples


TiKZ Listing: 06.1.tikz.tex. PDF   PNG   SVG   ZIP*  
\tikzmath{\x=2.25;};
\tikzmath{\y=1.5;};
\tikzmath{\dx=0.0;};


\tikzmath{\tl=-0.6;};
\tikzmath{\tu=1-\tl;};

\coordinate (A) at (0,0);
\coordinate (D) at (\x,0);
\coordinate (B) at (\dx,\y);
\coordinate (C) at (\x+\dx,\y);


\draw
   (A) node [below] {$A$};
\draw
   (B) node [above] {$B$};
\draw
   (D) node [below] {$D$};
\draw
   (C) node [above] {$C$};

\draw
   (A)
   --
   (B);

\draw
   ($(A)!\tl!(D)$)
   --
   ($(A)!\tu!(D)$) node [anchor=west] {$r$};
   
\draw
   (D)
   --
   (C);
   
\draw
   ($(C)!\tl!(B)$) node [anchor=west] {$s$}
   --
   ($(C)!\tu!(B)$);
   
\tkzMarkRightAngle[size=0.3](A,B,C);
\tkzMarkRightAngle[size=0.3](A,D,C);
\tkzMarkRightAngle[size=0.3](B,A,D);
\tkzMarkAngle[size=0.3](B,C,D);




TiKZ Listing: 12.1.tikz.tex. PDF   PNG   SVG   ZIP*  
%Sizes
\tikzmath{\x=3;};
\tikzmath{\y=2;};

\tikzmath{\r=sqrt(\x*\x+\y*\y);};

\tikzmath{\Alpha=30;};
\tikzmath{\Beta=15;};

\tikzmath{\tl=-0.2;};
\tikzmath{\tu=1.2;};

\tikzmath{\t=0.9;};
\tikzmath{\tt=\t;};

\tikzmath{\size=1.2;};

\coordinate (A) at (0,0);
\coordinate (B) at (0,-\y);
\coordinate (C) at (\x,-\y);


\coordinate (SA) at (C);
\coordinate (SB) at ($(A)+(-\Beta:\r)$);

\draw
   ($(B)!\tl!(C)$) node[left] {$r$};
   
\draw
   ($(C)!\tl!(B)$)
   --
   ($(C)!\tu!(B)$);
\draw (A) -- (B);

\draw (SB) -- (A) -- (SA);

\draw (A) node[above] {$A$};
\draw (B) node[below] {$B$};
\draw (C) node[below] {$C$};

\tkzLabelSegment[pos=0.5,left](A,B) { $y$};

\tkzLabelSegment[pos=\t](A,SA) { $~~S_{\theta}$};
\tkzLabelSegment[pos=\tt](A,SB) { $S_{\alpha(y)}~~$};

\tkzMarkRightAngle[size=0.25](C,B,A);

\tkzMarkAngle[size=0.5](B,A,SA);
\tkzLabelAngle[pos=0.8](B,A,SA) {$\theta$};

\tkzMarkAngle[size=1.1](B,A,SB);
\tkzLabelAngle[pos=1.4](B,A,SB) {$\alpha(y)$};




TiKZ Listing: F.2.tikz.tex. PDF   PNG   SVG   ZIP*  
\tikzmath{\p=2.3;};

\coordinate (A) at (0,\p);
\coordinate (B) at (0,0);
\coordinate (R) at (-0.2*\p,0);


\draw (A) -- (B) -- (R) node [left] {$r$};

\coordinate (P0) at (B);
\tkzMarkRightAngle[size=0.25](A,B,R);

\foreach \px\marker [count=\i from 0] in {1/|,2/||,5/|||}
{
   \tikzmath{\ppx=sqrt(\px);};
   \tikzmath{\anglesize=0.5*\i+0.6;};
   \tikzmath{\labelpos=\anglesize+0.25;};


   \coordinate (P) at ($(P0)+(\p*\ppx,0)$);

   \gettikzxy{($(P)-(A)$)}{\vx}{\vy};
   \tikzmath{\v=veclen(\vx,\vy)/28.4;};

   \draw
      (A)
      --
      (P) node [below] {$P_\i$}
      --
      (P0);

   \tkzMarkSegment[pos=0.65,mark=\marker](A,P0);
   \tkzMarkSegment[pos=0.75,mark=\marker](P,P0);
   
   \tkzLabelAngle[pos=\labelpos](A,P,B) { $\alpha_\i$};
   \tkzMarkAngle[size=\anglesize](A,P,B);

   \tkzLabelAngle[pos=\labelpos](P0,A,P) { $\alpha_\i$};
   \tkzMarkAngle[size=\anglesize](P0,A,P);

   %Move P0 to P
   \coordinate (P0) at (P);
   
   %\draw (P) circle(\v);
}



%\draw
%  (A) node [anchor=east] {$r$}
%   --
%   (B)
%   --
%   (P0)
%   --
%   (P1)
%   --
%   (P2);

%\tikzmath{\pp=\p*sqrt(2);};
%\tikzmath{\ppp=\p*sqrt(4+2*sqrt(2));};

%\coordinate (P0) at ($(B)+\p*(1,0)$);
%\coordinate (P1) at ($(P0)+\pp*(1,0)$);
%\coordinate (P2) at ($(P1)+\ppp*(1,0)$);

%\draw (A) -- (P0);
%\draw (A) -- (P1);
%\draw (A) -- (P2);

%\tkzMarkSegment[pos=.5,mark=|](A,B);
%\tkzMarkSegment[pos=.5,mark=|](B,P0);

%\tkzMarkSegment[pos=.5,mark=||](A,P0);
%\tkzMarkSegment[pos=.5,mark=||](P0,P1);

%\tkzMarkSegment[pos=.5,mark=|||](A,P1);
%\tkzMarkSegment[pos=.5,mark=|||](P1,P2);

%\draw (B) circle(\p);
%\draw (P0) circle(\pp);
%\draw (P1) circle(\ppp);
< Circle | Others | Sivent2 >
Messages:
0 secs.