\documentclass[handout]{beamer}

\usepackage{amscd,amssymb,epsfig}
\def\F{{\mathbb F}}
\def\a{\alpha}
\def\Fq{\F_q}
\def\Fp{\F_p}
\def\Fqstar{\F_q^{\,*}}
\def\Z{\mathbb Z}
\def\Q{\mathbb Q}
\def\R{\mathbb R}
\def\C{\mathbb C}
\def\N{\mathbb N}
\def\P{\mathbb P}
\newcommand{\maintitle}[1]{\begin{center}\Large #1 \end{center}}
\newcommand{\slidetitle}[1]{\begin{par}\Large #1\end{par}}
\newtheorem{thm}{Theorem}
\newtheorem{defn}{Definition}
\newtheorem{cor}{Corollary}
\newtheorem{prop}{Proposition}
\def\boxit#1{\vbox{\hrule\hbox{\vrule\kern3pt
      \vbox{\kern3pt#1\kern3pt}\kern3pt\vrule}\hrule}}
\mode<presentation>
{
  \usetheme{Warsaw}

  \setbeamercovered{opaque}
}


\usepackage[english]{babel}

\usepackage[latin1]{inputenc}

\usepackage{times}
\usepackage[T1]{fontenc}

\title[Toric Varieties in Geometric Modeling]
{Toric Varieties in Geometric Modeling\\
Math in the Mountains Tutorial}

\author
{John B. Little}

\institute[College of the Holy Cross]
{
  Department of Mathematics and Computer Science\\
  College of the Holy Cross\\
}

\date[July 29-31, 2013]
{July 29-31, 2013}

\begin{document}

\begin{frame}
  \titlepage
\end{frame}

\begin{frame}
{\bf Outline}

\tableofcontents

\end{frame}

\section{Geometric modeling -- basic examples}

\begin{frame}
{\bf Computer aided geometric design}

\begin{itemize}
\item<1-> Since the 1960's B\'ezier curves and surfaces have been 
a fundamental tool for designing, rendering, manufacturing shapes
\item<2-> Work by B\'ezier (Renault) and de Casteljau (Citro\"en)
\item<3-> We will see how the study of toric varieties gives some interesting
tools for understanding this area and developing new primitives, and
\item<4-> discuss some (perhaps unexpected) connections with moment maps
and Birch's Theorem from the talk on algebraic statistics
\end{itemize}
\end{frame}

\begin{frame}
{\bf Example 0 -- cubic B\'ezier curves}

\begin{itemize}
\item<1-> Let $P_0,P_1,P_2,P_3$ be any four points in $\R^2$ (same construction
would also work in $\R^3$, or $\R^d$ more generally)
\item<2-> The associated B\'ezier cubic is the parametric curve defined
by
$$b(t) = (x(t),y(t)) = \sum_{i=0}^3 \binom{3}{i} t^i (1-t)^{3-i} P_i$$
(Exercise:  This is always a subset of a rational algebraic curve of degree 3 in $x,y$.)
\item<3->  Note:  the coefficients are the Bernstein basis for 
polynomials of degree $\le 3$ and
\item<4->  $\sum_{i=0}^3 \binom{3}{i} t^i (1-t)^{3-i} = (t + (1-t))^3 = 1$
\end{itemize}
\end{frame}

\begin{frame}
{\bf Two B\'ezier curves}

\begin{columns}
\column{.5\textwidth}
\begin{figure}
\includegraphics[scale=.27]{Bezier2.jpg}
\caption{$(0,0),(1,1),(0.1,0),(0,1)$}
\end{figure}
\column{.5\textwidth}
\begin{figure}
\includegraphics[scale=.27]{Bezier1.jpg}
\caption{$(0,0),(1,1),(1,-0.5),(0,1)$}
\end{figure}
\end{columns}
\end{frame}

\begin{frame}
{\bf B\'ezier curves, cont.}

\begin{itemize}
\item<1-> Note the way the $P_i$ (the \emph{control points})
\emph{control the shape} of the resulting curve:
\item<2-> $b(0) = P_0$ and $b(1) = P_3$
\item<3-> the relation on the Bernstein polynomials given above implies that
$b(t)$ lies in ${\rm conv}\{P_0,P_1,P_2,P_3\}$ for all $0 \le t \le 1$
\item<4-> Tangent vector at $P_0$ is determined by $P_1 - P_0$; tangent vector 
at $P_3$ is determined by $P_3 - P_2$
\item<5-> More complicated shapes (e.g. character outlines in a typeface)
can be specified, or even designed, via B\'ezier \emph{splines}.
\item<6-> Can also replace cubic B\'ezier curves by degree $n$ B\'ezier
curves with $n+1$ control points (splines are generally superior for applications,
though!)
\end{itemize}
\end{frame}

\begin{frame}
{\bf B\'ezier surfaces}

\begin{itemize}
\item<1-> To design 2D surfaces, we can use similar parametric surfaces
\item<2-> Two commonly-used types: B\'ezier triangles and rectangles (``tensor
products'' of two B\'ezier curves)
\item<3-> For example, a B\'ezier triangle of order 3 would be given by 
the selection of 10 control points $P_{ij}$ in $\R^3$:
$$b(s,t) = \sum_{i=0}^3 \sum_{j=0}^{3-i} \frac{3!}{i!j!(3-i-j)!} s^i t^j (1 - s - t)^
{3 - i - j} P_{ij}$$
on the domain $\Delta = {\rm conv}\{(0,0),(1,0),(0,1)\}$
\item<4->  Note: the edges will be cubic B\'ezier curves defined by the 4-tuples
of control points $\{P_{00}, P_{10}, P_{20}, P_{30}\}$,
 $\{P_{00}, P_{10}, P_{20}, P_{30}\}$, and $\{P_{30}, P_{21}, P_{12}, P_{03}\}$
\end{itemize}
\end{frame}


\begin{frame}
{\bf A B\'ezier triangle}

\begin{figure}
\includegraphics[scale=.4]{BezierTriangle.jpg}
\caption{Corner control points are $(0,0,0),(3,3,1),(1,2,4)$}
\end{figure}
\end{frame}

\section{Toric surface patches}

\begin{frame}
{\bf A generalization}

\begin{itemize}
\item<1-> In [K], Krasauskas introduced a generalization of the B\'ezier
triangles and tensor product patches:
\item<2-> Construction starts from any convex lattice polygon $\Delta$ 
in $\R^2$
\item<3-> Number the edges in some way with $i = 1,\ldots, r$; say ${\bf v}_i$
 is an inward normal to the $i$th edge, and 
$h_i(s,t) = \langle {\bf v}_i, (s,t)\rangle + a_i = 0$ defines that line
\item<4-> The article [K] defines \emph{toric B\'ezier basis, or blending, functions} indexed
by the lattice points $m \in \Delta \cap \Z^2$:
$$F_m(s,t) = c_m h_1(s,t)^{h_1(m)} \cdots h_r(s,t)^{h_r(m)},$$
where the $c_m > 0$ are constants.  
\end{itemize}
\end{frame}

\begin{frame}
{\bf Toric patch parametrizations}

\vskip 10pt
Let $w_m > 0$ be weights, and choose control points in 
$P_m \in \R^3$, both indexed by ${\cal A} = \Delta\cap\Z^2$.  
The corresponding toric surface patch
of shape ${\cal A}, w$ is the 
rational parametric surface
$$b_{{\cal A},w}(s,t) = \frac{1}{\sum_{m\in {\cal A}} w_m F_m(s,t)}{
\sum_{m\in {\cal A}} w_m F_m(s,t) P_m}$$
for $(s,t) \in \Delta$.
\end{frame}

\begin{frame}
{\bf Example -- The rectangle $\Delta = [0,p] \times [0,q]$}

\begin{itemize}
\item<1-> Use the normal vectors $(0,1),(-1,0),(0,-1),(1,0)$ counterclockwise
around $\Delta$
\item<2-> Corresponding $h_i$ are $h_1(s,t) = t$, $h_2(s,t) = p-s$, $h_3(s,t) = q-t$,
$h_4(s,t) = s$ 
\item<3->  If we take $c_m = \binom{p}{a} \binom{q}{b}$, we get 
$$F_m(s,t) = \binom{p}{a} s^a(p - s)^{p - a}\cdot \binom{q}{b} t^b(q - t)^{q-b}$$
\item<4->  A reparametrization of the usual tensor product 
B\'ezier patch of bidegree $(p,q)$ -- standard form scales 
by letting $s = p\sigma$ and $t = q\tau$ for $(\sigma,\tau) \in [0,1]\times [0,1]$.
\end{itemize}
\end{frame}

\begin{frame}
{\bf B\'ezier triangles}

\begin{itemize}
\item<1-> Let $\Delta = {\rm conv}\{(0,0),(k,0),(0,k)\}$ and
take ${\cal A}$
\item<2-> Exercise:  $b_\Delta$ for 
$\Delta_k = {\rm conv}\{(0,0),(k,0),(0,k)\}$ is (a reparametrization of)
the B\'ezier triangle from before.  
\end{itemize}
\end{frame}

\begin{frame}
{\bf General properties}

\begin{itemize}
\item<1-> Exercises:  Just as in the simpler cases,
\item<2-> Image $b_{{\cal A}, w}(\Delta)$ lies in the convex hull of the 
control points,
\item<3-> Image \emph{contains} the control points corresponding
to vertices of $\Delta$
\item<4-> Control points for lattice points of $\Delta$ on edges, but 
not at vertices, of $\Delta$ determine
shape of the boundaries; control points for interior lattice points of 
$\Delta$ can be used to change
concavity, ... 
\item<5-> Possible ``structural'' singular points of the image 
(i.e. present for generic control points) are determined by 
lattice geometry of $\Delta$ (singular cones in normal fan)
\item<6-> For more about all of this, see [CGS].
\end{itemize}
\end{frame}

\begin{frame}
{\bf But does the generality get you anything?}

\begin{itemize}
\item<1->  In the applications, triangles and rectangles can
be slightly awkward: for some surfaces, might need
to subdivide \emph{a lot} 
\item<2->  Being able to construct 5- or 6-sided patches, for example,
might be useful for some things
\item<3->  Here are two views of a toric surface patch from the 
hexagon 
$$\Delta = {\rm conv}\{(0,0),(1,0),(2,1),(2,2),(1,2),(0,1)\}$$
for some particular control points in $\R^3$.  The interior lattice point
$(1,1)$ corresponds to a control point at $(-3,-7,5)$
\end{itemize}
\end{frame}

\begin{frame}
{\bf The $F_m$ for this ${\cal A}$}

\begin{eqnarray*}
F_{(0,0)} &=&  w_{(0,0)} (y - x + 1)(2 - x)^2(2 - y)^2(x - y + 1)\\
F_{(1,0)} &=&  w_{(1,0)} (2-x)(2-y)^2(x-y+1)^2x\\
F_{(2,1)} &=&  w_{(2,1)} x^2 y (2 - y)(x - y + 1)^2\\
F_{(2,2)} &=&  w_{(2,2)} (y-x+1)x^2 y^2(x - y + 1)\\
F_{(1,2)} &=&  w_{(1,2)} x y^2 (y - x + 1)^2 (2-x)\\
F_{(0,1)} &=&  w_{(0,1)} y (y - x + 1)^2 (2 - x)^2 (2- y)\\
F_{(0,0)} &=&  w_{(0,0)} y (y - x + 1)(2 -x) (2 - y) (x - y + 1) x. 
\end{eqnarray*}
\end{frame}

\begin{frame}
{\bf Two views of a toric surface patch}

\begin{columns}
\column{.5\textwidth}
\begin{figure}
\includegraphics[scale=.3]{Hex1.jpg}
\caption{Hexagonal toric patch}
\end{figure}
\column{.5\textwidth}
\begin{figure}
\includegraphics[scale=.3]{Hex2.jpg}
\caption{Rotated view showing concavity}
\end{figure}
\end{columns}
\end{frame}

\begin{frame}
{\bf Partial patches}

\vskip 10pt
We could also do the same replacing ${\cal A}$  by \emph{any subset}
${\cal A}'$ of the lattice points in $\Delta$ (usually want to include 
all of the vertices so the polygon itself does not change)

\vskip 10pt
Exercise:  What is the relation between the corresponding toric surface
patches?   

\end{frame}

\begin{frame}
{\bf A message from our sponsor}

\begin{itemize}
\item<1-> From what we have seen previously and these examples, 
it should be relatively clear that $b_{\Delta}$ is somehow related 
to a \emph{toric variety}.  But, what is the precise relation?  
\item<2->  To simplify notation, let $\ell = |{\cal A}|$
\item<3->  First observation:  Since $h_m$ come from the inward
normals to $\Delta$, the map $H : \Delta \to \R^\ell$ given 
by the $h_m$ has image in $\R^\ell_{\ge 0}$.
\item<4->  The toric blending functions
come from composing this $H$ with
$\chi : \R^\ell \to \R^{\ell}$ defined by 
$$y \longmapsto (y_1^{h_1(m)}\cdots y_\ell^{h_\ell(m)} : m \in {\cal A})$$
\end{itemize}
\end{frame}

\begin{frame}
{\bf The ``punch line''}

\begin{itemize}
\item<1-> So far, we have 
$\chi \circ H : \Delta \to \R^{\ell}_{\ge 0} \to \R^\ell_{\ge 0}$.
The toric surface
patch is the composition $\pi_{P} \circ \chi \circ H$, where
$\pi_{P} : \R^\ell \to \R^3$ is the affine form of a 
linear projection defined by the set of control points
\item<2->  (Exercise)
Since $h_i(s,t) = \langle {\bf v}_i, (s,t) \rangle + a_i$, the
$m$-component of $\chi(y)$ is just $y^a z^m$, 
where $a = (a_1,\ldots,a_\ell)$ comes from the constant terms, and
$z = (z_j)$ where  
$$z_j = \prod_{i=1}^\ell y_i^{ \langle {\bf v}_i,{\bf e}_j \rangle }, 
\quad j = 1,2$$
\item<3->  But the map $z \mapsto (z^m : m \in {\cal A})$ is just 
the monomial parametrization of the toric variety $X_{\cal A}$.  
\end{itemize}
\end{frame}

\begin{frame}
{\bf Factoring toric patches another way}

\begin{itemize}
\item<1->  Hence a toric surface patch can be factored a different way as 
$$\Delta \to (X_{\cal A})_{\ge 0} \to \R^3$$ 
\item<2-> The first map is $\chi \circ H$
\item<3->  The second is the projection $\pi_P$ 
defined by the control points
\item<4->  also, $(X_{\cal A})_{\ge 0}$ is the 
is the set of points obtained from the monomial parametrization 
of $X_{\cal A}$ by taking all parameter values real and $\ge 0$.  
\end{itemize}
\end{frame}

\begin{frame}
{\bf Relation with earlier examples}

\begin{itemize}
\item<1-> If $\Delta_k$ is ${\rm conv}\{(0,0),(k,0),(0,k)\}$
as above, then $(X_{\Delta_k})_{\ge 0}$ is a subset of the real points
of the degree-$k$ \emph{Veronese image} of $\P^2$
\item<2-> $(X_{[p,0]\times[0,q]})_{\ge 0}$ is a subset of the
Veronese-Segre bidegree $p,q$ image of $\P^1 \times \P^1$
\item<3-> The images of corresponding toric surfaces patches will be projections
of these defined by the control points
\item<4-> Krasauskas' construction generalizes this to any $\Delta$, 
though, so it's very flexible!
\end{itemize}
\end{frame}



\section{The (algebraic) moment map}

\begin{frame}
{\bf But wait a minute, ... }

\begin{itemize}
\item<1->  Will it \emph{always} be true that a toric surface
patch preserves the shape of $\Delta$ to the degree we saw with the hexagon?  
\item<2->  For instance, do $k$-sided polygons $\Delta$ map
to $k$-sided $b_{\Delta}(\Delta)$?  Of course, it \emph{also} depends on
the choice of the control points, but there is an interesting 
connection between this applied question and a general theoretical
statement about toric varieties (which in turn connects with interesting
questions in topology and symplectic geometry)
\item<3->  The connection depends on an algebraic version of 
the \emph{moment map}
\end{itemize}
\end{frame}

\begin{frame}
{\bf The moment map}

\vskip 10pt
Let ${\cal A}$ be a set of lattice points 
with $\Delta = {\rm conv}({\cal A})$.
The (algebraic) moment map of the toric variety
$X_{\cal A}$ is the mapping $X_{\cal A}$ defined as
follows
\begin{align*}
f : X_{\cal A} &\longrightarrow \R^2\\
x &\longmapsto \frac{1}{ \sum_{m\in {\cal A}} |x_m|}{\sum_{m\in {\cal A}} |x_m| m }
\end{align*}
(recall the coordinates of points in $X_{\cal A}$ are in
1-1 correspondence with the $m \in {\cal A}$ via the 
monomial parametrization)
\end{frame}

\begin{frame}
{\bf The theorem}

\begin{thm}
The mapping $f$ restricts to a homeomorphism between the 
non-negative real part of $X_{\cal A}$ and the 
polygon $\Delta$.
\end{thm}

\vskip 10pt 
(See Theorem 12.2.2 in [CLS] or Chapter 4 of [F].)

\vskip 10pt
As we said before,  
for any collection of control points,
the image of the toric surface patch is a linear projection of 
the non-negative real part of $X_{\cal A}$.
\end{frame}

\section{Linear precision and connections with statistics}

\begin{frame}
{\bf Final observations}

\begin{itemize}
\item<1-> Looking back at the algebraic moment map definition:
\begin{align*}
f : X_{\cal A} &\longrightarrow \R^2\\
x &\longmapsto \frac{1}{ \sum_{m\in {\cal A}} |x_m|}{\sum_{m\in {\cal A}} |x_m| m }
\end{align*}
note that $f \circ \chi \circ H$ restricted to $\Delta$ is ``almost''
the same as the toric patch -- \emph{but using the $m \in {\cal A}$ ``as
the control points''}
\item<2->  (Exercise) In some cases, we can see that $f \circ \chi \circ H$
is actually the \emph{identity map} on $\Delta$ -- for instance
show this for the triangle $\Delta_k = {\rm conv}\{(0,0),(k,0),(0,k)\}$.
\end{itemize}
\end{frame}

\begin{frame}
{\bf Linear precision}

\begin{itemize}
\item<1->  The property $f\circ \chi\circ H = {\rm id}_{\Delta}$
is related to a property called \emph{linear precision} 
in the geometric modeling world
\item<2->  Often used in a less restrictive sense there, though: 
\item<3->  \emph{For some weights $w_m \ge 0$
and some choice of control points $m$ whose convex hull is $\Delta$,
the parametrized patch (with control points the $m$) is the identity
on $\Delta$} 
\item<4->  If ${\cal A}$ is the set of vertices of $\Delta$ and
the blending functions of a patch with linear precision are
\emph{barycentric coordinates} on $\Delta$ 
\end{itemize}
\end{frame}


\begin{frame}
{\bf Final observations, continued}

\begin{itemize}
\item<1->Can always reparametrize by a homeomorphism $\Delta \to \Delta$
to get linear precision.  
\item<2-> Can also vary weights $w_m$ and non-vertices
of $\Delta$ to ``tune'' a patch to obtain linear precision in some cases.
\item<2->  Interesting question: which $\Delta$
have this property ``automatically?''
The article [BRS] shows that this true for Krasauskas' toric surface
patches \emph{only} for the $\Delta_k$ triangles, 
the $[p,0] \times [0,q]$ rectangles, and certain trapezoids
where $X_{\Delta}$ is a rational normal scroll (Hirzebruch surface)!
\item<3->  One can ask the analogous question in higher dimensions too and 
which $\Delta$ give linear precision is an open question
\end{itemize}
\end{frame}

\begin{frame}
{\bf Another characterization of linear precision}

\begin{itemize}
\item<1-> Proof in [BRS] is based on the following:
\item<2-> Given ${\cal A}$, and the $w_m$ for $m \in {\cal A}$,
let $f_{{\cal A},w} = \sum_{m \in {\cal A}} w_m x^m$ (a Laurent 
polynomial)
\item<3-> Then the toric surface patch of shape ${\cal A},w$ has 
linear precision if and only if the rational mapping $\C^2 \to \C^2$ given by 
$$\frac{1}{f}\left(
x_1 \frac{\partial f_{{\cal A},w}}{\partial x_1}, 
x_2 \frac{\partial f_{{\cal A},w}}{\partial x_2}\right)$$
(toric polar mapping) is a \emph{birational isomorphism} 
\end{itemize}
\end{frame}

\begin{frame}
{\bf Relation to Birch's theorem}

\vskip 10pt
In the talk on algebraic statistics, considered
toric models associated to integer matrices ${\cal A}$ defined by
expressions like 
$$\varphi : \theta \mapsto \frac{1}{\sum_{j=1}^m \theta^{A_j}}
\left(\theta^{A_1},\ldots,\theta^{A_m}\right).$$
The \emph{toric model} associated to ${\cal A}$ is $\varphi(\R^d_{>0})$
and this is $(X_{\cal A})_{\ge 0}$ as above (abuse of notation: ${\cal A}$
for both the matrix and the set of lattice points; also might give a ``partial'' surface patch).  

\vskip 10pt
Given data $u$ and $b = Au$, the MLE $\widehat{\theta}$ gives
$\widehat{p} \in \varphi(\R^d_{>0})$ and $A \widehat{p} = \frac{1}{N}b$.  
Almost the same as the case where the control points are taken to be 
the $m \in \Delta$ (morally, $\widehat{p} \mapsto A\widehat{p}$
``is'' the moment map).
\end{frame}

\begin{frame}
{\bf References for further study}

\begin{enumerate}
\item[BRS] von Bothmer, Ranestad, and Sottile, Linear precision for 
toric surface patches, Found. of Comput. Math. 10 (2010), 37-66
\item[K] Krasauskas, Toric Surface Patches, Adv. Comput. Math. 17 (2002), 89-113
\item[CGS] Craciun, Garcia-Puente, and Sottile, Some geometrical aspects of 
control points for toric patches, Mathematical Methods for Curves and Surfaces (2010),
111-135 (arXiv 0812.1275) 
\item[CLS] Cox, Little, and Schenck, {\it Toric Varieties}, AMS, 2011
\item[F] Fulton, {\it Introduction to toric varieties}, Princeton U. Press, 1993
\item[GS] Garcia-Puente and Sottile, {\it Linear precision for parametric patches},
Adv. Comput. Math. 33 (2010), 191-214.
\end{enumerate}
\end{frame}







\end{document}

