372 |
a simple algorithm for a shape with the desired properties. |
a simple algorithm for a shape with the desired properties. |
373 |
|
|
374 |
Suppose $A \subset \mathbf{R}^2$ is the part of the canvas we want to tear off, |
Suppose $A \subset \mathbf{R}^2$ is the part of the canvas we want to tear off, |
375 |
for example, a rectangle or a smooth ellipse. |
for example, a rectangle or an ellipse. |
376 |
We want to define the corresponding irregular piece $B \subset \mathbf{R}^2$ |
We want to define the corresponding irregular piece $B \subset \mathbf{R}^2$ |
377 |
so as to satisify the ``natural movement'' property: |
so as to make the movement of $A$ look natural. |
378 |
|
There should be some maximum radius $r$ of rippling, so that |
379 |
|
whether $y \in B$ depends only on $A \cap B(y, r)$. Furthermore |
380 |
|
$A \cap B(y, r) = \emptyset$ should imply $y \notin B$ and |
381 |
|
$A \cap B(y, r) = B(y,r)$ should imply $y \in B$. |
382 |
|
|
383 |
|
One way of defining such properties is to start with the requirement that: |
384 |
\[ |
\[ |
385 |
A = A_1 \cup A_2 \Rightarrow B = B_1 \cup B_2, |
A = A_1 \cup A_2 \Rightarrow B = B_1 \cup B_2, |
386 |
\] |
\] |
387 |
for all $A, A_1, A_2 \subset \mathbf{R}^2$ and |
for all $A, A_1, A_2 \subset \mathbf{R}^2$ and |
388 |
matching irregular shapes $B, B_1, B_2 \subset \mathbf{R}^2$. |
matching irregular shapes $B, B_1, B_2 \subset \mathbf{R}^2$. |
389 |
From this porperty, it follows that the mapping from $A$'s to $B$'s |
From this porperty, it follows that the mapping from $A$'s to $B$'s |
390 |
is actually defined by a point relation $R \in \mathbf{R}^2$: |
is actually defined by a point relation $R \subset \mathbf{R}^2$: |
391 |
\[ |
\[ |
392 |
B = \{\, y \mid \exists x \in A: x R y \,\}. |
B = \{\, y \mid \exists x \in A: x R y \,\}. |
393 |
\] |
\] |
437 |
each assumed to be a straight line segment, and then consider |
each assumed to be a straight line segment, and then consider |
438 |
the problem of distorting each one separately. |
the problem of distorting each one separately. |
439 |
|
|
440 |
Consider a half-plane shape \[ |
Consider a half-plane shape |
441 |
A = \{\, x \mid n \cdot (x - x_0) \le 0 \,\}, |
\[ |
442 |
|
A = \{\, x \mid n \cdot (x - x_0) \le 0 \,\} |
443 |
\] |
\] |
444 |
where $n$ is the normal of the edge line. |
representing one line segment, where $n$ is the normal of the line. |
445 |
|
|
446 |
The offset mapping yields $y \in B$, iff |
The offset mapping yields $y \in B$, iff |
447 |
\[ |
\[ |
448 |
y + F(y) \in A, |
y + F(y) \in A, |
449 |
\] |
\] |
450 |
i.e., |
i.e., iff |
451 |
\begin{equation} |
\begin{equation} |
452 |
n \cdot (y - x_0) + n \cdot F(y) \le 0, |
n \cdot (y - x_0) + n \cdot F(y) \le 0, |
453 |
\end{equation} |
\end{equation} |
454 |
Thus, offset has only effect in the normal direction and the problem |
Thus, offset has only effect in the normal direction and the problem |
455 |
is essentially reduced to one dimension. |
is essentially reduced to one dimension. |
456 |
Simply define the ``scattered case'' as: |
We can simply define the ``scattered case'' as: |
457 |
\begin{equation} |
\begin{equation} |
458 |
n \cdot (y - x_0) + f(y) \le 0, |
n \cdot (y - x_0) + f(y) \le 0, |
459 |
\end{equation} |
\end{equation} |
460 |
where the real function $f$ specifies offset in the normal direction. |
where the real function $f$ specifies offset in the normal direction. |
461 |
The movement is still natural. |
The movement is still natural. XXX |
462 |
|
|
463 |
An anlogy to the forward function case can be made by |
An anlogy to the forward function case can be made by |
464 |
limiting the displacement of the shape edge to the normal direction, i.e, |
limiting the displacement of the shape edge to the normal direction, i.e, |
477 |
Thus, we have a ``connected case'' in a very similar formulation |
Thus, we have a ``connected case'' in a very similar formulation |
478 |
to the above ``scattered case''. |
to the above ``scattered case''. |
479 |
|
|
|
|
|
|
- consider vector valued ripple function |
|
|
|
|
|
XXX: relaxing the ``natural movement'' property \dots |
|
|
|
|
|
|
|
480 |
--- |
--- |
481 |
|
|
482 |
To start off, assume that we are drawing the torn edge inside a |
To start off, assume that we are drawing the torn edge inside a |
503 |
a function with noise at different frequencies, but with lower frequencies |
a function with noise at different frequencies, but with lower frequencies |
504 |
emphasized more, such as turbulence\cite{perlin-noise-intro}. |
emphasized more, such as turbulence\cite{perlin-noise-intro}. |
505 |
|
|
|
|
|
506 |
Although these algorithms seem different and produce different results, there is |
Although these algorithms seem different and produce different results, there is |
507 |
actually a general formulation which yields to a visual explanation. |
actually a general formulation which yields to a visual explanation. |
508 |
Both algorithms can be seen as computing the intersection of a |
Both algorithms can be seen as computing the intersection of a |