\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 their Areas}			%%	title page
\author{Peter A. Perry}
\institute{University of Kentucky}
\date{November 22, 2019}
\maketitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%	
%	Due Date Reminders
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Reminders}

\begin{itemize}

\item	Homework D1 is due on Friday of this week
\item	Homework D2 is due on \textbf{Monday} of next week
\item Thanksgiving is coming!

\end{itemize}

\end{frame}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
%	Unit Outline
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}
\frametitle{Unit IV: Vector Calculus}
\begin{center}
\begin{itemize}
\item[{}]			Fundamental Theorem for Line Integrals
\item[{}]			Green's Theorem
\item[{}]			Curl and Divergence
\begingroup
\color{red}
\item[{}]			Parametric Surfaces and their Areas
\endgroup
\item[{}]			Surface Integrals
\item[{}]			Stokes' Theorem, I
\item[{}]			Stokes' Theorem, II 
\item[{}]			The Divergence Theorem
\item[{}]			
\item[{}]			Review
\item[{}]			Review
\item[{}]			Review
\end{itemize}
\end{center}
\end{frame}


\section{Learning Goals}

\begin{frame}
\frametitle{Goals of the Day}
This lecture is about parametric surfaces. You'll learn:

\bigskip

\begin{itemize}
\item	How to define and visualize parametric surfaces
\item	How to find the tangent plane to a parametric surface at a point
\item	How to compute the surface area of a parametric surface using double integrals
\end{itemize}
\end{frame}

\section{Parametric Surfaces}

\begin{frame}
\frametitle{Parametric Curves and Parametric Surfaces}
\adjustbox{valign=t}
{
\begin{minipage}{0.45\textwidth}
\scriptsize
\begin{center}
\textbf{Parametric Curve}
\end{center}
\medskip
A parametric curve in $\R^3$ is given by 
$$ \bfr(t) = x(t) \ii + y(t) \jj + z(t) \kk$$ where $a \leq t \leq b$

\medskip
There is \emph{one parameter}, because a curve is a \emph{one-dimensional} object

\medskip
There are \emph{three component functions}, because the curve lives in \emph{three-dimensional} space.
\end{minipage}
}
\quad
\adjustbox{valign=t}
{
\begin{minipage}{0.45\textwidth}
\scriptsize
\begin{center}
\textbf{Parametric Surface}
\end{center}

\medskip
A parametric surface in $\R^3$ is given by 
$$ \bfr(u,v) = x(u,v) \ii + y(u,v) \jj + z(u,v) \kk$$
where $(u,v)$ lie in a region $D$ of the $uv$ plane.

\medskip
There are \emph{two parameters}, because a surface is a \emph{two-dimensional} object

\medskip
There are \emph{three component functions}, because the surface lives in \emph{three-dimensional} space.
\end{minipage}
}
\end{frame}

\begin{frame}
\frametitle{You Are Living on a Parametric Surface}
\footnotesize

Let $u$ be your longitude (in radians, for this course)

\smallskip

Let $v$ be your latitude  (in radians)

\smallskip

Let $R$ be the radius of the Earth

\smallskip 
Your position is
$$ \bfr(u,v) = R\cos(v) \cos(u) \ii + R\cos(v) \sin(u) \jj + R\sin(v) \kk $$

\vfill
\adjustbox{valign=t}
{
\begin{minipage}{0.4\textwidth}
\begin{tikzpicture}[scale=0.8]
\draw[thick,->,>=stealth]
	(-0.5,0)	--	(4.5,0)	node [anchor=west] {\scriptsize{$u$}};
\node[anchor=north east]	at  (0,0)	{\scriptsize{$0$}};
\node[anchor=north]	at	(4,0)	{\scriptsize{$2\pi$}};
\draw[thick,->,>=stealth]
	(0,-1.5)	--	(0,1.5)	node [anchor=south] {\scriptsize{$v$}};
\node[anchor=east]		at (0,1)	{\scriptsize{$\pi/2$}};
\node[anchor=east]		at (0,-1)	{\scriptsize{$\pi/2$}};
\draw[help lines,step=0.2]	(0,-1)	 grid (4,1);
\end{tikzpicture}

\end{minipage}
}
\qquad
\adjustbox{valign=t}
{
\begin{minipage}{0.4\textwidth}
\tdplotsetmaincoords{65}{110}
	\begin{tikzpicture}[scale=0.5,tdplot_main_coords]
	%%
	%%	Draw sphere
	%%
	\foreach \u in {7,17,...,367}
		{
			\draw[cyan]
				plot[domain=0:180,variable=\v]
					(
						{3*sin(\v)*cos(\u)},
						{3*sin(\v)*sin(\u)},
						{3*cos(\v)}
					);
		}
	\foreach \v in {0,10,...,180}
		{	
			\draw[cyan]
				plot[domain=0:360,variable=\u]
					(
						{3*sin(\v)*cos(\u)},
						{3*sin(\v)*sin(\u)},
						{3*cos(\v)}
					);
		}	
	\end{tikzpicture}
\end{minipage}
}
\end{frame}

