% LESSON FOURTEEN
          
\documentclass{amsart}
\usepackage{tikz}
\usepackage{fullpage} % This changes the default LaTeX margins, which are quite large, replacing them with more standard margins.
\usepackage{graphicx} % Allows us access to graphics package.
\thispagestyle{empty}


\renewcommand{\baselinestretch}{1.15} % This allows you to change line spacing. For instance, a "2" in the braces means to double-space the document.

\begin{document}
             
\begin{center}
	\textbf{Lesson Fourteen: Ti{\em k}Z}
\end{center}  

\vspace{5mm}

\noindent Ti{\em k}Z is a package you can use to draw figures directly into your \LaTeX\ documents. Bridget Ruff '18 was kind enough to share some examples from her thesis; these have been adapted below. We encourage you to try these examples, then consult the following for further ideas.

\begin{itemize}
	\item An online Ti{\em k}Z manual: http://cremeronline.com/LaTeX/minimaltikz.pdf
    \item Lots of examples in Ti{\em k}Z: \TeX ample (http://www.texample.net/)
    \item General \LaTeX\ help: \TeX\ -- \LaTeX\ StackExchange (https://tex.stackexchange.com/)
    \item Draw your pictures in GeoGebra and save them in Ti{\em k}Z format (https://www.geogebra.org/)
\end{itemize}

\vspace{5mm}

\noindent Moving beyond the Bates \LaTeX\ Manual, you will work on more open-ended assignments and will likely find it helpful to consult friends and online resources as you create documents, homework assignments, and theses in \LaTeX . Now is a good time to begin investigating such resources.

\begin{figure}[h]
\begin{tikzpicture}

    \draw (1,0) circle (1.5cm); % This large circle contains points a, b, c
    \node at (-1,0) {A}; % This produces the set name A
    \draw (6,0) ellipse (1 cm and 2 cm);
    \node at (7.5,0) {B};
    \draw[fill] (1,1) circle [radius=0.05]; % This is the dot that we will label "a"
    \node [below] at (1,1) {a}; % Here is where we name that dot "a"
    \draw[fill] (.5,0) circle [radius=0.05];
    \node [below] at (.5,0) {b};
    \draw[fill] (1.5,-.5) circle [radius=0.05];
    \node [below] at (1.5,-.5) {c}; 
    \draw[fill] (6,1) circle [radius=0.05];
    \node [below] at (6,1) {w};
    \draw[fill] (5.5,0) circle [radius=0.05];
    \node [below] at (5.5,0) {x};
    \draw[fill] (6,-.5) circle [radius=0.05];
    \node [below] at (6,-.5) {y};
    \draw[fill] (6.5,-1) circle [radius=0.05];
    \node [below] at (6.5,-1) {z};
    \draw [->] (1,1) to (6,1); % This is the arrow from a to w. Do you see that the coordinates (1,1) and (6,1) match the coordinates for a and for w?
    \draw [thick] [->] (.5,0) to [out=25,in=155] (5.4,0); % This arrow is thicker than the previous arrow, is curved, and ends shortly before the point "x". Can you see the arrowhead better?
    \draw [->] (1.5,-.5) to [in=205, out = -25] (6.4,-1); % This arrow has standard thickness but ends just before "z". You can try different styles and end points till you create a figure you like best.
    \node [above] at (3.5,2) {f};

\end{tikzpicture}
\caption{A function $f: A \rightarrow B$}
\label{fig:function}
\end{figure}

% You can use TikZ to draw graphs of standard mathematical functions. One example is below.

\begin{figure}[h]
    \begin{tikzpicture}
      \draw[->] (-3,0) -- (4.2,0) node[right] {$x$};
      \draw[->] (0,-3) -- (0,4.2) node[above] {$y$};
      \draw[scale=0.5,domain=-3:3,smooth,variable=\x,] plot ({\x},{\x*\x - 2});
    \end{tikzpicture}
    \caption{The graph of $f(x) = x^2-2$}
     \label{fig:graph of f(x) = x^2-2}
\end{figure}



\end{document} 
