\documentclass[10pt]{beamer}
\usepackage{mathpazo}			%% Beamer stuff
\usepackage{amsmath}			%% AMS math packages
\usepackage{amsfonts}			%%	-	special fonts
\usepackage{amssymb}			%%	-	special symbols
\usepackage{graphicx}			%% graphics
\usepackage{tcolorbox}			%% color boxes

\usepackage{hyperref}			%% for web links
\hypersetup{
%    bookmarks=true,         		% show bookmarks bar?
    unicode=false,          		% non-Latin characters in Acrobat’s bookmarks
    pdftoolbar=true,        		% show Acrobat’s toolbar?
    pdfmenubar=true,        	% show Acrobat’s menu?
    pdffitwindow=false,     		% window fit to page when opened
    pdfstartview={FitH},    		% fits the width of the page to the window
    pdfnewwindow=true,      	% links in new PDF window
    colorlinks=true,       			% false: boxed links; true: colored links
    linkcolor=blue,          		% color of internal links (change box color with linkbordercolor)
    citecolor=PineGreen,    		% color of links to bibliography
    filecolor=magenta,      		% color of file links
    urlcolor=cyan           		% color of external links
}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		TiKZ Ploting Stuff
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tikz}				%% TikZ -graphics

\usetikzlibrary{arrows, positioning, calc, intersections}
\usetikzlibrary{decorations.pathreplacing, decorations.markings}

\usepackage{pgfplots}			%% fancy plotting

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	For 3d plotting, using the tikz-3dplot package so
%	that (x,y,z) coordinates are specified in normal order
%	and one can change the perspective for 3-d plots
%
%	To invoke, use
%
%	\begin{tikzpicture}[tdplot_main_coords,{other options}]
%		...
%	\end{tikzpicture}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tikz-3dplot}		%% Enhanced 3d plotting

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Package forest to draw tree diagrams for chain rule
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{forest}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	adjustbox package to force minipage alignment
%
%	Two-column structure is
%
%	\adjustbox{valign=t}
%		{
%			\begin{minipage}{0.45\textwidth}
%			...
%			\end{minipage}
%		}
%	\adjustbox{valign=t}
%		{
%		
%			\begin{minipage}{0.45\textwidth}
%			...
%			\end{minipage}
%		}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{adjustbox}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Set Beamer theme
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usetheme{Dresden}
\usecolortheme{dolphin}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Hack to remove subsection bar from our
%		friends at Tex.StackExchange.Com
%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\makeatletter
\beamer@theme@subsectionfalse

\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%
%		
%		Hack to make the nice little circles appear
%		from Tex.stackexchange.com
%
%		Reference: 
%
%		https://tex.stackexchange.com/questions/2072/beamer-navigation-circles-without-subsections
%
%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage{remreset}
\makeatletter
\@removefromreset{subsection}{section}
\makeatother
\setcounter{subsection}{1}

%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Get rid of triangles, put in circles for 
%		itemize items
%
%%%%%%%%%%%%%%%%%%%%%%%%%%
\setbeamertemplate{items}[circle]

%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Clean up fonts
%
%%%%%%%%%%%%%%%%%%%%%%%%%%

\usefonttheme{professionalfonts}
\usefonttheme{serif}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		tikz plotting options
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pgfplotsset{my style/.append style={axis x line=middle, axis y line=
           middle, xlabel={}, ylabel={}, axis equal }}
           
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%		Math Operators
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\DeclareMathOperator{\comp}{comp}
\DeclareMathOperator{\proj}{proj}
\DeclareMathOperator{\Hess}{Hess}

\DeclareMathOperator{\curl}{curl}
\DeclareMathOperator{\diver}{div}
\DeclareMathOperator{\grad}{grad}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	Document begins here...
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
           
\begin{document}

\input{213-Lecture-Macros}		%% 	macros, settings, et.c


\title{Math 213 - Parametric Surfaces\\ and Surface Integrals \\Supplement}			%%	title page
\author{Peter A. Perry}
\institute{University of Kentucky}
\date{December 2, 2019}
\maketitle

\begin{frame}
\frametitle{Parameterized Surface Examples}
\footnotesize

\begin{minipage}[t]{0.60\textwidth}
The \emph{helicoid} is given by
$$ \bfr(u,v) = \langle u \cos v, u \sin v, v \rangle$$
$$0 \leq u \leq 1, \, 0 \leq v \leq 2\pi$$

\bigskip

Notice that $\bfr(1,v) = \langle \cos v, \sin v, v \rangle$ is a helix curve

\vfill