\begin{frame}
\frametitle{More Parameterized Surfaces: Planes}
\footnotesize
\adjustbox{valign=t}
{
\begin{minipage}{0.4\textwidth}
%\tdplotsetmaincoords{45}{30}
\tdplotsetmaincoords{80}{110}
\begin{tikzpicture}[tdplot_main_coords,scale=0.7]
\draw[very thick,black,->,>=stealth]		(0,0,0)	--	(6,0,0)	node [anchor=north east] 	{$x$};
\draw[very thick,black,->,>=stealth]		(0,0,0)	--	(0,3,0)	node	[anchor=west] 			{$y$};
\draw[very thick,black,->,>=stealth]		(0,0,0)	--	(0,0,4)	node [anchor=south] 			{$z$};
\draw[purple,top color=purple!10,bottom color=purple,opacity=0.5]
	(-1,-2,0)	--	++(0,4,0)	--	++(4,0,2)	--	++(0,-4,0)	--	++(-4,0,-2) 	-- 	(-1,-2,0);
\draw[black,fill=black] 	(1,0,1)	circle(0.10cm);
\draw[thick,red,->,>=stealth]	(1,0,1)	--	++(2,0,1);
\draw[thick,cyan,->,>=stealth]	(1,0,1)	--	++(0,2,0);
\end{tikzpicture}
\end{minipage}
}
\quad
\adjustbox{valign=t}
{
\begin{minipage}{0.5\textwidth}
\emph{Problem}: Find a parametric representation for the plane through 
$\langle 1,0,1 \rangle $ that contains the vectors $\langle 2, 0, 1 \rangle$ and $\langle 0, 2, 0\rangle$

\uncover<2->
{
\medskip
\emph{Solution}:
Let $\bfr_0 = \langle 1, 0, 1 \rangle$. Any point in the plane is given by
$$ 
\bfr(s,t) =	\langle 1, 0, 1 \rangle 
			+ s {\color{red} \langle 2, 0, 1 \rangle} 
			+ t {\color{cyan} \langle 0, 2, 0 \rangle}
$$
}

\vfill

\vfill
\uncover<3->
{
Now you try it:

\medskip

Find a parametric representation for the plane through the point $(0,-1,5)$ that contains the vectors $\langle 2, 1 , 4\rangle$ and $\langle -3, 2, 5 \rangle$. 
}
\end{minipage}
}
\end{frame}

\begin{frame}
\frametitle{More Parameterized Surfaces: The Cylinder}
\begin{center}
\adjustbox{valign=t}
{
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}[scale=0.35]
\draw[help lines,step=0.5] (0,0) grid (6,4);
\draw[thick,->,>=stealth]	
	(-0.5,0)	--	(6.5,0)  node[anchor=west] 		{\footnotesize{$u$}};
\draw[thick,->,>=stealth]
	(0,-0.5)	--	(0,4.5)	node[anchor=south] 	{\footnotesize{$v$}};
\uncover<2->
{
\draw[red,thick]		(0,2)	--	(6,2);
}
\uncover<3->
{
\draw[cyan,thick]	(1,0)	--	(1,4);
}
\end{tikzpicture}

\bigskip
\bigskip

