\section{Droites particulières}

\subsection{Droites verticales : \tkzcname{tkzFnVLines}}
\begin{NewMacroBox}{tkzFnVLines}{\oarg{options de \TIKZ}\marg{liste}}
\emph{Trace les droites d'équations $x=a$ pour les valeurs $a$ de la liste. La liste s'écrit comme avec \tkzcname{foreach} (\texttt{1,2,...,4}) et ses éléments sont des expressions Lua (\texttt{1/3}, \texttt{2*pi}). \tkzcname{tkzFnVLine} est un synonyme. Le style est \tkzname{tkzfn line}.}

\begin{tabular}{lll}
  \toprule
arguments &  exemple  & définition  \\
\midrule
\TAline{liste}{\{1,4\}}{trace les droites $x=1$ et $x=4$}
\bottomrule
\end{tabular}
\end{NewMacroBox}

\subsection{Ligne verticale}
Avec \tkzname{tkz-fct}, |1./3| posait problème ; avec Lua, |1/3| est correct.
\begin{tkzexample}[latex=8cm]
\begin{tikzpicture}[scale=2]
   \tkzFnInit[xmin=0,xmax=3,ymin=0,ymax=2]
   \tkzFnAxes
   \tkzFnVLine[color=blue,dashed,
               line width=1pt]{2}
   \tkzFnVLine[color=red,dashed,
               line width=1pt]{1/3}
\end{tikzpicture}
\end{tkzexample}

\subsection{Lignes verticales}

\begin{tkzexample}[latex=7cm]
\begin{tikzpicture}
 \tkzFnInit[xmin=0,xmax=5,ymin=0,ymax=5]
 \tkzFnAxes
 \tkzFnVLines[color=green]{1,2,...,4}
\end{tikzpicture}
\end{tkzexample}

\subsection{Lignes verticales et multiples de pi}
\begin{tkzexample}[]
\begin{tikzpicture}
  \tkzFnInit[xmin=-7,xmax=7,ymin=-1,ymax=1]
  \tkzFnAxisY
  \tkzFnAxisX[trig=2]
  \tkzFnVLines[color=red]{-2*pi,-pi,pi,2*pi}
\end{tikzpicture}
\end{tkzexample}

\subsection{Droites horizontales : \tkzcname{tkzFnHLines}}
\begin{NewMacroBox}{tkzFnHLines}{\oarg{options de \TIKZ}\marg{liste}}
\emph{Trace les droites d'équations $y=b$. \tkzcname{tkzFnHLine} est un synonyme.}
\end{NewMacroBox}

\begin{tkzexample}[latex=7cm]
\begin{tikzpicture}
  \tkzFnInit[xmin=0,xmax=80,xstep=20,
             ymin=0,ymax=2]
  \tkzFnAxes
  \tkzFnHLine[color=red]{e-1}
\end{tikzpicture}
\end{tkzexample}

\subsection{Asymptote horizontale}

\begin{tkzexample}[]
\begin{tikzpicture}[scale=2.5]
  \tkzFnInit[xmin=0,xmax=5,ymin=0.5,ymax=1.5,ystep=0.5]
  \tkzFnGrid
  \tkzFnAxes
  \tkzFnDraw[name=f,domain=0:10]{x*exp(-x)+1}
  \tkzFnHLine[color=red,line width=1.2pt]{1}
  \tkzFnTangent[draw,color=blue](f,1)
  \tkzFnText[draw,fill=brown!20](2,0.75){$f(x)=x \text{e}^{-x}+1$}
\end{tikzpicture}
\end{tkzexample}

\newpage
\subsection{Lignes horizontales}

\begin{tkzexample}[]
\begin{tikzpicture}[scale=.5]
 \tkzFnInit[xmin=0,xmax=10,ymin=0,ymax=10]
 \tkzFnAxes
 \tkzFnHLines[color=green]{1,2,...,10}
\end{tikzpicture}
\end{tkzexample}

\newpage
\subsection{Asymptotes horizontale et verticale}

La courbe est automatiquement interrompue en $x=2$ : il n'est plus nécessaire de la tracer en deux parties.

\begin{tkzexample}[vbox]
\begin{tikzpicture}[scale=1.25]
 \tkzFnInit[xmin=0,xmax=10,ymin=0,ymax=10]
 \tkzFnGrid
 \tkzFnAxes
 \tkzFnDraw[name=f,color=red,samples=400,domain=1.001:10]{1+1/ln(x-1)^2}
 \tkzFnHLine[line width=1pt,color=red]{1}
 \tkzFnVLine[line width=1pt,color=blue]{2}
 \tkzFnDefPointXY(1,1){A}
 \tkzFnDrawPoints[fill=white,draw=Maroon,size=2pt](A)
 \tkzFnDefPoint[draw](f,{1+e}){B}
 \tkzFnLabelPoint[above right](B){$(1+\text{e}~;~2)$}
 \tkzFnText[draw,color=black,fill=brown!20](6,6)
          {$f(x)=\dfrac{1}{\ln^2 (x-1)}+1$}
\end{tikzpicture}
\end{tkzexample}

\endinput