\begin{align*}
\uncover<2->
{
\bfr_u(u,v) 	&=	\langle \cos v, \sin v , 0 \rangle\\
\bfr_v(u,v)	&=	\langle -u \sin v, u \cos v, 1 \rangle\\
\bfr_u \times \bfr_v &=	 \langle \sin v, -\cos v, u \rangle\\
}
\\
\uncover<3->
{
dS 				&=	\sqrt{1+u^2}\, du \, dv\\
\mathbf{dS}	&=	\langle \sin v, -\cos v, u \rangle \, du \, dv
}
\end{align*}
\end{minipage}
\hfill
\begin{minipage}[t]{0.30\textwidth}
%%
%% graceless hack to make vertical alignment work!
%%
$~$
\tdplotsetmaincoords{70}{120}
\begin{tikzpicture}[tdplot_main_coords,scale=0.6]
\draw[very thick,gray,opacity=0.5,->,>=stealth]		(0,0,0)	--	(4,0,0)	node [anchor=north east] 	{$x$};
\draw[very thick,gray,opacity=0.5,->,>=stealth]		(0,0,0)	--	(0,3,0)	node	[anchor=west] 			{$y$};
\draw[very thick,gray,opacity=0.5,->,>=stealth]		(0,0,0)	--	(0,0,8)	node [anchor=south] 			{$z$};

%% Helicoid in steps
\foreach \v in {0,15,...,360}
	{
		\draw[blue] plot[domain=0:1,variable=\u]
				({\u*cos(\v)},{\u*sin(\v)},{\v*0.0174532});
	}
	
%% bounding helix
\draw[thick,red] plot[domain=0:360,variable=\v]
				({cos(\v)},{sin(\v)},{\v*0.0174532});
				
%% triple of tangent and normal vectors at u=1, v=\pi/2
\only<2>
{
	\draw[black,fill=black]			  	(0,1,1.5708)		circle(0.10cm);		%% r(1,\pi/2)
	\draw[thick,red,->,>=stealth]  	(0,1,1.5708)	--	++(-1,0,1);				%% r_v
	\draw[thick,blue,->,>=stealth] 	(0,1,1.5708)	--	++(0,1,0);				%% r_u
	\draw[thick,black,->,>=stealth] (0,1,1.5708)	--	++(1,0,1);				%% r_u \times r_v
	\node[anchor=south west] at 	(-1,1,2.5708)		{\scriptsize{$\bfr_v$}};
	\node[anchor=west]		  at 	(0,2,1.5708)		{\scriptsize{$\bfr_u$}};
}
\end{tikzpicture}
\end{minipage}


\end{frame}


\begin{frame}
\frametitle{Parameterized Surface Examples}
\footnotesize

\begin{minipage}{0.55\textwidth}
The \emph{torus} is given by
$$ \bfr(u,v) =  \langle (2+\cos u) \cos v, (2+\cos u) \sin v, \sin u \rangle $$
$$ 0 \leq u \leq 2\pi, \, 0 \leq v \leq 2\pi $$


\medskip

\uncover<2->
{For each {\color{blue} blue} curve, $0 \leq u \leq 2\pi$ and $v$ is fixed}

\medskip

\uncover<3->
{
For each {\color{red} red} curve, $0 \leq v \leq 2\pi$, and $u$ is fixed
}

\medskip


{
\begin{align*}
\uncover<4->{
\bfr_u(u,v)	&=	\langle -\sin u \cos v, -\sin u \sin v, \cos u \rangle\\
}
\uncover<5->
{
\bfr_v(u,v)	&=	\langle -(2+\cos u) \sin v, (2+\cos u)\cos v, 0 \rangle\\
}
\uncover<6->
{
\bfr_u \times \bfr_v &=	(2+\cos u)\langle \cos u \cos v, \cos u \sin v, \sin u  \rangle\\ \\
}
\uncover<7->
{
\left| \bfr_u \times \bfr_v \right| &= \left| 2+\cos u\right|
}
\end{align*}
}
\end{minipage}
\hfill
\begin{minipage}{0.35\textwidth}
$~$
\tdplotsetmaincoords{55}{135}
\begin{tikzpicture}[tdplot_main_coords,scale=0.5]
\draw[very thick,gray,opacity=0.5,->,>=stealth]		(0,0,0)	--	(5,0,0)	node [anchor=north east] 	{$x$};
\draw[very thick,gray,opacity=0.5,->,>=stealth]		(0,0,0)	--	(0,5,0)	node	[anchor=west] 			{$y$};
\draw[very thick,gray,opacity=0.5,->,>=stealth]		(0,0,0)	--	(0,0,6)	node [anchor=south] 			{$z$};
\foreach \v in {0,10,...,360}
	{
		\draw[blue,opacity=0.4] plot[domain=0:360,smooth,variable=\u]
			({(2+cos(\u))*cos(\v)},{(2+cos(\u))*sin(\v)},{sin(\u)});
	}
\foreach \u in {0,10,...,360}
	{
		\draw[red,opacity=0.4] plot[domain=0:360,smooth,variable=\v]
			({(2+cos(\u))*cos(\v)},{(2+cos(\u))*sin(\v)},{sin(\u)});
	}