%\tdplotsetmaincoords{45}{45}
\tdplotsetmaincoords{60}{45}
\begin{tikzpicture}[scale=0.5,tdplot_main_coords]
%% draw the wireframe cylinder
\only<1>
{
\foreach \v in {0,0.5,...,4}
	{
		\draw[blue]		
			plot[domain=0:360,variable=\u]	({cos(\u)},{sin(\u)},{\v});
	}
\foreach \u in {0,30,...,360}
	{
		\draw[blue]	
			plot[domain=0:4,variable=\v]		({cos(\u)},{sin(\u)},{\v});
	}
}
%% 	now lighten up the wireframe so we can draw curves and
%%	tangent vectors
\uncover<2->
{
\foreach \v in {0,0.5,...,4}
	{
		\draw[blue,opacity=0.25]		
			plot[domain=0:360,variable=\u]	({cos(\u)},{sin(\u)},{\v});
	}
\foreach \u in {0,30,...,360}
	{
		\draw[blue,opacity=0.25]	
			plot[domain=0:4,variable=\v]		({cos(\u)},{sin(\u)},{\v});
	}
}
\uncover<2->
{
\draw[red,thick]
	plot[domain=0:360,variable=\u]
		({cos(\u)},{sin(\u)},{2});
}
\uncover<3->
{
\draw[cyan,thick]
	plot[domain=0:4,variable=\v]
		({cos(0)},{sin(0)},{\v});
}
\uncover<4->
{
\draw[red,very thick,->,>=stealth]
	({cos(0)},{sin(0)},2)	--	++(0,2,0);
\draw[cyan,very thick,->,>=stealth]
	({cos(0)},{sin(0)},2)	--	++	(0,0,2);
}
\end{tikzpicture}
\end{minipage}
}
\qquad
\adjustbox{valign=t}
{
\begin{minipage}{0.5\textwidth}
\footnotesize
\begin{align*}
\bfr(u,v) 	&= r\cos(u) \ii + r\sin(u) \jj + v \kk \\
D 				&= \{ (u,v): 0 \leq u \leq 2\pi, \, 0 \leq v \leq h \}
\end{align*}
parameterizes a cylinder of radius $r$ and height $h$

\bigskip
\uncover<2->
{
If we fix $v$ and vary $u$ over the cylinder, we trace out a {\color{red} circle}
}

\medskip
\uncover<3->
{
If we fix $u$ and vary $v$, we trace out a {\color{cyan} vertical line}
}

\medskip
\uncover<4->
{
Each of these curves has a \emph{tangent vector}:

\smallskip
\begin{align*}
\color{red}
\mathbf{r}_u (u,v)	&=	
\color{red} -r\sin(u) \ii +r \cos(u) \jj 
\\
\color{cyan}
\mathbf{r}_v (u,v)	&=	
\color{cyan} \kk
\end{align*}
}
\end{minipage}
}
\end{center}
\end{frame}

\begin{frame}
\frametitle{More Parameterized Surfaces: The Cylinder}
\begin{center}
%%
%%		Most of the code for the left colum is lifted wholesale
%%		from the preceding frame
%%
\adjustbox{valign=t}
{
\begin{minipage}{0.3\textwidth}
\begin{tikzpicture}[scale=0.35]
\draw[help lines,step=0.5] (0,0) grid (6,4);
\draw[thick,->,>=stealth]	
	(-0.5,0)	--	(6.5,0)  node[anchor=west] 		{\footnotesize{$u$}};
\draw[thick,->,>=stealth]
	(0,-0.5)	--	(0,4.5)	node[anchor=south] 	{\footnotesize{$v$}};
{
\draw[red,thick]		(0,2)	--	(6,2);
}
{
\draw[cyan,thick]	(1,0)	--	(1,4);
}
\end{tikzpicture}

\bigskip
\bigskip

\tdplotsetmaincoords{45}{45}
\begin{tikzpicture}[scale=0.5,tdplot_main_coords]
{
\foreach \v in {0,0.5,...,4}
	{
		\draw[blue,opacity=0.25]		
			plot[domain=0:360,variable=\u]	({cos(\u)},{sin(\u)},{\v});
	}
\foreach \u in {0,30,...,360}
	{
		\draw[blue,opacity=0.25]	
			plot[domain=0:4,variable=\v]		({cos(\u)},{sin(\u)},{\v});
	}
}
{
\draw[red,thick]
	plot[domain=0:360,variable=\u]
		({cos(\u)},{sin(\u)},{2});
}
%%
%%	Except for this part which shades in the tangent plane
%%	We'll cheat and use the fact that the point on the cylinder
%%	is actually (1,0,2) and the two tangent vectors
%%	are (0,2,0) and (0,0,2)
\draw[purple,fill=purple!20,opacity=0.5]
	(1,-2,0)	--	++(0,4,0)	--	++(0,0,4)	--	++(0,-4,0)	--	++(0,0,-4) 	-- (1,-2,0);
%%
%%	Now finish off with the tangent vectors which should look like
%%	they are sitting on the plane
%%
{
\draw[cyan,thick]
	plot[domain=0:4,variable=\v]
		({cos(0)},{sin(0)},{\v});
}
{
\draw[red,very thick,->,>=stealth]
	({cos(0)},{sin(0)},2)	--	++(0,2,0);
\draw[cyan,very thick,->,>=stealth]
	({cos(0)},{sin(0)},2)	--	++	(0,0,2);
}

\end{tikzpicture}
\end{minipage}
}
\qquad
\adjustbox{valign=t}
{
\begin{minipage}{0.5\textwidth}
\footnotesize
\begin{align*}
\bfr(u,v) 	&= r\cos(u) \ii + r\sin(u) \jj + v \kk \\
D 				&= \{ (u,v): 0 \leq u \leq 2\pi, \, 0 \leq v \leq h \}
\end{align*}
parameterizes a cylinder of radius $r$ and height $h$

\medskip

The two tangent vectors
\begin{align*}
\color{red}
\mathbf{r}_u (u,v)	&=	
\color{red} -r\sin(u) \ii +r \cos(u) \jj 
\\
\color{cyan}
\mathbf{r}_v (u,v)	&=	
\color{cyan} \kk
\end{align*}
span the \emph{tangent plane} to the cylinder at the given point
\end{minipage}
}
\end{center}
\end{frame}

