Graphics Reference
In-Depth Information
Figure 5.28.
Curve midpoint
displacements.
(a) Rough sketch
(b) After random subdivisions
Figure 5.29.
A fractal island.
a new curve segment. The simplest way to do this is to displace the midpoint of the
segment by a random amount along the perpendicular bisector. See Figure 5.28. Given
the segment AB , let C be its midpoint. Compute a unit normal vector u for it, choose
a suitable random number r based on the current scale, and replace AB by the seg-
ments AD and DB , where C is the midpoint of AB and D = C + r u .
Now, to describe some natural shape such as the boundary of an island proceed
as follows: Specify the rough outline of island with a polygonal curve and then apply
the algorithm described above, that is successively replace each edge with an appro-
priate collection of edges. Figure 5.29 shows one possible result after starting with an
approximation to the Australian continent. One does have to deal with the problem
of self-intersections in the resulting curves.
In the two-dimensional case, we have more freedom. For example, for surfaces
described as a collection of triangles one common approach is to do the following:
“Subdivide” each triangle into smaller triangles obtained by connecting its vertices to
appropriate random offsets of the midpoints of its sides. This replaces each triangle
successively by seven new smaller triangles and the process can be repeated. In Figure
5.30(a) the midpoints of the edges of triangle ABC were offset to D , E , and F , and the
triangle replaced by triangles ABD , BDE , BEC , CEF , ACF , ADF , and DEF . A similar
construction works for quadrilaterals. There is one complication in the two-
dimensional case, namely, if one is not careful, then gaps can appear in places where
triangles used to be adjacent. Figure 5.30(b) shows the potential problem if we offset
Search WWH ::




Custom Search