281 |
\subsection{Algorithm ``How?''} |
\subsection{Algorithm ``How?''} |
282 |
|
|
283 |
In this subsection, we formulate the design criteria of the preceding section mathematically |
In this subsection, we formulate the design criteria of the preceding section mathematically |
284 |
to obtain a simple algorithm with the desired properties and an interesting graphical explanation |
and discuss |
285 |
|
a simple algorithm for a shape with the desired properties |
286 |
|
and an interesting graphical explanation |
287 |
for the algorithm. |
for the algorithm. |
288 |
|
|
289 |
To start off, assume that we are drawing the torn edge around a given |
To start off, assume that we are drawing the torn edge around a given |
295 |
The resulting shape of the edge should be continuous w.r.t.~both the local |
The resulting shape of the edge should be continuous w.r.t.~both the local |
296 |
point and normal vector. |
point and normal vector. |
297 |
|
|
298 |
|
For the attached edge, we can obtain the final curve by simply shifting the original |
299 |
|
smooth curve to its normal direction by a function which only depends on the location $(x, y)$. |
300 |
|
|
301 |
|
The sprinkled case, on the other hand, can be obtained through a decision process: |
302 |
|
again using a function of location $f(x,y)$, a given point is {\em inside} the curve, |
303 |
|
iff $f(x,y) < d_C(x,y)$, where $d_C(x,y)$ is the distance of the point $(x,y)$ from |
304 |
|
the contents of the curve $C$. |
305 |
|
|
306 |
- the torn shape of a point on an edge should be a continuous function of the point's location on the paper\\ |
- the torn shape of a point on an edge should be a continuous function of the point's location on the paper\\ |
307 |
- the function should change slowly enough so that the dot product of movement direction and edge normal |
- the function should change slowly enough so that the dot product of movement direction and edge normal |