\section{Tangent Planes}

\begin{frame}
\frametitle{The Tangent Vectors $\bfr_u$ and $\bfr_v$}
\footnotesize
Suppose
\begin{align*}
\bfr(u,v) 	&= x(u,v) \ii + y(u,v) \jj + z(u,v) \kk, \quad  (u,v) 		\in D
\end{align*} 
is a parameterized surface.

\bigskip

At a point $P_0 = \bfr(u_0,v_0)$, the vectors
\begin{align*}
\bfr_u (u_0,v_0)	&=	\frac{\dee x}{\dee u}(u_0,v_0) \ii
								+ \frac{\dee y}{\dee u}(u_0,v_0)\jj
								+ \frac{\dee z}{\dee u}(u_0,v_0)\kk\\[5pt]
\bfr_v (u_0,v_0)	&=	\frac{\dee x}{\dee v}(u_0,v_0) \ii
								+ \frac{\dee y}{\dee v}(u_0,v_0)\jj
								+ \frac{\dee z}{\dee v}(u_0,v_0)\kk\\								
\end{align*}
are \emph{both} tangent to the surface.
\end{frame}



\begin{frame}
\frametitle{The Tangent Plane}
\footnotesize
\begin{align*}
\bfr_u (u_0,v_0)	&=	\frac{\dee x}{\dee u}(u_0,v_0) \ii
								+ \frac{\dee y}{\dee u}(u_0,v_0)\jj
								+ \frac{\dee z}{\dee u}(u_0,v_0)\kk\\[5pt]
\bfr_v (u_0,v_0)	&=	\frac{\dee x}{\dee v}(u_0,v_0) \ii
								+ \frac{\dee y}{\dee v}(u_0,v_0)\jj
								+ \frac{\dee z}{\dee v}(u_0,v_0)\kk\\								
\end{align*}

\medskip

The \emph{tangent plane} to a parameterized surface at $P_0= \bfr(u_0,v_0)$ is the plane passing through $P_0$ and perpendicular to $\bfr_u(u_0,v_0) \times \bfr_v(u_0 , v_0)$.

\bigskip
Find the equation of the tangent plane to the surface
$$ \bfr(u,v) = u^2 \ii + 2u \sin v \jj + u \cos v \kk$$
at $u=1$, $v=0$. 

\end{frame}

\begin{frame}
\frametitle{The Tangent Plane}
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\tdplotsetmaincoords{45}{45}
	\begin{tikzpicture}[scale=0.6,tdplot_main_coords]
	\begin{axis}[z buffer=sort,colormap/cool,axis equal=true]
	%% 	Plot the parametric surface.
	%%	Here x is u, y is v 
		\addplot3[surf,domain=0:2, y domain=-1.5:1.5]
			({x^2},{2*x*sin(deg(y))},{x*cos(deg(y))});
	%% 	Plot the tangent plane
	%%	The point is (1,0,1) and the tangent vectors are
	%%	(2,0,1) and (0,2,0)
		\addplot3[surf,orange,opacity=0.5,domain=-1:1,y domain=-1:1]
			({1+2*x},{2*y},{1+x});
	\end{axis}
	\end{tikzpicture}
	\end{minipage}
}
\quad
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\footnotesize
		\begin{align*}
		\uncover<2->
		{
			\bfr(u,v)	&=	\langle u^2, 2u \sin v, u \cos v \rangle\\
			\bfr_u(u,v)	&=	\langle 2u, 2 \sin v, \cos v \rangle\\
			\bfr_v(u,v)	&=	\langle 0, 2u \cos v, -u\sin v \rangle\\[5pt]
		}
		\uncover<3->
		{
			\bfr(1,0)	&=	\langle 1, 0 , 1 \rangle\\
			\bfr_u(1,0)	&=	\langle 2,0,1 \rangle\\
			\bfr_v(1,0)	&=	\langle 0,2,0 \rangle
		}	
		\end{align*}
	
	\end{minipage}
}
\vfill

