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: Tuomas J. Lukka
Subject: [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex
Date: Sat, 30 Nov 2002 13:38:04 -0500

CVSROOT:        /cvsroot/gzz
Module name:    gzz
Changes by:     Tuomas J. Lukka <address@hidden>        02/11/30 13:38:04

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

Log message:
        More smoothing

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

Patches:
Index: gzz/Documentation/Manuscripts/Irregu/irregu.tex
diff -u gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.118 
gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.119
--- gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.118       Sat Nov 30 
13:32:06 2002
+++ gzz/Documentation/Manuscripts/Irregu/irregu.tex     Sat Nov 30 13:38:04 2002
@@ -583,6 +583,17 @@
 
 XXX figs for all these shapes!
 
+When the tear-out reaches the edge of canvas, the smooth 
+canvas border should be drawn instead of the parts of the tear-out
+shape extending outside the canvas.
+This can be implemented with stencil operations:
+First the full tear-out shape including the border is drawn
+to the stencil buffer. 
+Then the canvas with its borders is drawn on screen using stencil test,
+and another bit is written to the stencil buffer for each canvas pixel
+ending up on screen.
+That stencil bit is then used to draw borders for the torn edges.
+
 \subsubsection{2D offset texture}
 
 The type of offsetting in Eq.(\ref{eqoffset}) is implemented 
@@ -605,7 +616,7 @@
 the offset texture implementation: 
 all its effects are within the options described in Section~\ref{secoptions}.
 
-\subsubsection{Polygonal XXX}
+\subsubsection{Explicit undistorted shape}
 
 Naturally, the undistorted shape can also be drawn by by OpenGL primitives, 
 by drawing polygons enveloping the widest variation in the torn shape
@@ -619,6 +630,15 @@
 location of the paper, the noise texture is accessed at the location
 of the undistorted edge by calculating the texture coordinates appropriately.
 
+Corners can cause problems in this approach: for large angles,
+the deviation from the normal direction is not noticeable but 
+for angles approaching $90\deg$, the results are not satisfactory.
+There are several possible solutions: rounding the corners, using 
+the stencil buffer to render the two edges separately and taking
+the intersection,
+
+
+
 % The shape is given by Eq.~(\ref{eq:inside}), which under the 
 % assumptions can be written as a point $(x,y)$ being inside the tearout, 
 % iff
@@ -686,17 +706,6 @@
 %This method works even if the tear-out shape has no corners,
 %and requires no extra passes over the inside of the shape
 %(the stencil can be cleared as the contents are drawn).
-
-When the tear-out reaches the edge of canvas, the smooth 
-canvas border should be drawn instead of the parts of the tear-out
-shape extending outside the canvas.
-This can be implemented with stencil operations:
-First the full tear-out shape including the border is drawn
-to the stencil buffer. 
-Then the canvas with its borders is drawn on screen using stencil test,
-and another bit is written to the stencil buffer for each canvas pixel
-ending up on screen.
-That stencil bit is then used to draw borders for the torn edges.
 
 % If a canvas is torn into multiple pieces, the above methods
 % produce edges that do not fit together: the edges of adjacent




reply via email to

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