gzz-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex


From: Janne V. Kujala
Subject: [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex
Date: Mon, 18 Nov 2002 09:08:54 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Janne V. Kujala <address@hidden>        02/11/18 09:08:53

Modified files:
        Documentation/Manuscripts/Irregu: irregu.tex 

Log message:
        More

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Documentation/Manuscripts/Irregu/irregu.tex.diff?tr1=1.50&tr2=1.51&r1=text&r2=text

Patches:
Index: gzz/Documentation/Manuscripts/Irregu/irregu.tex
diff -u gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.50 
gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.51
--- gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.50        Sun Nov 17 
10:21:04 2002
+++ gzz/Documentation/Manuscripts/Irregu/irregu.tex     Mon Nov 18 09:08:53 2002
@@ -100,6 +100,8 @@
 Indeed, the only references we found in the literature where
 non-rectangular viewports are actually used are 
\cite{kramer94translucentwindows} and \cite{bier93toolglass}.
 XXX go through carefully, explain here
+% in all cases, the irregular shape of the viewport matches the shape of an
+% actual irregular object
 
 The Perspective Wall\cite{mackinlay91perspectivewall} 
 bends the rectangular basic shape, ...
@@ -295,14 +297,15 @@
 To start off, assume that we are drawing the torn edge inside a 
 given \emph{envelope}.
 The envelope is parametrized as a mapping $E(s,t)$ to canvas coordinates
-so that $E(s,0)$ and $E(s,1)$ are along the inner and outer edges of the 
+so that $E(s,0)$ and $E(s,1)$ are the inner and outer edges of the 
 envelope, respectively, and the ripples are contained between these two curves.
 The envelope should not intersect itself.
 
 An envelope can be defined with a spine $E(s,1/2)$ and a normal vector
 $N(s)$ so that $E(s,t) = E(s,1/2) + (t-1/2) N(s)$.
 
-For the connected edge, we can obtain the final curve $C(s)$ by simply shifting
+For the connected edge, we can obtain the final edge curve $C(s)$ by 
+simply shifting
 the spine of the envelope along its normal direction by a function 
 $0\le f(p)\le 1$ which only depends on the location of the spine: 
 $C(s) = E(s, f(E(s,1/2)))$.
@@ -391,7 +394,7 @@
 \]
 for intermediate shapes and larger repeating unit in
 the canvas (if the mapped sizes of two textures are not rationally related).
-However, it brakes most of the border drawing algortihms.
+However, it brakes most of the border drawing algorithms discussed below.
 
 
 \if0
@@ -429,46 +432,68 @@
 northrup00artistic,raskar99silhouette} or
 image-based approaches\cite{saito90comprehensible}.
 
-
-.
+In our case, the edge is defined implicitely, as the solution of an equation,
+making it hard to obtain consistent border width.
+Mathematically, the border of an irregular tear-out is defined as 
+the set of points whose distance from the tear-out is less than
+or equal to the desired line width. 
+In the following, we consider different ways approximating
+the border. 
 
 \subsubsection{The oldest trick}
 
-Border: multi-pass perturbed edge.
-
-Quite fast, but still has overhead w.r.t.~just the shape.
-Artifacts: edge thickness, small features 
+The border can be approximated by first drawing the inside of a tear-out
+multiple times with the border color, each time shifting it a few pixels 
+(the line width or a fraction of it) to a diffrent direction.
+
+Shifting to the four screen axis directions is simple and 
+produces good results for small border widths.
+However, diagonal edges are drawn slightly too narrow and
+the border around small features may end up sprinkled, if
+the line width is more than one pixel.
+
+This method is simple and general, but requires multiple passes
+of the envelope for drawing the border.
+If the edge is connected, it suffices to shift to the envelope
+positive normal and both tangent directions.
 
+%Quite fast, but still has overhead w.r.t.~just the shape.
+%Artifacts: edge thickness, small features 
 
 \subsubsection{Image-space algorithms}
 
+XXX: move to ``Drawing the edge''?
+
 Image-space algorithm: ... slow on NV10
 
+Depth discontinuities extracted with a differential operator
+\cite{saito90comprehensible}.
+
 \subsubsection{Mutltitexture}
 
-Similar to multi-pass perturbed edge: values of surrounding fragments
-computed in parallel for each fragment.
+%Similar to multi-pass perturbed edge: values of surrounding fragments
+%computed in parallel for each fragment.
 With four texture units, it is possible to do the texture accesses