\uncover<4->
{
\footnotesize
		The normal to the plane is
		$$ \bfr_u \times \bfr_v = \langle -1, 0, 2 \rangle $$
}
\uncover<5->
{
		so the equation of the plane is
		$$ (-1)(x-1) + 2(z-1) = 0 $$
		
		The tangent plane to the surface at $(1,0,1)$ is parameterized by
		$$ \langle 1+2s,2t,1+s \rangle $$
}
		

\end{frame}

\begin{frame}
\frametitle{The Sphere Revisited}
%%
%%	Draw:
%%
%%		1. 		The sphere and a point on it 
%%		2.		The two tangent vectors
%%		3.		The tangent plane
%%	
%%	In what follows:
%%
%%		The parameter u is the azimuth (\theta)
%%		The parameter v is the altidue (\phi, where \phi=0 is the north pole)
%%
%%		The point where we find the tangent plane is (u,v) = (45,45) in degrees
%%
\adjustbox{valign=t}
{
	\begin{minipage}{0.25\textwidth}
	\tdplotsetmaincoords{65}{110}
	\begin{tikzpicture}[scale=0.5,tdplot_main_coords]
	
	%%
	%%	1. 	Draw sphere
	%%
	
	\foreach \u in {7,17,...,367}
		{
			\draw[gray]
				plot[domain=0:180,variable=\v]
					(
						{3*sin(\v)*cos(\u)},
						{3*sin(\v)*sin(\u)},
						{3*cos(\v)}
					);
		}
	\foreach \v in {0,10,...,180}
		{	
			\draw[gray]
				plot[domain=0:360,variable=\u]
					(
						{3*sin(\v)*cos(\u)},
						{3*sin(\v)*sin(\u)},
						{3*cos(\v)}
					);
		}
		
		%% add red dot at $(\pi/4,\pi/4)$
		
		\draw[red,fill=red]	(
										{3*sin(45)*cos(45)},
										{3*sin(45)*sin(45)},
										{3*cos(45)}
									)
					circle(0.10cm);	
					
		%%
		%%	2. Add tangent vectors
		%%
		
		\uncover<2->
		%% tangent vectors
		{
			\draw[red,very thick,->,>=stealth]
				 	(
				 			{3*sin(45)*cos(45)},
				 			{3*sin(45)*sin(45)},
				 			{3*cos(45)}
				 	)	--
				 ++(-1,1,0);
			\draw[cyan,very thick,->,>=stealth]
				 	(
				 		{3*sin(45)*cos(45)},
				 		{3*sin(45)*sin(45)},
				 		{3*cos(45)}
				 	)	--
				 ++(1,1,-{sqrt(2)});
		}
		
		%%
		%%	3.	Add tangent plane
		%%
		
		\uncover<3->
		{
			\draw[orange,thick,fill=orange!20,opacity=0.5]
					(
				 			{3*sin(45)*cos(45)},
				 			{3*sin(45)*sin(45)-2},
				 			{3*cos(45)+sqrt(2)}
				 	)
				 	--
				 	++(-2,2,0)
				 	--
				 	++(2,2,{-2*sqrt(2)})
				 	--
				 	++(2,-2,0)
				 	--
				 	++(-2,-2,{2*sqrt(2)});
					
		}
	\end{tikzpicture}
	\end{minipage}
}
\quad
\adjustbox{valign=t}
{
\begin{minipage}{0.65\textwidth}
	\scriptsize
	\begin{align*}
		\bfr(u,v) 	&=	 \sin(v) \cos(u) \ii \\
						&	\quad	+  \sin(v) \sin(u) \jj \\
						&	\quad	+  \cos(v) \kk 
	\end{align*}
	$$ 0 \leq u \leq 2\pi, \, \, 0 \leq v \leq \pi $$
	\begin{align*}
	\bfr_u	&=	- \sin(v) \sin(u) \ii	+  \sin(v) \cos(u) \jj 	\\
	\bfr_v	&=	\hphantom{-}  \cos(v) \cos(u) \ii		+	 \cos(v)\sin(u)\jj \\
				&\qquad	 - \sin(v) \kk \\
	\end{align*}
\end{minipage}
}

\scriptsize

Find the tangent plane to the sphere at $(u,v) = (\pi/4,\pi/4)$

