All the figures and none of the Lit Review
[ipdf/sam.git] / chapters / Background.tex
index 1d3e141..288ce4d 100644 (file)
@@ -11,13 +11,13 @@ In Chapter \ref{Progress}, we will discuss our findings so far with regards to a
 \section{Raster and Vector Images}\label{Raster and Vector Images}
 \input{chapters/Background_Raster-vs-Vector}
 
-\section{Rasterising Vector Images}\label{Rasterising Vector Images}
-
-Throughout Section \ref{vector-vs-raster-graphics} we were careful to refer to ``modern'' display devices, which are raster based. It is of some historical significance that vector display devices were popular during the 70s and 80s, and papers oriented towards drawing on these devices can be found\cite{brassel1979analgorithm}. Whilst curves can be drawn at high resolution on vector displays, a major disadvantage was shading; by the early 90s the vast majority of computer displays were raster based\cite{computergraphics2}.
+\section{Rendering Vector Images}\label{Rasterising Vector Images}
 
 Hearn and Baker's textbook ``Computer Graphics''\cite{computergraphics2} gives a comprehensive overview of graphics from physical display technologies through fundamental drawing algorithms to popular graphics APIs. This section will examine algorithms for drawing two dimensional geometric primitives on raster displays as discussed in ``Computer Graphics'' and the relevant literature. Informal tutorials are abundant on the internet\cite{elias2000graphics}. This section is by no means a comprehensive survey of the literature but intends to provide some idea of the computations which are required to render a document.
 
-\subsection{Straight Lines}\label{Straight Lines}
+It is of some historical significance that vector display devices were popular during the 70s and 80s, and papers oriented towards drawing on these devices can be found\cite{brassel1979analgorithm}. Whilst curves can be drawn at high resolution on vector displays, a major disadvantage was shading; by the early 90s the vast majority of computer displays were raster based\cite{computergraphics2}.
+
+\subsection{Straight Lines}\label{Rasterising Straight Lines}
 \input{chapters/Background_Lines}
 
 \subsection{Spline Curves}\label{Spline Curves}
@@ -27,16 +27,47 @@ Splines are continuous curves formed from piecewise polynomial segments. A polyn
        y(x) &= \displaystyle\sum_{k=0}^n a_k x^k
 \end{align}
 
+Splines may be rasterised by sampling of $y(x)$ at a number of points $x_i$ and rendering straight lines between  $(x_i, y_i)$ and $(x_{i+1}, y_{i+1})$ as discussed in Section \ref{Straight Lines}.
 
-A straight line is simply a polynomial of $0$th degree. Splines may be rasterised by sampling of $y(x)$ at a number of points $x_i$ and rendering straight lines between  $(x_i, y_i)$ and $(x_{i+1}, y_{i+1})$ as discussed in Section \ref{Straight Lines}. More direct algorithms for drawing splines based upon Brasenham and Wu's algorithms also exist\cite{citationneeded}.
+There are many different ways to define a spline. One approach is to specify ``knots'' on the curve and choosing a fixed $n$ ($n = 3$ for ``cubic'' splines) solve for the cooefficients to generate polynomials passing through the points. Alternatively, special polynomials may be defined using ``control'' points which themselves are not part of the curve; these are convenient for graphical based editors. Bezier splines are the most straight forward way to define a curve in the standards considered in Section \ref{Document Representations}. A spline defined from two cubic beziers is shown in Figure \ref{spline.pdf}
 
-There are many different ways to define a spline. One approach is to specify ``knots'' on the spline and solve for the cooefficients to generate a cubic spline ($n = 3$) passing through the points. Alternatively, special polynomials may be defined using ``control'' points which themselves are not part of the curve; these are convenient for graphical based editors. Bezier splines are the most straight forward way to define a curve in the standards considered in Section \ref{Document Representations}
+\begin{figure}[H]
+\centering
+\begin{minipage}[t]{0.3\textwidth}
+\begin{figure}[H]
+       \centering
+       \includegraphics[width=\textwidth]{figures/spline_labelled.pdf}
+\end{figure}
+\end{minipage}
+\begin{minipage}[t]{0.3\textwidth}
+\begin{minted}{xml}
+<!-- DOM element in SVG used to construct the spline -->
+<path d="M 0,300 
+       C 0,300 200,210 90,140 
+       -20,70 200,0 200,0"
+       style="stroke:#000000; stroke-width:1px; 
+       fill:none;"/>
+\end{minted}
+\begin{minted}{postscript}
+% PostScript commands for a similar spline
+0 300 moveto 
+0 300 200 210 90 140 curveto 
+-20 70 200 0 200 0 curveto stroke 
+\end{minted}
+\end{minipage}
+\begin{minipage}[t]{0.3\textwidth}
+\begin{figure}[H]
+       \centering
+       \includegraphics[width=\textwidth]{figures/spline.pdf}
+\end{figure}
+\end{minipage}
+       \caption{Constructing a Spline from two cubic beziers \\ (a) Showing the Control Points (b) Representations in SVG and PostScript (c) Rendered Spline}\label{spline.pdf}
+\end{figure}
 \subsubsection{Bezier Curves}
 \input{chapters/Background_Bezier}
 
-\subsection{Font Rendering}
-
-Donald Knuth's 1986 textbook ``Metafont'' blargh
+\subsection{Font Rendering}\label{Font Rendering}
+\input{chapters/Background_Fonts}
 
 
 

UCC git Repository :: git.ucc.asn.au