[Commit] papers/xr_ols2003 api.tex,1.9,1.10 appendix.tex,1.6,1.7 introduction.tex,1.11,1.12 keithp.bib,1.1,1.2 xr_ols2003.tex,1.6,1.7

Carl Worth commit@keithp.com
Fri, 16 May 2003 08:39:16 -0700


Committed by: cworth

Update of /local/src/CVS/papers/xr_ols2003
In directory home.keithp.com:/tmp/cvs-serv25051

Modified Files:
	api.tex appendix.tex introduction.tex keithp.bib 
	xr_ols2003.tex 
Log Message:
Added reference to convolution.
Added prose around the penguin figures.
Added references for artwork by Larry Ewing and Simon Budig and the GIMP.
Removed long (and incomplete) source code for gradient example.

Index: api.tex
===================================================================
RCS file: /local/src/CVS/papers/xr_ols2003/api.tex,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- api.tex	16 May 2003 13:29:16 -0000	1.9
+++ api.tex	16 May 2003 15:39:14 -0000	1.10
@@ -94,9 +94,9 @@
 surface. This transformation is controlled by the current
 transformation matrix (CTM) within Xr.
 
-The initial matix is established such that one user unit maps to an
+The initial matrix is established such that one user unit maps to an
 integer number of device pixels as close as possible to 3780 user
-units per meter (~96DPI) of physical device. This approach attempts to
+units per meter (~96 DPI) of physical device. This approach attempts to
 balance the competing desires of having a predictable real-world
 interpretation for user units and having the ability to draw elements
 on exact device pixel boundaries. Ideally, device pixels would be so
@@ -238,14 +238,21 @@
 \subsection{Path Stroking}
 \label{sec:path_stroking}
 
-XrStroke draws the outline formed by stroking the path with a pen of
-the current line width.  The line width is set with the XrSetLineWidth
-function. As subsequent segments within a subpath are drawn, they are
-connected according to one of three different join styles, (bevel,
-miter, or round), as set by XrSetLineJoin. Closed subpaths are
-also joined at the closure point. Unclosed subpaths have one of three
-different cap styles, (butt, square, or round), applied at either end
-of the path. The cap style is set with the XrSetLineCap function.
+XrStroke draws the outline formed by stroking the path with a pen that
+in user space is circular with a radius of the current line width, (as
+set by XrSetLineWidth). The specification of the XrStroke operator is
+based on the convolution of polygonal tracings as set forth by Guibas,
+Ramshaw and Stolfi~\cite{ramshaw83}. Convolution lends itself to an
+efficient implementation as the outline of the stroke can be computed
+within an arbitrarily small error bound by simply using a piece-wise
+linear approximations of the path and the pen.
+
+As subsequent segments within a subpath are drawn, they are connected
+according to one of three different join styles, (bevel, miter, or
+round), as set by XrSetLineJoin. Closed subpaths are also joined at
+the closure point. Unclosed subpaths have one of three different cap
+styles, (butt, square, or round), applied at either end of the path.
+The cap style is set with the XrSetLineCap function.
 
 Figure~\ref{fig:caps_joins} demonstrates the three possible cap and
 join styles. The source code for this figure
@@ -313,7 +320,7 @@
   \begin{center}
   \epsfxsize=2in
   \epsfbox{examples/splines_tolerance}
-  \caption{Spline drawn with tolerance of .1, .5, 1, 5, and 10}
+  \caption{Splines drawn with tolerance values of .1, .5, 1, 5, and 10}
   \label{fig:splines_tolerance}
   \end{center}
 \end{figure}
@@ -321,7 +328,7 @@
 \subsection{Paint}
 \label{sec:paint}
 
-The exampless shown so far have all used opaque ``paint'' as the
+The examples shown so far have all used opaque ``paint'' as the
 source for all drawing operations. The color of this paint is selected
 with the XrSetRGBColor function.
 
@@ -348,8 +355,7 @@
 black and white rectangles onto a 3X2 surface. This surface was then
 scaled, filtered, and used as the pattern for 3 XrFill operations.
 This demonstrates an efficient means of generating linear gradients
-within Xr. The source for this image can be seen in
-Figure~\ref{fig:outline_source}.
+within Xr.
 \begin{figure}[htbp]
   \begin{center}
   \epsfxsize=2.5in
@@ -364,7 +370,7 @@
 
 In addition to the vector path support, Xr also supports bitmapped
 images as a primitive object. Images are transformed, (and optionally
-filtered), by the CTM in the same manner as all othere primitives. In
+filtered), by the CTM in the same manner as all other primitives. In
 order to display an image, an XrSurface object must first be created
 for the image, then the image can be displayed with the XrShowSurface
 function. XrShowSurface places an image of the given width and height

Index: appendix.tex
===================================================================
RCS file: /local/src/CVS/papers/xr_ols2003/appendix.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- appendix.tex	16 May 2003 13:29:16 -0000	1.6
+++ appendix.tex	16 May 2003 15:39:14 -0000	1.7
@@ -231,75 +231,77 @@
 \label{fig:splines_tolerance_source}
 \end{figure}
 
