305 |
envelope, respectively, and the ripples are contained between these two curves. |
envelope, respectively, and the ripples are contained between these two curves. |
306 |
The envelope should not intersect itself. |
The envelope should not intersect itself. |
307 |
|
|
308 |
An envelope can be defined with a spine $E(x,1/2)$ and a normal vector |
An envelope can be defined with a \emph{spine} $E(x,1/2)$ and a normal vector |
309 |
$N(x)$ so that $E(x,y) = E(x,1/2) + (y-1/2) N(x)$. |
$N(x)$ so that $E(x,y) = E(x,1/2) + (y-1/2) N(x)$. |
310 |
|
|
311 |
For the connected edge, we can obtain the final edge curve $C(x)$ by |
The edge curve $C(x)$ of a conneccted shape can be obtained by simply |
312 |
simply shifting |
shifting in the normal direction of the envelope by a function |
|
the spine of the envelope along its normal direction by a function |
|
313 |
$0\le f({\bf p})\le 1$ which only depends on the location ${\bf p}$ of the spine: |
$0\le f({\bf p})\le 1$ which only depends on the location ${\bf p}$ of the spine: |
314 |
$C(x) = E(x, f(E(x,1/2)))$. |
$C(x) = E(x, f(E(x,1/2)))$. |
315 |
|
|
325 |
|
|
326 |
Although these algorithms seem different and produce different results, there is |
Although these algorithms seem different and produce different results, there is |
327 |
actually a general formulation which yields to a visual explanation. |
actually a general formulation which yields to a visual explanation. |
328 |
Both algorithms can be seen as computing the intersection of |
Both algorithms can be seen as computing the intersection of a |
329 |
\emph{ripple volume}, the volume below the surface $({\bf p}, f({\bf p}))$, |
\emph{ripple volume}, the volume below the surface $({\bf p}, f({\bf p}))$, |
330 |
and a \emph{cutting surface} $(E(x,g(y)), y)$, |
and a \emph{cutting surface} $(E(x,g(y)), y)$, |
331 |
and then mapping the intersection on the envelope $E(x,y)$ |
and then mapping the intersection on the envelope $E(x,y)$ |
342 |
\begin{equation} \label{eq:inside} |
\begin{equation} \label{eq:inside} |
343 |
f(E(x,g(y))) \ge y. |
f(E(x,g(y))) \ge y. |
344 |
\end{equation} |
\end{equation} |
345 |
For more variation on the edge shapes, the inequality can be |
For more variation on edge shapes, the inequality can be |
346 |
generalized to |
generalized to |
347 |
\begin{equation} \label{eq:inside2} |
\begin{equation} \label{eq:inside2} |
348 |
(1-\alpha(y)) f_1(E(x,g_1(y))) + \alpha(y) f_2(E(x,g_2(y)) \ge y, |
(1-\alpha(y)) f_1(E(x,g_1(y))) + \alpha(y) f_2(E(x,g_2(y)) \ge y, |
371 |
In the following, we shall concentrate on drawing one rectangular section |
In the following, we shall concentrate on drawing one rectangular section |
372 |
of the envelope, in the unit square, with $y=0$ inside the tear-out, |
of the envelope, in the unit square, with $y=0$ inside the tear-out, |
373 |
$y=1$ outside the tear-out, and $x$ along the length of the envelope. |
$y=1$ outside the tear-out, and $x$ along the length of the envelope. |
374 |
It assumed that the canvas position $E(x,y)$ inside the section of the |
It assumed that the canvas location $E(x,y)$ |
375 |
envelope depends linearly on the parameters $x$ and $y$. |
depends linearly on the parameters $x$ and $y$ |
376 |
|
inside the section of the envelope. |
377 |
Furthermore, without loss of generality, we assume that $E(x,y) = (x,y)$. |
Furthermore, without loss of generality, we assume that $E(x,y) = (x,y)$. |
378 |
At the end of this section, we consider how to use the rectangular |
At the end of this section, we consider how to use the rectangular |
379 |
pieces to create a complete tear-out shape. |
pieces to create a complete tear-out shape. |
654 |
the ripple function for either one of each pair of facing sides. |
the ripple function for either one of each pair of facing sides. |
655 |
But then a 180 degree rotation of a pair of fitting pieces |
But then a 180 degree rotation of a pair of fitting pieces |
656 |
inverts the torn shape between them, breaking the principle of |
inverts the torn shape between them, breaking the principle of |
657 |
tying ripple shape to canvas positions. |
tying ripple shape to canvas location. |
658 |
|
|
659 |
The problem can be fully solved with a vector valued ripple function |
The problem can be fully solved with a vector valued ripple function |
660 |
${\bf F}({\bf p})$, $\Vert{\bf F}({\bf p})\Vert \le 1$, |
${\bf F}({\bf p})$, $\Vert{\bf F}({\bf p})\Vert \le 1$, |
665 |
|
|
666 |
The texture shader version can directly use the vector valued ripple function. |
The texture shader version can directly use the vector valued ripple function. |
667 |
It can also be used with the |
It can also be used with the |
668 |
pre-computed borders method by pre-computing the dot product, too, |
pre-computed borders method by pre-computing the dot product, too. |
669 |
when computing the outer surfaces. |
However, even the connected case then requires a full 360 degree span |
|
However, even the connected case then requires a full 360 span |
|
670 |
of pre-computed outer surfaces. |
of pre-computed outer surfaces. |
671 |
|
|
672 |
|
|