From: Sam Moore Date: Sun, 12 Oct 2014 20:23:04 +0000 (+0800) Subject: More presentation, also videos X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=253d241eb8279be539ad72a0283d3f1575b537ab;p=ipdf%2Fsam.git More presentation, also videos --- diff --git a/figures/view_transformation.pdf b/figures/view_transformation.pdf new file mode 100644 index 0000000..b46b55c Binary files /dev/null and b/figures/view_transformation.pdf differ diff --git a/figures/view_transformation_cumulative.pdf b/figures/view_transformation_cumulative.pdf new file mode 100644 index 0000000..fc23c8a Binary files /dev/null and b/figures/view_transformation_cumulative.pdf differ diff --git a/figures/view_transformation_fail.pdf b/figures/view_transformation_fail.pdf new file mode 100644 index 0000000..a107e4b Binary files /dev/null and b/figures/view_transformation_fail.pdf differ diff --git a/figures/view_transformation_fail.svg b/figures/view_transformation_fail.svg new file mode 100644 index 0000000..cbe1ae0 --- /dev/null +++ b/figures/view_transformation_fail.svg @@ -0,0 +1,636 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + diff --git a/figures/view_transformation_paths.pdf b/figures/view_transformation_paths.pdf new file mode 100644 index 0000000..5b4d804 Binary files /dev/null and b/figures/view_transformation_paths.pdf differ diff --git a/figures/view_transformation_paths.svg b/figures/view_transformation_paths.svg new file mode 100644 index 0000000..b9ab097 --- /dev/null +++ b/figures/view_transformation_paths.svg @@ -0,0 +1,948 @@ + + + +image/svg+xmlZoom out by a large amount then back in +Drifting of Paths +Inserted SVG +We only need to transform the Paths with increased precision + \ No newline at end of file diff --git a/presentation/cumulative_float_SHORT.mkv b/presentation/cumulative_float_SHORT.mkv new file mode 100644 index 0000000..b7d9ffd Binary files /dev/null and b/presentation/cumulative_float_SHORT.mkv differ diff --git a/presentation/float.mkv b/presentation/float.mkv new file mode 100644 index 0000000..9a19dea Binary files /dev/null and b/presentation/float.mkv differ diff --git a/presentation/path-Gmprat.mkv b/presentation/path-Gmprat.mkv new file mode 100644 index 0000000..9db5fce Binary files /dev/null and b/presentation/path-Gmprat.mkv differ diff --git a/presentation/presentation.nav b/presentation/presentation.nav index 9dc92ed..761a13a 100644 --- a/presentation/presentation.nav +++ b/presentation/presentation.nav @@ -3,59 +3,71 @@ \headcommand {\beamer@framepages {1}{1}} \headcommand {\slideentry {0}{0}{2}{2/2}{}{0}} \headcommand {\beamer@framepages {2}{2}} -\headcommand {\slideentry {0}{0}{3}{3/3}{}{0}} +\headcommand {\sectionentry {1}{Motivation}{3}{Motivation}{0}} +\headcommand {\beamer@sectionpages {1}{2}} +\headcommand {\beamer@subsectionpages {1}{2}} +\headcommand {\slideentry {1}{0}{3}{3/3}{}{0}} \headcommand {\beamer@framepages {3}{3}} -\headcommand {\sectionentry {1}{Motivation \& Background}{4}{Motivation \& Background}{0}} -\headcommand {\beamer@sectionpages {1}{3}} -\headcommand {\beamer@subsectionpages {1}{3}} \headcommand {\slideentry {1}{0}{4}{4/4}{}{0}} \headcommand {\beamer@framepages {4}{4}} -\headcommand {\slideentry {1}{0}{5}{5/5}{}{0}} +\headcommand {\sectionentry {2}{Floating Point}{5}{Floating Point}{0}} +\headcommand {\beamer@sectionpages {3}{4}} +\headcommand {\beamer@subsectionpages {3}{4}} +\headcommand {\slideentry {2}{0}{5}{5/5}{}{0}} \headcommand {\beamer@framepages {5}{5}} -\headcommand {\slideentry {1}{0}{6}{6/6}{}{0}} +\headcommand {\slideentry {2}{0}{6}{6/6}{}{0}} \headcommand {\beamer@framepages {6}{6}} -\headcommand {\slideentry {1}{0}{7}{7/7}{}{0}} +\headcommand {\slideentry {2}{0}{7}{7/7}{}{0}} \headcommand {\beamer@framepages {7}{7}} -\headcommand {\slideentry {1}{0}{8}{8/8}{}{0}} +\headcommand {\slideentry {2}{0}{8}{8/8}{}{0}} \headcommand {\beamer@framepages {8}{8}} -\headcommand {\slideentry {1}{0}{9}{9/9}{}{0}} +\headcommand {\slideentry {2}{0}{9}{9/9}{}{0}} \headcommand {\beamer@framepages {9}{9}} -\headcommand {\slideentry {1}{0}{10}{10/10}{}{0}} +\headcommand {\sectionentry {3}{Vector Graphics Viewer}{10}{Vector Graphics Viewer}{0}} +\headcommand {\beamer@sectionpages {5}{9}} +\headcommand {\beamer@subsectionpages {5}{9}} +\headcommand {\slideentry {3}{0}{10}{10/10}{}{0}} \headcommand {\beamer@framepages {10}{10}} -\headcommand {\slideentry {1}{0}{11}{11/11}{}{0}} +\headcommand {\slideentry {3}{0}{11}{11/11}{}{0}} \headcommand {\beamer@framepages {11}{11}} -\headcommand {\slideentry {1}{0}{12}{12/12}{}{0}} +\headcommand {\sectionentry {4}{Precision Issues}{12}{Precision Issues}{0}} +\headcommand {\beamer@sectionpages {10}{11}} +\headcommand {\beamer@subsectionpages {10}{11}} +\headcommand {\slideentry {4}{0}{12}{12/12}{}{0}} \headcommand {\beamer@framepages {12}{12}} -\headcommand {\sectionentry {2}{Live Demo}{13}{Live Demo}{0}} -\headcommand {\beamer@sectionpages {4}{12}} -\headcommand {\beamer@subsectionpages {4}{12}} -\headcommand {\slideentry {2}{0}{13}{13/13}{}{0}} +\headcommand {\slideentry {4}{0}{13}{13/13}{}{0}} \headcommand {\beamer@framepages {13}{13}} -\headcommand {\sectionentry {3}{Conclusions}{14}{Conclusions}{0}} -\headcommand {\beamer@sectionpages {13}{13}} -\headcommand {\beamer@subsectionpages {13}{13}} -\headcommand {\slideentry {3}{0}{14}{14/14}{}{0}} +\headcommand {\slideentry {4}{0}{14}{14/14}{}{0}} \headcommand {\beamer@framepages {14}{14}} -\headcommand {\sectionentry {4}{References}{15}{References}{0}} -\headcommand {\beamer@sectionpages {14}{14}} -\headcommand {\beamer@subsectionpages {14}{14}} -\headcommand {\slideentry {4}{0}{15}{15/15}{}{0}} +\headcommand {\sectionentry {5}{Arbitrary Precision Rationals}{15}{Arbitrary Precision Rationals}{0}} +\headcommand {\beamer@sectionpages {12}{14}} +\headcommand {\beamer@subsectionpages {12}{14}} +\headcommand {\slideentry {5}{0}{15}{15/15}{}{0}} \headcommand {\beamer@framepages {15}{15}} -\headcommand {\sectionentry {5}{Questions}{16}{Questions}{0}} -\headcommand {\beamer@sectionpages {15}{15}} -\headcommand {\beamer@subsectionpages {15}{15}} \headcommand {\slideentry {5}{0}{16}{16/16}{}{0}} \headcommand {\beamer@framepages {16}{16}} -\headcommand {\slideentry {5}{0}{17}{17/17}{}{0}} +\headcommand {\sectionentry {6}{Demonstration}{17}{Demonstration}{0}} +\headcommand {\beamer@sectionpages {15}{16}} +\headcommand {\beamer@subsectionpages {15}{16}} +\headcommand {\slideentry {6}{0}{17}{17/17}{}{0}} \headcommand {\beamer@framepages {17}{17}} -\headcommand {\slideentry {5}{0}{18}{18/18}{}{0}} +\headcommand {\sectionentry {7}{Conclusions}{18}{Conclusions}{0}} +\headcommand {\beamer@sectionpages {17}{17}} +\headcommand {\beamer@subsectionpages {17}{17}} +\headcommand {\slideentry {7}{0}{18}{18/18}{}{0}} \headcommand {\beamer@framepages {18}{18}} -\headcommand {\slideentry {5}{0}{19}{19/19}{}{0}} +\headcommand {\slideentry {7}{0}{19}{19/19}{}{0}} \headcommand {\beamer@framepages {19}{19}} -\headcommand {\slideentry {5}{0}{20}{20/20}{}{0}} +\headcommand {\slideentry {7}{0}{20}{20/20}{}{0}} \headcommand {\beamer@framepages {20}{20}} -\headcommand {\beamer@partpages {1}{20}} -\headcommand {\beamer@subsectionpages {16}{20}} -\headcommand {\beamer@sectionpages {16}{20}} -\headcommand {\beamer@documentpages {20}} -\headcommand {\def \inserttotalframenumber {20}} +\headcommand {\slideentry {7}{0}{21}{21/21}{}{0}} +\headcommand {\beamer@framepages {21}{21}} +\headcommand {\slideentry {7}{0}{22}{22/22}{}{0}} +\headcommand {\beamer@framepages {22}{22}} +\headcommand {\slideentry {7}{0}{23}{23/23}{}{0}} +\headcommand {\beamer@framepages {23}{23}} +\headcommand {\beamer@partpages {1}{23}} +\headcommand {\beamer@subsectionpages {18}{23}} +\headcommand {\beamer@sectionpages {18}{23}} +\headcommand {\beamer@documentpages {23}} +\headcommand {\def \inserttotalframenumber {23}} diff --git a/presentation/presentation.pdf b/presentation/presentation.pdf index 9021d5a..955ca05 100644 Binary files a/presentation/presentation.pdf and b/presentation/presentation.pdf differ diff --git a/presentation/presentation.tex b/presentation/presentation.tex index 7d5494b..8b4108c 100644 --- a/presentation/presentation.tex +++ b/presentation/presentation.tex @@ -64,23 +64,24 @@ } -\begin{frame}[plain] -\frametitle{Contents} - \tableofcontents - % You might wish to add the option [pausesections] -\end{frame} \begin{frame} \frametitle{Summary} \begin{itemize} - \item Vector graphics allow scaling but not arbitrary scaling - \item We implemented a vector graphics viewer that does allow arbitrary scaling - \item ... but it will take an arbitrary amount of time + \item Vector graphics allow detail to be scaled but not by an arbitrary amount + \item We've implemented a vector graphics viewer which does allow arbitrary scaling \end{itemize} \end{frame} +%\begin{frame}[plain] +%\frametitle{Contents} +% \tableofcontents + % You might wish to add the option [pausesections] +%\end{frame} + + % Start of presentation slides -\section{Motivation \& Background} +\section{Motivation} \begin{frame} \frametitle{Graphics Formats} \begin{itemize} @@ -95,14 +96,19 @@ \end{frame} + + + \begin{frame} -\frametitle{Why is there a zoom limit?} +\frametitle{Is there a zoom limit?} \centering \includegraphics{../figures/koch1.pdf} \end{frame} +\section{Floating Point} + \begin{frame} -\frametitle{Why is there a zoom limit?} +\frametitle{Is there a zoom limit?} \begin{itemize} \item SVG, PostScript, PDF specify IEEE-754 \emph{single} floating point number representations \item Range of values: $\approx 3 \times 10^{-38} \to 3 \times 10^{+38}$ @@ -127,6 +133,20 @@ \includegraphics[width=0.8\textwidth]{../figures/floats.pdf} \end{frame} +\begin{frame} +\frametitle{Visualisation of Floats II} +\begin{itemize} + \item Difference between successive floats +\end{itemize} +\centering +\includegraphics[width=0.8\textwidth]{../figures/floats_diff.pdf} +\end{frame} + +\begin{frame} + \frametitle{Precision is limited} + \centering + \includegraphics[width=0.8\textwidth]{../figures/fox-vector_highzoom1.png} +\end{frame} \begin{frame} \frametitle{Structure of Vector Graphics} @@ -140,9 +160,11 @@ \end{frame} +\section{Vector Graphics Viewer} \begin{frame} -\frametitle{Structure of Vector Graphics III} +\frametitle{Structure of Vector Graphics II} \begin{itemize} + \item \small{Upload \emph{bounding rectangles} of individual objects to renderer (OpenGL)} \item Rectangles show individual B\'{e}ziers forming outline of the Fox \end{itemize} \centering @@ -150,17 +172,56 @@ \end{frame} +\begin{frame} +\frametitle{Viewing Vector Graphics} +\begin{itemize} + \item Tranform coordinates in document $\to$ display +\end{itemize} +\centering +\includegraphics[width=0.8\textwidth]{../figures/view_transformation.pdf} +\end{frame} + + +\section{Precision Issues} + + + \begin{frame} \frametitle{Floating point calculations \\ go wrong} \begin{itemize} - \item Scaled to $~1\times 10^{-6}$, the fox is very sick + \item Example: Insert objects at very small scale \end{itemize} \centering - \includegraphics[width=0.5\textwidth]{../figures/fox-vector_highzoom1.png} + \includegraphics[width=0.8\textwidth]{../figures/view_transformation_fail.pdf} + +\end{frame} + +\begin{frame} +\frametitle{Reducing error} + \begin{itemize} + \item Don't apply view transformation directly + \item Store object bounds relative to the display + \item When modifying the view, modify object bounds + \item Detail inserted into the view looks good, But... + \end{itemize} +\centering + \includegraphics[width=0.9\textwidth]{../figures/view_transformation_cumulative.pdf} +\end{frame} + +\begin{frame} +\frametitle{Cumulated Errors \\ with intermediate coord system} + \begin{itemize} + \item Apply transformations to Paths not individual B\'{e}ziers + \item Paths render correctly, but drift appart + \end{itemize} +\centering + \includegraphics[width=0.9\textwidth]{../figures/view_transformation_paths.pdf} \end{frame} +\section{Arbitrary Precision Rationals} + \begin{frame} \frametitle{Arbitrary Precision Rationals} \begin{align} @@ -174,29 +235,29 @@ \end{align} \begin{itemize} \item $d_i$ are fixed size integers, $\beta = 2^{64}$ - \item Size $S$ grows as needed + \item {\bf Size $S$ grows as needed} \item Operations are always exact \item Implemented by GNU Multiple Precision Library \end{itemize} \end{frame} \begin{frame} - \frametitle{Replace floats with rationals?} + \frametitle{Use Rationals to represent \\ Path Coordinates} \begin{itemize} - \item Rationals are \emph{slow} - \item Screen coordinates always in range $0 \to 1$ - \item Introduce intermediate coordinate system - \begin{itemize} - \item Many B\'{e}ziers contained in a Path - \item Use Rationals for bounds of the Path - \item Use floats to transform B\'{e}zier coordinates - \end{itemize} + \item Can move view to arbitrary point + \item Insert detail (ie: Test SVG image) in Display coordinates + \item Move view to another arbitrary point + \item Move view back + \item Detail is unchanged \end{itemize} \end{frame} -\section{Live Demo} + + + +\section{Demonstration} \begin{frame} -\frametitle{Live Demo} +\frametitle{Demonstration} \begin{itemize} \item We can import standard SVGs wherever we want \item If we are willing to wait long enough @@ -208,23 +269,23 @@ \section{Conclusions} \begin{frame} - \frametitle{Conclusions} -\begin{itemize} - \item What we have done? + \frametitle{What was done} \begin{itemize} \item Implemented a basic SVG viewer \item Demonstrated how precision affects rendering vector graphics \item Using GMP rationals, demonstrated the ability to render SVGs scaled to an arbitrary position in a document \end{itemize} - \item Possible future work +\end{frame} + +\begin{frame} + \frametitle{Future work} \begin{itemize} \item Implement more of the SVG standard \item Trial alternative number representations \item Allow for saving and loading SVGs with arbitrary precision \end{itemize} -\end{itemize} \end{frame} -\section{References} +%\section{References} \begin{frame} \frametitle{References \& More information} \begin{itemize} @@ -240,25 +301,15 @@ \item Kahan's website \url{http://http.cs.berkeley.edu/~wkahan} \end{itemize} \end{frame} -\section{Questions} +%\section{Questions} -\begin{frame} -\frametitle{Q: Why don't you have colour?} -\begin{itemize} - \item We do!\footnote{If you are willing to wait long enough} - \item A complete implementation of SVG is ``future work'' -\end{itemize} -\centering -\includegraphics[width=0.5\textwidth]{../figures/shady-the-fox.png} -\includegraphics[width=0.5\textwidth]{../figures/who-the-hell-needs-antialiasing-anyway.png} -\end{frame} \begin{frame} -\frametitle{Q: Why not just use doubles?} +\frametitle{Q: Why not just increase \\ floating point precision?} \begin{itemize} \item Any fixed precision format will still give inexact results - \item But the inexact results will appear slower + \item Eg: Accuracy of rendering a grid \end{itemize} \end{frame} @@ -282,29 +333,16 @@ \end{itemize} \end{frame} - \begin{frame} - \frametitle{Floating Point calculations \\ go wrong} - \begin{itemize} - \item Plank Length: $1.61 \times 10^{-35}$ metres $ > 3\times10^{-38}$ - \item Size of Universe: $4.3 \times 10^{26}$ metres $ << 3 \times10^{38}$ - \item Why isn't this good enough for $1\times 10^{-6}$ - \end{itemize} -\end{frame} +\frametitle{Q: Why don't you have colour?} +\begin{itemize} + \item We do!\footnote{If you are willing to wait long enough} + \item A complete implementation of SVG is ``future work'' +\end{itemize} +\centering +\includegraphics[width=0.5\textwidth]{../figures/shady-the-fox.png} +\includegraphics[width=0.5\textwidth]{../figures/who-the-hell-needs-antialiasing-anyway.png} -\begin{frame} - \frametitle{Floating point calculations \\ go wrong} - \begin{itemize} - \item Transforming from document $(x,y)$ $\to$ screen $(X,Y)$ - \item View is at $(v_x,v_y)$ in document, has dimensions $(v_w,v_h)$ - \end{itemize} - \begin{align} - X = \frac{x - v_x}{v_w} &,\quad\quad Y = \frac{y - v_y}{v_h} - \end{align} - \begin{itemize} - \item Division by $v_w \approx 10^{-6}$ increases the error due to $x - v_x$ - \item Using \emph{double} precision, render correctly down to $v_w \approx 10^{-37}$ - \end{itemize} \end{frame}