[Top][All Lists]
[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: |
Thu, 28 Nov 2002 10:22:14 -0500 |
CVSROOT: /cvsroot/gzz
Module name: gzz
Changes by: Janne V. Kujala <address@hidden> 02/11/28 10:22:14
Modified files:
Documentation/Manuscripts/Irregu: irregu.tex
Log message:
more sketching of How
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gzz/gzz/Documentation/Manuscripts/Irregu/irregu.tex.diff?tr1=1.78&tr2=1.79&r1=text&r2=text
Patches:
Index: gzz/Documentation/Manuscripts/Irregu/irregu.tex
diff -u gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.78
gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.79
--- gzz/Documentation/Manuscripts/Irregu/irregu.tex:1.78 Thu Nov 28
08:00:49 2002
+++ gzz/Documentation/Manuscripts/Irregu/irregu.tex Thu Nov 28 10:22:14 2002
@@ -380,12 +380,12 @@
\]
for all $A, A_1, A_2 \subset \mathbf{R}^2$ and
matching irregular shapes $B, B_1, B_2 \subset \mathbf{R}^2$.
-From this porperty, it follows that the mapping fomr $A$'s to $B$'s
+From this porperty, it follows that the mapping from $A$'s to $B$'s
is actually defined by a point relation $R \in \mathbf{R}^2$:
\[
B = \{\, y \mid \exists x \in A: x R y \,\}.
\]
-If $R$ is a function, i.e., $x R y \Leftrightarrow y = f(x)$,
+If $R$ is a function, i.e., $x R y \Leftrightarrow y = G(x)$,
the irregular shapes will be connected (if the original shape is connected),
but some parts of original
shape may map to overlapping parts in the irregular shape.
@@ -393,36 +393,85 @@
image of the border of $A$.
If $R$ is a function in the inverse direction, i.e.,
-$x R y \Leftrightarrow g(y) = x$,
-there will be no overlapping, but the irregular shape may be scattered.
+$x R y \Leftrightarrow F(y) = x$,
+there will be no overlapping.
+Specifically, the edge of $A$ will map to the edge of $B$.
+However, the irregular shape may be scattered, if many points
+map to the same point in the original shape.
If the function is bijection, the topology of the irregular shape
will match the topology of the original shape.
-Specifically, the edge of $A$ will map to the edge of $B$.
The inverse function mapping is actually implemented in modern
texture shading hardware:
the image of the undistorted shape can be stored in a texture and accessed
with texture coordinates read from (or offset by) another texture storing the
-inverse function (or $g(y) - y)$). This is called a dependent (or offset)
+inverse function (or $F(y) - y$). This is called a dependent (or offset)
texture access.
The forward function cannot be efficiently implemented on fragment level,
because each fragment may depend on multiple values of the function.
The edge of the shape could be displaced on vertex level,
but that is likely to not yield good performance if the shape has fine detail.
-Furthermore, intersection in the edge cause additional problems.
-If the function bijection, so as to avoid any intersections, we
+Furthermore, intersections in the edge may cause additional problems.
+If the function is bijection, so as to avoid any intersections, we
can just as well use the inverse function case by simply inverting
the function.
-
-
---
Because of implementation constraints, we further refine
-the ideal model discussed above.
+the ideal offset texture model discussed above.
+First of all, we want to be able to tear off many different shapes without
+having to render each of them to textures.
+And more importantly, texture shading is not implemented on low-end
+hardware.
+XXX: we want to be able to draw connected tear-out shapes.
+
+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.
+
+Consider a half-plane shape \[
+ A = \{\, x \mid n \cdot (x - x_0) \le 0 \,\},
+\]
+where $n$ is the normal of the edge line.
+
+The offset mapping yields $y \in B$, iff
+\[
+ y + F(y) \in A,
+\]
+i.e.,
+\begin{equation}
+ n \cdot (y - x_0) + n \cdot F(y) \le 0,
+\end{equation}
+Thus, offset has only effect in the normal direction and the problem
+is essentially reduced to one dimension.
+Simply define the ``scattered case'' as:
+\begin{equation}
+ n \cdot (y - x_0) + f(y) \le 0,
+\end{equation}
+where the real function $f$ specifies offset in the normal direction.
+The movement is still natural.
+
+An anlogy to the forward function case can be made by
+limiting the displacement of the shape edge to the normal direction, i.e,
+by defining $G(x) = x + n d(x)$, where $d(x)$ is the normal displacement.
+With one-dimensional displacement, the distorted edge cannot intersect
+itself, and we can write
+\[
+ B = \{\, y \mid n \cdot (y - x_0) \le d( x_y )\,\},
+\]
+where $x_y$ is the projection of $y$ to the undistorted edge.
+The defining equation can be written as
+\begin{equation}
+ n \cdot (y - x_0) + f(x_y) \le 0,
+\end{equation}
+if we define $f(x) = -d(x)$.
+Thus, we have a ``connected case'' in a very similar formulation
+to the above ``scattered case''.
+- consider vector valued ripple function
XXX: relaxing the ``natural movement'' property \dots
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, (continued)
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Tuomas J. Lukka, 2002/11/20
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Benja Fallenstein, 2002/11/22
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Tuomas J. Lukka, 2002/11/27
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Tuomas J. Lukka, 2002/11/27
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Tuomas J. Lukka, 2002/11/27
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Tuomas J. Lukka, 2002/11/27
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/27
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/28
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/28
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/28
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex,
Janne V. Kujala <=
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/28
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/28
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/28
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/28
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/29
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/29
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/29
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/29
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/29
- [Gzz-commits] gzz/Documentation/Manuscripts/Irregu irregu.tex, Janne V. Kujala, 2002/11/29