\begin{minipage}{0.45\textwidth}
\begin{align*}
\uncover<2->
{
\bfr (\pi/4,\pi/4)		&=	\frac{1}{2}\ii + \frac{1}{2}\jj + \frac{\sqrt{2}}{2} \kk\\
\bfr_u(\pi/4,\pi/4)		&=	-\frac{1}{2} \ii + \frac{1}{2}\jj\\
\bfr_v(\pi/4,\pi/4)		&=	\frac{1}{2} \ii + \frac{1}{2} \jj - \frac{\sqrt{2}}{2} \kk
}
\end{align*}
\end{minipage}
\quad
\begin{minipage}{0.45\textwidth}
\uncover<3->
{
\begin{align*}
\bfn = \bfr_u \times \bfr_v &=	  	-\frac{1}{2} \left( \frac{1}{\sqrt{2}} \ii + \frac{1}{\sqrt{2}}\jj + \kk \right)\\
0 &=\frac{1}{\sqrt{2}} (x-\frac{1}{2}) + \frac{1}{\sqrt{2}}(y - \frac{1}{2})\\
	&\quad + (z-\frac{\sqrt{2}}{2})
\end{align*}
}
\end{minipage}
\end{frame}



\section{Surface Area}

\begin{frame}
\frametitle{Sneak Preview}
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\scriptsize
	\begin{center}
	\textbf{Parametric Curves - Arc Length}
	\end{center}
	\begin{multline*}
	\bfr(t) 	=\\	x(t) \ii + y(t) \jj + z(t) \kk		\\
	\end{multline*}
	\begin{align*}
	\bfr'(t)	&=	x'(t) \ii + y'(t) \jj + z'(t) \kk		\\
	\\
	\left| \bfr'(t) \right| &=	\sqrt{x'(t)^2 + y'(t)^2 + z'(t)^2}\\
	\\
	ds			&=	\left| \bfr'(t) \right| \, dt\\
	\\
	L			&=		\int_a^b \left| \bfr'(t) \right| \, dt \\
	\end{align*}
	\end{minipage}
}
\quad
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\scriptsize
	\begin{center}
	\textbf{Parametric Surfaces - Area}
	\end{center}
	\begin{multline*}
	\bfr(u,v)	=\\	x(u,v) \ii + y(u,v) \jj  + z(u,v)\kk
	\end{multline*}
	\begin{align*}
	\bfr_u(u,v)	&=	 \frac{\dee \bfr}{\dee u} (u,v)	\\[5pt]
	\bfr_v(u,v)	&=	\frac{\dee \bfr}{\dee v} (u,v)\\
	\\
	dA			&=	\left| \bfr_u \times \bfr_v \right| \, du \, dv\\
	\\
	S				&= 	\iint_D \left| \bfr_u \times \bfr_v \right| \, du \, dv
	\end{align*}
	\end{minipage}
}
\end{frame}