-corresponding to four different perturbed edges for each fragment
+corresponding to four different shifted edges for each fragment
 and use GL\_NV\_register\_combiners to determine if any of them
-is inside the torn edge.
+is inside the tear-out.
 
-Attached edges: texture coordinates do not change along a
-normal of the tearing line.
+For connected edges, the texture coordinates do not change along a
+normal of the envelope.
 Simply set up texture units so that each one has
 the same bound texture but texture coordinates a distance corresponding
-to one pixel apart along the tearing line. 
-The read texture values are displacements of the inner edge 
-from the tearing line.
-A fragment is inside the outer edge, if its distance from
+to border width (or a fraction of it) apart along the length of the envelope.
+The read texture values are positions of the torn edge along a normal of 
+the envelope.
+A fragment is inside the outer edge of the border, if its distance from
 any of the adjacent inner edge points is less than the line width.
 This computation can be carried out using GL\_NV\_register\_combiners.
 
 \subsubsection{Pre-computed borders}
 
-It is possible to draw the border by simulating the procedure of 
-drawing a thick line:
-A circle on screen with radius corresponding to the desired line
+It is possible to obtain the outer edge of the border 
+by simulating the procedure of drawing a thick line in the cutting plane:
+A circle on screen with radius corresponding to the desired border
 width is projected back to the cutting plane and then
 moved inside the cutting plane so that
 it always touches the ripple volume, but never crosses it. 
@@ -476,7 +501,7 @@
 back-projected outer edge of the border.
 
 If the cutting plane is then moved (without rotating it) 
-around the surface, the outer edges corresponding to each
+around the ripple volume, the outer edges corresponding to each
 position of the cutting plane draw a complete surface over
 the original surface.
 The same algorithm that draws the inner edge can then be 
@@ -528,9 +553,11 @@
 
 \subsubsection{Offset texture}
 
-For connected edges: 1D texture representing the border is
-offset with the ripple texture value.
-Mip-maps can be computed with constant line width.
+For connected edges, there is an intereseting way of obtaining
+consistent border width using texture shader. 
+The border is drawn by offsetting a texture with an image
+of a straight edge.
+The mipmaps of the edge texture are computed with constant line width.
 Because mip-map $\lambda$ values are computed for each pixel,
 the resulting border width is correct for the local slope
 of the displacement. 
@@ -548,6 +575,30 @@
 
 \subsection{Tearout shapes}
 
+In earlier sections, we have presented different ways of drawing
+one linear section of the envelope. 
+In this section, we consider different ways of drawing complete
+tear-out shapes with contents.
+
+Curved envelopes can be approximated by dicing to linear pieces.
+In the connected case, the sections are drawn as if they were
+rectangles of such lengths that the spines of the adjacent sections meet. 
+Projective texture mapping is used to stretch together the sides of the 
+adjacent rectangles.
+In the scattered case, the sections are drawn simply 
+as overlapping rectangles, 
+but clipped along a normal of the envelope so that no part is drawn twice.
+Both of these methods yield the same set of polygons, with
+the only difference in the texture coordinates.
+
+Corners can be problematic, because the envelope must not intersect
+itself. For the scattered case, drawing the corner 
+
+A simple solution is rounding, if the
+
+The contents of the tear-out are drawn using stencil.
+
+
 Content drawn using stencil.
 Inside only needs to be drawn twice. ???
 Can create ``outside'' stencil and draw inside only once.
@@ -555,15 +606,17 @@
 Curved lines: \\
 - dicing \\
 - non-rectangular segments need projective texture mapping for
-  the connected case: rectangular sections are stretched together
+  the connected case: rectangular sections are stretched together \\
 
 Corners: \\
 - motion problem with connected edge on non-rectangular segments 
   on a straight line
   (the ripples ``rotate'' when the tearout shape moves)  \\
 - rounded corners to make segments more rectangular \\
-- creating corners by intersecting too straight lines with stencil \\
-\\
+- possible problem with self-intersecting envelope \\
+- could move spine to the inner edge with the spine-normal definition \\
+- creating corners by intersecting two straight lines with stencil \\
+
 
 Jigsaw puzzle problems: \\
 - tear-out pieces do not fit together \\




reply via email to

[Prev in Thread] Current Thread [Next in Thread]