-\begin{figure}[htbp]
-\begin{scriptsize}
-\begin{verbatim}
-XrSurface *
-make_gradient (XrState *xrs,
-               double width, double height)
-{
-    XrSurface *g;
-    XrMatrix *matrix;
-
-    XrSave (xrs);
-
-    g = XrSurfaceCreateNextTo (
-                 XrGetTargetSurface (xrs),
-                 XrFormatARGB32, 3, 2);
-    XrSetTargetSurface (xrs, g);
-
-    XrSetRGBColor (xrs, 0, 0, 0);
-    XrRectangle (xrs, 0, 0, 1, 2);
-    XrFill (xrs);
-
-    XrSetRGBColor (xrs, 1, 1, 1);
-    XrRectangle (xrs, 1, 0, 1, 2);
-    XrFill (xrs);
-
-    XrSetRGBColor (xrs, 0, 0, 0);
-    XrRectangle (xrs, 2, 0, 1, 2);
-    XrFill (xrs);
-
-    XrRestore (xrs);
-
-    matrix = XrMatrixCreate ();
-    XrMatrixScale (matrix,
-                   2.0/width, 1.0/height);
-    XrSurfaceSetMatrix (g, matrix);
-    XrSurfaceSetFilter (g, XrFilterBilinear);
-    XrMatrixDestroy (matrix);
-
-    return g;
-}
-
-void
-draw_gradients (XrState *xrs,
-                int img_width, int img_height)
-{
-    XrSurface *gradient;
-    double width, height, pad;
-
-    width = img_width / 4.0;
-    pad = (img_width - (3 * width)) / 2.0;
-    height = img_height;
-
-    gradient=make_gradient(xrs,width,height);
-
-    XrSetPattern (xrs, gradient);
-    draw_flat (xrs, width, height);
-    XrTranslate (xrs, width + pad, 0);
-    XrSetPattern (xrs, gradient);
-    draw_tent (xrs, width, height);
-    XrTranslate (xrs, width + pad, 0);
-    XrSetPattern (xrs, gradient);
-    draw_cylinder (xrs, width, height);
-
-    XrRestore (xrs);
-
-    XrSurfaceDestroy (gradient);
-}
-\end{verbatim}
-\end{scriptsize}
-\caption{Source for 3 gradient-filled shapes}
-\label{fig:outline_source}
-\end{figure}
+% This one may be a bit long, (and it's already incomplete).
+% I think we alrady have too many examples, let's drop this.
+% \begin{figure}[htbp]
+% \begin{scriptsize}
+% \begin{verbatim}
+% XrSurface *
+% make_gradient (XrState *xrs,
+%                double width, double height)
+% {
+%     XrSurface *g;
+%     XrMatrix *matrix;
+% 
+%     XrSave (xrs);
+% 
+%     g = XrSurfaceCreateNextTo (
+%                  XrGetTargetSurface (xrs),
+%                  XrFormatARGB32, 3, 2);
+%     XrSetTargetSurface (xrs, g);
+% 
+%     XrSetRGBColor (xrs, 0, 0, 0);
+%     XrRectangle (xrs, 0, 0, 1, 2);
+%     XrFill (xrs);
+% 
+%     XrSetRGBColor (xrs, 1, 1, 1);
+%     XrRectangle (xrs, 1, 0, 1, 2);
+%     XrFill (xrs);
+% 
+%     XrSetRGBColor (xrs, 0, 0, 0);
+%     XrRectangle (xrs, 2, 0, 1, 2);
+%     XrFill (xrs);
+% 
+%     XrRestore (xrs);
+% 
+%     matrix = XrMatrixCreate ();
+%     XrMatrixScale (matrix,
+%                    2.0/width, 1.0/height);
+%     XrSurfaceSetMatrix (g, matrix);
+%     XrSurfaceSetFilter (g, XrFilterBilinear);
+%     XrMatrixDestroy (matrix);
+% 
+%     return g;
+% }
+% 
+% void
+% draw_gradients (XrState *xrs,
+%                 int img_width, int img_height)
+% {
+%     XrSurface *gradient;
+%     double width, height, pad;
+% 
+%     width = img_width / 4.0;
+%     pad = (img_width - (3 * width)) / 2.0;
+%     height = img_height;
+% 
+%     gradient=make_gradient(xrs,width,height);
+% 
+%     XrSetPattern (xrs, gradient);
+%     draw_flat (xrs, width, height);
+%     XrTranslate (xrs, width + pad, 0);
+%     XrSetPattern (xrs, gradient);
+%     draw_tent (xrs, width, height);
+%     XrTranslate (xrs, width + pad, 0);
+%     XrSetPattern (xrs, gradient);
+%     draw_cylinder (xrs, width, height);
+% 
+%     XrRestore (xrs);
+% 
+%     XrSurfaceDestroy (gradient);
+% }
+% \end{verbatim}
+% \end{scriptsize}
+% \caption{Source for 3 gradient-filled shapes}
+% \label{fig:outline_source}
+% \end{figure}

Index: introduction.tex
===================================================================
RCS file: /local/src/CVS/papers/xr_ols2003/introduction.tex,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- introduction.tex	16 May 2003 06:58:52 -0000	1.11
+++ introduction.tex	16 May 2003 15:39:14 -0000	1.12
@@ -33,8 +33,25 @@
 allows artwork to be provided in vector form which presents high quality
 results at a wide range of sizes.
 
-% I thought it might be nice to get tux onto the front page.
-% Maybe a discussion/comparison of raster vs. vector image descriptions
+Figures~\ref{fig:tux_original}-\ref{fig:tux_vector_scaled} illustrate
+the benefits of vector artwork. The penguin on the left of
+Figure~\ref{fig:tux_original} is the familiar image as originally
+drawn by Larry Ewing\cite{ewing}. The penguin on the right is an Xr
+rendering of vector-based artwork by Simon Budig\cite{budig} intended
+to match Ewing's artwork as closely as possible. At the original scale
+of the raster artwork, the two images are quite comparable.
+
+However, when the images are scaled up, the differences between raster
+and vector artwork become apparent. Figure~\ref{fig:tux_raster_scaled}
+shows a portion of the original raster image scaled by a factor of 4
+with the GIMP~\cite{gimp}. Artifacts from the scaling are apparent,
+primarily in the jaggies around the contour of the image. The GIMP did
+apply an iterpolating filter to reduce these artifacts but this comes
+at the cost of blurring the image. Compare this to
+Figure~\ref{fig:tux_vector_scaled} where Xr has been used to draw the
+vector artwork at 4 times the original scale. Since the vector artwork
+is resolution independent, the artifacts of jaggies and blurring are
+not present in this image.
 
 % *sigh* I'd like to have dot-for-dot renderings of the images, so I
 % would prefer not to specify a size here. But the pdflatex stuff
@@ -46,7 +63,7 @@
   \epsfbox{figures/tux_raster}
   \epsfxsize=.833in
   \epsfbox{figures/tux_vector}
-  \caption{Raster and vector images at original size}
+  \caption{Raster and vector images at original size (artwork courtesy of Larry Ewing and Simon Budig)} 
   \label{fig:tux_original}
   \end{center}
 \end{figure}
@@ -68,10 +85,6 @@
   \label{fig:tux_vector_scaled}
   \end{center}
 \end{figure}
-
-% XXX: Attribution: Original raster image by Larry Ewing,
-% (http://www.isc.tamu.edu/~lewing/linux/). Vectorized version by Larry
-% Budig (http://www.home.unix-ag.org/simon/penguin/).
 
 \subsection{Vector Rendering Model}
 

Index: keithp.bib
===================================================================
RCS file: /local/src/CVS/papers/xr_ols2003/keithp.bib,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- keithp.bib	16 May 2003 06:59:08 -0000	1.1
+++ keithp.bib	16 May 2003 15:39:14 -0000	1.2
@@ -504,4 +504,29 @@
   url = "\url{http://www.usenix.org/publications/library/proceedings/usenix02/tech/freenix/full_papers/gettys/gettys_html/index.html}",
 }
 
+@inproceedings{ramshaw83,
+ author = {Leo Guibas and Lyle Ramshaw and Jorge Stolfi},
+ title = {A kinetic framework for computational geometry},
+ booktitle = {Proceedings of the IEEE 1983 24th Annual Symposium on the Foundations of Computer Science},
+ year = {1983},
+ pages = {100--111},
+ publisher = {IEEE Computer Society Press},
+}
 
+@misc{ewing,
+ title          = "Linux 2.0 Penguins",
+ author         = "Larry Ewing",
+ note           = "\url{http://www.isc.tamu.edu/~lewing/linux}",
+}
+
+@misc{budig,
+ title          = "The Linux-Pinguin again",
+ author         = "Simon Budig",
+ note           = "\url{http://www.home.unix-ag.org/simon/penguin}",
+}
+
+@misc{gimp,
+ title          = "The {GIMP}: The {GNU} Image Manipulation Program",
+ author         = "Peter Mattis and Spencer Kimball and the GIMP developers",
+ note           = "\url{http://www.gimp.org}",
+}
\ No newline at end of file

Index: xr_ols2003.tex
===================================================================
RCS file: /local/src/CVS/papers/xr_ols2003/xr_ols2003.tex,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- xr_ols2003.tex	16 May 2003 06:58:52 -0000	1.6
+++ xr_ols2003.tex	16 May 2003 15:39:14 -0000	1.7
@@ -12,7 +12,7 @@
 %don't want date printed
 \date{}
 
-\title{Xr/Xc: Antialiased Vector Rendering for X}
+\title{Xr: An Antialiased Vector Rendering Library}
 
 \author{
 Carl Worth \\