\begin{frame}
\frametitle{Surface Area}
\adjustbox{valign=t}
{
\begin{minipage}{0.35\textwidth}

\begin{tikzpicture}[scale=0.5]
\draw[help lines,step=0.5]	(0,0)	grid	(4,4);
\draw[thick,->,>=stealth]	(-0.5,0)	--	(4.5,0) 	node [anchor=west] 	{\footnotesize{$u$}};
\draw[thick,->,>=stealth]	(0,-0.5)	--	(0,4.5)	node [anchor=south] 	{\footnotesize{$v$}};
\draw[very thick,cyan,fill=cyan!30]
		(1,1)	rectangle	(1.5,1.5);
\node[left] 		at (0,1.25)		{\footnotesize{$\Delta v$}};
\node[below] 	at (1.25,0)		{\footnotesize{$\Delta u$}};
\end{tikzpicture}

\vfill

\tdplotsetmaincoords{60}{110}
	\begin{tikzpicture}[scale=0.5,tdplot_main_coords]
	\draw[very thick,->,>=stealth]	(0,0,0)	--	(4,0,0)	
			node [anchor=north east]  	{\footnotesize{$x$}};
	\draw[very thick,->,>=stealth]	(0,0,0)	--	(0,4,0)	
			node	[anchor=west]			{\footnotesize{$y$}};
	\draw[very thick,->,>=stealth]	(0,0,0)	--	(0,0,4)	
			node [anchor=south]			{\footnotesize{$z$}};
	%%
	%%	Draw sphere
	%%
	\foreach \u in {7,17,...,367}
		{
			\draw[gray]
				plot[domain=0:180,variable=\v]
					(
						{3*sin(\v)*cos(\u)},
						{3*sin(\v)*sin(\u)},
						{3*cos(\v)}
					);
		}
	\foreach \v in {0,10,...,180}
		{	
			\draw[gray]
				plot[domain=0:360,variable=\u]
					(
						{3*sin(\v)*cos(\u)},
						{3*sin(\v)*sin(\u)},
						{3*cos(\v)}
					);
		}
	%%	Highlight the image grid square
	%%	which begins at u=20, v=20
	\draw[thick,cyan,fill=cyan!30]	
				plot[domain=0:10,variable=\t]	
					({3*sin(20+\t)*cos(20)},{3*sin(20+\t)*sin(20)},{3*cos(20+\t)})	--
				plot[domain=0:10,variable=\t]
					({3*sin(30)*cos(20+\t)},{3*sin(30)*sin(20+\t)},{3*cos(30)})	--
				plot[domain=0:10,variable=\t]
					({3*sin(30-\t)*cos(30)},{3*sin(30-\t)*sin(30)},{3*cos(30-\t)})	--
				plot[domain=0:10,variable=\t]
					({3*sin(20)*cos(30-\t)},{3*sin(20)*sin(30-\t)},{3*cos(20)});
	\end{tikzpicture}

\end{minipage}
}
\quad
\adjustbox{valign=t}
{
\begin{minipage}{0.55\textwidth}
\footnotesize
Find the area $\Delta A$ of a small patch of surface

\medskip

The map $(u,v) \mapsto \bfr(u,v)$ takes the square to a parallelogram
with sides $\bfr_u \, \Delta u $ and $\bfr_v \, \Delta v$

\medskip

The area of the parallelogram is
$$ \left| \bfr_u \, \Delta u \times \bfr_v \, \Delta v \right| = 
	\left| \bfr_u \times \bfr_v \right| \, \Delta u \, \Delta v$$
	
\medskip

The area of the surface is approximately
$$
A = \sum_{i,j} \left| \bfr_u(u_i,v_i) \times \bfr_v (u_i,v_i) \right| \, \Delta u \, \Delta v
$$
and exactly
$$
\iint_D \left| \bfr_u(u_i,v_i) \times \bfr_v (u_i,v_i) \right|  \, du \, dv
$$
\end{minipage}
}
\end{frame}

\begin{frame}
\frametitle{Surface Area of a Sphere}
\adjustbox{valign=t}
{
	\begin{minipage}{0.35\textwidth}
	\tdplotsetmaincoords{65}{110}
	\begin{tikzpicture}[scale=0.5,tdplot_main_coords]
	%%
	%%	For some reason it looks better when the x and z 
	%%	axes are elongated... but maybe just forget axes
	%%   altogether
	%%
	%\draw[very thick,->,>=stealth]	(0,0,0)	--	(6,0,0)	
	%		node [anchor=north east]  	{\footnotesize{$x$}};
	%\draw[very thick,->,>=stealth]	(0,0,0)	--	(0,4,0)	
	%		node	[anchor=west]			{\footnotesize{$y$}};
	%\draw[very thick,->,>=stealth]	(0,0,0)	--	(0,0,5)	
	%		node [anchor=south]			{\footnotesize{$z$}};
	%% Make a sphere - stagger the lines of constant longitude
	\foreach \u in {7,17,...,367}
		{
			\foreach \v in {0,10,...,180}
				{
					\draw[gray]	
						plot[domain=0:10,variable=\t]	
							({3*sin(\v+\t)*cos(\u)},{3*sin(\v+\t)*sin(\u)},{3*cos(\v+\t)})	--
						plot[domain=0:10,variable=\t]
							({3*sin(\v+10)*cos(\u+\t)},{3*sin(\v+10)*sin(\u+\t)},{3*cos(\v+10)})	--
						plot[domain=0:10,variable=\t]
							({3*sin(\v+10-\t)*cos(\u+10)},{3*sin(\v+10-\t)*sin(\u+10)},{3*cos(\v+10-\t)})	--
						plot[domain=0:10,variable=\t]
							({3*sin(\v)*cos(\u+10-\t)},{3*sin(\v)*sin(\u+10-\t)},{3*cos(\v)});
				}
		}		
	\end{tikzpicture}
	\end{minipage}
}
\quad
\adjustbox{valign=t}
{
\begin{minipage}{0.55\textwidth}
	\scriptsize
	\begin{align*}
		\bfr(u,v) 	&=	a \sin(v) \cos(u) \ii \\
						&	\quad	+ a \sin(v) \sin(u) \jj \\
						&	\quad	+ a \cos(v) \kk 
	\end{align*}
	$$ 0 \leq u \leq 2\pi, \, \, 0 \leq v \leq \pi $$
	\begin{align*}
	\bfr_u	&=	-a \sin(v) \sin(u) \ii	+ a \sin(v) \cos(u) \jj 	\\
	\bfr_v	&=	\hphantom{-} a \cos(v) \cos(u) \ii		+	a \cos(v)\sin(u)\jj \\
				&\qquad	 - \sin(v) \kk \\
	\end{align*}
\end{minipage}
}

