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: Fri, 29 Nov 2002 04:11:53 -0500

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

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

Log message:
        reorg, texture shading

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

Patches:
Index: gzz/Documentation/Manuscripts/Irregu/irregu.tex
diff -u gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.84 
gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.85
--- gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.84        Fri Nov 29 
03:00:27 2002
+++ gzz/Documentation/Manuscripts/Irregu/irregu.tex     Fri Nov 29 04:11:52 2002
@@ -445,6 +445,7 @@
 hardware.
 XXX: we want to be able to draw connected tear-out shapes.
 
+\if 0
 We split the edge of the original shape to multiple pieces, 
 each assumed to be a straight line segment, and then consider
 the problem of distorting each one separately.
@@ -489,6 +490,7 @@
 
 Thus, we have a ``connected case'' in a very similar formulation
 to the above ``scattered case''.
+\fi
 
 ---
 
@@ -497,13 +499,12 @@
 The envelope is parametrized as a mapping $E(x,y)$ to canvas coordinates
 so that $E(x,0)$ and $E(x,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 \emph{spine} $E(x,1/2)$ and a normal vector
 $N(x)$ so that $E(x,y) = E(x,1/2) + (y-1/2) N(x)$.
+The envelope should not intersect itself.
 
 The edge curve $C(x)$ of a conneccted shape can be obtained by simply 
-shifting in the normal direction of the envelope by a function 
+displacing the edge in the normal direction of the envelope by a function 
 $0\le f({\bf p})\le 1$ which only depends on the location ${\bf p}$ of the 
spine:
 $C(x) = E(x, f(E(x,1/2)))$.
 
@@ -516,6 +517,9 @@
 a function with noise at different frequencies, but with lower frequencies
 emphasized more, such as turbulence\cite{perlin-noise-intro}.
 
+These two algorithms correspond to one-dimensional displacement
+and offset distortions, where the one dimension is in the normal direction.
+
 Although these algorithms seem different and produce different results, there 
is 
 actually a general formulation which yields to a visual explanation.
 Both algorithms can be seen as computing the intersection of a
@@ -768,21 +772,21 @@
 
 \subsubsection{Offset texture}
 
-There is an intereseting way of obtaining
-consistent border width using texture shader. 
-
-XXX: connection to the scattered case
-
-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
-(in texels).
-Because mip-map $\lambda$ values are computed for each fragment,
-the resulting border width from the corresponding mip-map level
-is correct for the local slope of the displacement. 
-However, derivative discontinuities are sometimes visible
-as spikes in the border, if the border width is more
-than a few pixels.
+Because the algorithm for drawing the shape is 
+equivalent to one-dimensional offsetting of a half-plane,
+the border can be drawn by offsetting 
+a texture with an image of a straight line.
+However, a sloped offset reduces the width of the distorted line.
+
+This problem can be overcome by computing the mipmaps of
+the edge texture with scale-invariant constant line width (in texels).
+The computed level of detail for each fragment is lower for a
+sloped offset, and the lower detail texture with thicker line
+will exactly compensate the reduced line width.
+Note that this no longer holds for two-dimensional offsetting.
+Also, derivative discontinuities are sometimes visible
+as spikes in the border, if the border is more 
+than a few pixels wide.
 
 The edge texture can be one texel wide (if the image of the 
 edge is drawn horizontally), allowing for large height and




reply via email to

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