summaryrefslogblamecommitdiff
path: root/sduacm2017/lec3/lec.tex
blob: 990c6e5a4237ff664d4a63ba828cb5af9f158a69 (plain) (tree)
















































































































































































































































                                                                                                                                     
\documentclass[aspectratio=169,hyperref={pdfencoding=auto,psdextra}]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{CJKutf8}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{fancyvrb}
\usepackage{amsmath}
\usepackage{multicol}
\usetheme{Malmoe}
\usecolortheme{default}
\begin{CJK*}{UTF8}{gbsn}
\title{「初中数学都不会」}
\subtitle{——Computational Geometrics}
\author{Chris Xiong}
\date{2017-08-18}
\begin{document}
	\frame{\titlepage}
	\begin{frame}
		\frametitle{「初中数学都不会」}
		\framesubtitle{Outline}
		\begin{itemize}
			\item Basics
			\begin{itemize}
				\item Vectors
				\item Distances
				\item Area
				\item Intersections
				\item Transformations
			\end{itemize}
			\item Convex hull
			\item Extra fun
			\item Templates
			\item 殴打宇宙智障
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Basics}
		\framesubtitle{Vectors}
		\begin{itemize}
			\item Computational Gemoetrics in ICPC=\\
					\hspace{1cm}40\% Junior high school maths+\\
					\hspace{1cm}30\% Senior high school maths+\\
					\hspace{1cm}20\% Brainstorming+\\
					\hspace{1cm}10\% College maths
			\item $\mathbf{u}$, $\mathbf{v}$, $\vec{u}$, $\vec{v}$
			\item $\vec{u}+\vec{v}$,$\vec{u}-\vec{v}$,$s\vec{u}$,$\vec{u}\cdot\vec{v}$,$\vec{u}\times\vec{v}$
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Basics}
		\framesubtitle{Distances}
		\begin{itemize}
			\item point 2 point
			\item point 2 line
			\pause
			\item polygon 2 polygon???
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Basics}
		\framesubtitle{Area}
		\begin{itemize}
			\item Circle???
			\item Triangle?
				\begin{itemize}
					\item \sout{$ah/2$}
					\item Heron's formula
					\item Cross product
				\end{itemize}
			\item Polygon???
				\begin{itemize}
					\item Slicing
				\end{itemize}
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Basics}
		\framesubtitle{Intersections}
		\begin{itemize}
			\item point \& line
			\item point \& segment
			\item line \& line
			\item line \& segment
			\item segment \& segment
			\item circle \& line
			\item circle \& circle
			\pause
			\item \sout{convex} polygon \& point \pause
				\begin{itemize}
					\item \sout{randomizing} (polyhedron)
					\item ray casting
					\item winding number
				\end{itemize}
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Basics}
		\framesubtitle{Transformations}
		\begin{itemize}
			\item Scaling
			\item Rotation
			\item ${\displaystyle {\begin{bmatrix}s_x&0\\0&s_y\end{bmatrix}}}$
			\item ${\displaystyle {{\begin{bmatrix}\cos \theta &\sin \theta \\-\sin \theta &\cos \theta \end{bmatrix}}}}$
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Convex hull}
		\framesubtitle{WTF???}
		\begin{itemize}
			\item Smallest convex polygon (set) that contains a set of points.
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Convex hull}
		\framesubtitle{Algorithms}
		\begin{itemize}
			\item Brute force: gift wrapping
			\item Graham scan
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Convex hull}
		\framesubtitle{Gift wrapping}
		\begin{itemize}
			\item The left most point must be in the resulting set
			\item Starting from that point, select the next point such that
			all points are \textbf{to the right} of the newly formed line.
			\item Time complexity: $O(nh)$
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Convex hull}
		\framesubtitle{Graham scan}
		\begin{itemize}
			\item Find an extreme point and sort the remaining point according
			to polar angle.
			\item Start with a stack with two items, the extreme point and the
			first point in the sorted list.
			\item ($P_0$ denotes the top element of the stack, $P_1$ denotes the
			element under $P_0$) For each point left in the list ($T$), pop the
			stack until $\overrightarrow{P_1P_0}$ and $\overrightarrow{P_0T}$ forms
			\textbf{a left turn}. Then push $T$ onto the stack.
			\item Time complexity: $O(n log n)$ (with sorting)
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Convex hull}
		\framesubtitle{Example: NEERC 08 A}
	\end{frame}
	\begin{frame}
		\frametitle{Extra fun}
		\framesubtitle{Example: PetrSU SC 04 C}
		Arc-arc intersection
		\includegraphics[scale=0.5]{c1.png}
	\end{frame}
	\begin{frame}
		\frametitle{Extra fun}
		\framesubtitle{Example: PetrSU SC 04 C}
		\includegraphics[scale=0.36]{c2.png}
	\end{frame}
	\begin{frame}
		\frametitle{Extra fun}
		\framesubtitle{Example: MultiUniversity Traning 20170815 H}
	\end{frame}
	\begin{frame}
		\frametitle{Extra fun}
		\framesubtitle{Example: Asia GuangzhouRC 14 H}
	\end{frame}
	\begin{frame}
		\frametitle{Extra fun}
		\framesubtitle{Example: "Angry birds"}
		One of the few problems of computational geometrics in ICPC
		that involves college maths.
	\end{frame}
	\begin{frame}
		\frametitle{Extra fun}
		\framesubtitle{CG. Combined with other algorithms}
	\end{frame}
	\begin{frame}
		\frametitle{Extra fun}
		\framesubtitle{Rotating calipers}
		Solves:
		\begin{itemize}
			\item Max/min width of convex polygon
			\item Max/min distance between two convex polygons
			\item Antipodal points/Farthest pairs
			\item Union/intersection of convex polygons
			\item Min area/perimeter obb
			\item etc.
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{Templates}
		\framesubtitle{Critical for Computational Geometrics (maybe)}
		\begin{itemize}
			\item Basic operations
			\item Basic intersections
			\item Circle-line intersection
			\item Circle-triangle intersection
			\item Circle-circle intersection
			\item 3D vector operations
			\item Half-plane intersection
			\item Cloest/Farthest Pair
			\item etc.
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{殴打宇宙智障}
		\framesubtitle{光辉事迹+1}
		\begin{itemize}
			\item 建完图后把图清空然后跑网络流\pause
			\item 熟悉你的模板\pause
			\item 多校睡觉\pause
			\item 队伍组成
			\item 代码手?\pause
			\item 违反中央八项规定\pause
			\item 口技
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{殴打宇宙智障}
		\framesubtitle{后事}
		\begin{itemize}
			\item 21日最后一次讲课
			\item 8月31日计科退宿舍
			\item 如有不同以宇宙智障为准
		\end{itemize}
	\end{frame}
	\begin{frame}
		\frametitle{殴打宇宙智障}
		\framesubtitle{没来得及讲的东西}
		\begin{itemize}
			\item 概率(解方程/dp)、高斯消元
			\item 网络流
			\item 好像没什么了?
			\item Good luck to ya.
		\end{itemize}
	\end{frame}
\end{CJK*}
\end{document}