\scriptsize
\begin{align*}
	\bfr_u \times \bfr_v	&=	a^2 \sin^2(v) \cos(u) \ii 
								+a^2  \sin^2(v) \sin(u) \jj\
								-a^2  \cos(v) \sin(v) \kk\\
	\left| \bfr_u \times \bfr_v \right|
			&=	a^2\sin^2(v) 
	\end{align*}
	Hence
	\begin{align*}
	S	&=	\int_0^{\pi} \int_0^{2\pi}a^2  \sin^2 v \, du \, dv = 4\pi a^2
	\end{align*}
\end{frame}

\begin{frame}
\frametitle{Surfaces Area of a Graph}
\footnotesize
The graph of a function $z=f(x,y)$ is also a parameterized surface:
\begin{align*}
\bfr(x,y) 	&= x \ii + y \jj + f(x,y) \kk \\
\bfr_x(x,y)	&=	\ii 	+ \frac{\dee f}{\dee x} \kk\\
\bfr_y(x,y)	&=	\jj	+ \frac{\dee f}{\dee y} \kk\\
\bfr_x \times \bfr_y	&=	-\frac{\dee f}{\dee x} \ii + - \frac{\dee f}{\dee y}\jj + \kk\\
\left| \bfr_x \times \bfr_y \right|		
	&=	\sqrt{1+ \left( \frac{\dee f}{\dee x} \right)^2 + 
						\left( \frac{\dee f}{\dee y} \right)^2 }
\end{align*}
Hence, the surface area of the graph over a domain $D$ in the $xy$ plane is
$$ 
S = 
\iint_D 
	\sqrt{1+ \left( \frac{\dee f}{\dee x} \right)^2 + 
				\left( \frac{\dee f}{\dee y} \right)^2 
			}
\, dA
$$

\end{frame}

\begin{frame}
\frametitle{Surface Area of a Graph}

\footnotesize

The surface area of the graph over a domain $D$ in the $xy$ plane is
$$ 
S = 
\iint_D 
	\sqrt{1+ \left( \frac{\dee f}{\dee x} \right)^2 + 
				\left( \frac{\dee f}{\dee y} \right)^2 
			}
\, dA
$$

\vfill


Find the area of the graph of $z=x^2+y^2$ that lies inside the cylinder $x^2+y^2 = 4$

\vfill

\end{frame}
\section{Review}

\begin{frame}
\frametitle{Curves and Surfaces}
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\begin{center}
	\footnotesize
	\textbf{Curves}
	\end{center}
	\scriptsize
	Parameterization
	\begin{align*}
	\bfr(t)	&=	x(t) \ii + y(t) \jj + z(t) \kk\\
	\intertext{Tangent}
	\bfr'(t)&=	x'(t)\ii + y'(t) \jj + z'(t) \kk\\
	\intertext{Tangent line at $t=a$}
	\bfL(s) &= \bfr(a) +  s\bfr'(a)\\
	\intertext{Arc length differential}
	ds &= \sqrt{x'(t)^2+y'(t)^2 + z'(t)^2} \, dt
	\end{align*}
	\end{minipage}
}
\quad
\adjustbox{valign=t}
{
	\begin{minipage}{0.45\textwidth}
	\footnotesize
	\begin{center}
	\textbf{Surfaces}
	\end{center}
	\scriptsize
	Parameterization
	\begin{align*}
	\bfr(u,v) 	&= x(u,v)\ii + y(u,v)\jj \\
		&\quad + z(u,v)\kk\\
	\intertext{Tangents}
	\bfr_u(u,v) &=		\frac{\dee}{\dee u} \bfr(u,v)\\
	\bfr_v(u,v)	&=	\frac{\dee}{\dee v} \bfr(u,v)\\
	\intertext{Normal}
	\bfn			&=	\bfr_u \times \bfr_v\\
	\intertext{Area Differential}
	dA			&=	\left|\bfr_u \times \bfr_v \right| \, du \, dv 
	\end{align*}
	\scriptsize
	
	\end{minipage}
}
\end{frame}


\end{document}



\end{document}