%% blue curve at v=0
\only<2,4>
{
\draw[very thick,blue] plot[domain=0:360,smooth,variable=\u]
			({(2+cos(\u))},{(0},{sin(\u)});
}
%% red curve at u=0
\only<3,5>
{
\draw[very thick,red] plot[domain=0:360,smooth,variable=\v]
			({(3)*cos(\v)},{(3)*sin(\v)},{0});
}
%% point r(0,0)
\only<4,5,6>
{
\draw[black,fill=black] (3,0,0) circle(0.10cm);
}
%% tangent vector r_u(0,0)
\only<4,6>
{
\draw[blue,thick,->,>=stealth]	(3,0,0) --	++(0,0,2);
}
%% tangent vector r_v(0,0)
\only<5,6>
{
\draw[red,thick,->,>=stealth]   (3,0,0) -- ++(0,4,0);
}
%% normal vector
\only<6>
{
\draw[black,thick,->,>=stealth] (3,0,0)	--	++(-2,0,0);
}

\end{tikzpicture}
\end{minipage}
\end{frame}



\begin{frame}
\frametitle{Vector Equations of Curves and Surfaces}
\footnotesize
\begin{minipage}[t]{0.45\textwidth}
\textbf{Vector Equation of a Space Curve}\\
$$\bfr(t)		= 	x(t)\ii + y(t) \jj + z(t) \kk $$
$$ a \leq t \leq b $$

\medskip
\textbf{Tangent Vector}
$$ \bfr'(t) = x'(t) \ii + y'(t) \jj + z'(t) \kk $$

\medskip
\textbf{Element of Arc Length}
$$ ds = |\bfr'(t)| \, dt $$

\medskip
\textbf{Vector element of Arc Length}
$$ \mathbf{dr} = \bfr'(t) \ dt $$

\end{minipage}
\qquad
\begin{minipage}[t]{0.45\textwidth}
\textbf{Vector Equation of a Surface}
$$\bfr(u,v) = x(u,v) \ii + y(u,v) \jj + z(u,v) \kk $$
$$ (u,v) \in D, \, \text{a domain in the }uv\text{ plane}$$

\medskip

\textbf{Tangent Vectors}
\begin{align*}
\bfr_u(u,v) &=	\frac{\dee x}{\dee u} \ii + \frac{\dee y}{\dee u} \jj + \frac{\dee z}{\dee u} \kk\\[5pt]
\bfr_v(u,v) &=\frac{\dee x}{\dee v} \ii + \frac{\dee y}{\dee v} \jj + \frac{\dee z}{\dee v} \kk
\end{align*}

\medskip
\textbf{Element of Surface Area}

$$ dS = \left| \bfr_u \times \bfr_v \right| \, du \, dv $$

\medskip

\textbf{Vector Element of Surface Area}

$$ \mathbf{dS} =  \left( \bfr_u \times \bfr_v \right)  \,du \, dv $$

\end{minipage}
\end{frame}

\begin{frame}
\frametitle{Line Integrals and Surface Integrals}
\footnotesize
%% line quantities
\begin{minipage}[t]{0.45\textwidth}
\textbf{Vector Equation of a Line}
$$ \bfr(t) = \langle x(t), y(t), z(t) \rangle, $$ 
$$ a \leq t \leq b$$

\medskip

\textbf{Line Integral of a Scalar Function}
$$ \int_C f \, ds = \int_a^b f(\bfr(t)) \, \left|\bfr'(t)\right|  \, dt $$

\medskip
\textbf{Line Integral of a Vector Function}
$$ \int_C \bfF \, \cdot \, d\bfr = \int_a^b \bfF(\bfr(t)) \cdot \bfr'(t) \, dt$$
also called ``circulation of $\bfF$ around $C$''
\end{minipage}
\qquad
%% surface quantities
\begin{minipage}[t]{0.45\textwidth}
\textbf{Vector Equation of a Surface}
$$ \bfr(u,v) = \langle x(u,v), y(u,v), z(u,v) \rangle$$ 
$$ (u,v) \in D, \text{ a domain in the }uv\text{ plane }$$

\medskip

\textbf{Surface Integral of a Scalar Function}
$$ \int_S f \, dS = \iint_D f(\bfr(u,v)) |\bfr_u \times \bfr_v| \, du \, dv $$

\medskip
\textbf{Surface Integral of a Vector Function}
$$ \int_S \bfF \, \cdot \, \textbf{dS} = \iint_D \bfF (\bfr(u,v)) \cdot (\bfr_u \times \bfr_v) \, du \, dv$$
also called the ``flux of $\bfF$ out of the surface $S$'' provided $\bfr_u \times \bfr_v$ points outward
\end{minipage}

\end{frame}


\end{document}

