<<

1 Fast Simulation of Laplacian Growth Theodore Kim, Jason Sewall, Avneesh Sud and Ming C. Lin University of North Carolina at Chapel Hill, USA {kim,sewall,sud,lin}@cs.unc.edu

Abstract— Laplacian instability is the physical mechanism that • A user parameter that allows high-level modulation of drives pattern formation in many disparate natural phenomena. dimension, along with intuitive controls for low-level However, current algorithms for simulating this instability are detail; impractically slow and memory intensive. We present a new • algorithm that is over three orders of magnitude faster than Simple implementation that requires neither the linear previous methods and decreases memory use by two orders of system solvers nor point location data structures of pre- magnitude. Our algorithm is based on the dielectric breakdown vious methods; model from physics, but is faster, more intuitive, easier to • Proof-of-concept demonstration of our algorithm on mod- implement, and simpler to control. We demonstrate the ability eling of several natural phenomena and pattern formation. of our algorithm to simulate various natural phenomena and compare its performance with previous techniques. We apply our algorithm to generation of the tree and lightning as shown in Figures 4 and 5(a), and to the Tesla Index Terms— procedural texturing, natural phenomena, frac- coil discharge in Figure 7. We measured a performance gain tals, diffusion limited aggregation, dielectric breakdown model of over three orders of magnitude, and two orders of mag- nitude in memory savings over previous techniques. We also I. INTRODUCTION demonstrate the use of our algorithm to augment the existing framework of L-Systems [3], as shown in Figure 6. Laplacian instability occurs when a smooth interface evolv- ing under a Laplacian field develops rapidly growing spikes II. PREVIOUS WORK and branches. Many fields are Laplacian, including the steady- Laplacian growth algorithms are closely related to , state heat equation, electric potential, and an incompressible as they can often produce structures with a dimension. fluid pressure field. The instability has been connected to The term ‘fractal’ was coined by Mandelbrot [4] to character- many disparate phenomena, such as dendrites on snowflakes, ize non-integral, or ‘fractional’ values for physical dimension. forks on lightning, quasi-steady-state fracture, lobes on lichen, In addition to the usual 1D, 2D and 3D, Mandelbrot defined coral, riverbeds, vasculature, and urban sprawl patterns. Since in-between dimensions such as 1.71D or 2.55D. The Koch the formation of non-smooth features from smooth initial snowflake and the have since become instantly conditions is counter-intuitive, this topic has attracted attention recognizable computer-generated structures, and fractal ter- in physics, chemistry, and material science. rains, fractal textures [5], and L-Systems [3] are now standard Simulating Laplacian instability, or Laplacian growth, has visual effects tools. not been a widely used technique in computer graphics, There are three classes of Laplacian growth algorithms. perhaps because existing algorithms, specifically the dielectric Listed in order of increasing generality they are: diffusion breakdown model (DBM) [1], have prohibitive space and limited aggregation [6], the dielectric breakdown model [1], time requirements, and are daunting to implement efficiently. and Hastings-Levitov iterative conformal mapping [7]. We However, many natural structures arise through this instability, will abbreviate them respectively as DLA, DBM, and HLCM. thus fast simulations of Laplacian instability can provide a While HLCM is the most general algorithm, it is also the most powerful, general, and physically-based method for describing mathematically involved, and can be difficult to interpret phys- a wide variety of natural phenomena. ically. Alternately, DLA has a simple physical interpretation, In this paper, we present a fast Laplacian growth algorithm but can only produce a narrow set of fractal structures. By that is structurally similar to DBM but simulates a different comparison, DBM offers clean physical intuition while still physical case, fuse breakdown [2]. Our algorithm admits a producing a rich variety of growth structures. spherical harmonic solution, which allows it to take into In computer graphics, DLA has been used to produce ice account arbitrary boundary data, such as an environment [8], lichen [9], and DBM has been used to create lightning map. We have not found a similar algorithm elsewhere in [10]. Many other natural phenomena can be generated by the literature, and our method appears to be novel from a these algorithms [11], but they require supercomputer-scale physics standpoint as well, as it suggests that Laplacian growth resources for the simulation. However, the efficiency of our does not require the evolving interface to be an equipotential algorithm should make the generation of these phenomena surface. The main contributions of this paper are: practical on commodity desktop PCs. • A fast, exact, memory-optimal fractal growth algorithm; • A spherical harmonic formulation that takes into account A. The Dielectric Breakdown Model arbitrary boundary information, such as environment As our algorithm is structurally similar to DBM, we will maps; briefly describe the DBM algorithm here. DBM was first 2

(a) (b) Fig. 2. From left to right: Results of DLA, our algorithm, and DBM. Despite the fact that we are solving a different physical case, the characteristic branching patterns of Laplacian growth are still observed.

(φ )η p =  i i n η (2) j=1(φj) where i is the index of some candidate growth site, n is the total number of candidate growth sites, φi is the potential at (c) (d) site i, and pi is the probability of selection for site i. Once φ =0 Fig. 1. (a) Initial conditions for 2D DBM. Red: φ =0, Blue: φ =1(b) the site has been selected, it is set to , and treated as 2D Laplace stencil (c) Initial conditions for 3D DBM (Octant cut away for a boundary condition in subsequent iterations. The algorithm clarity). (d) 3D Laplace stencil proceeds until the desired growth structure is obtained. Three- dimensional growth can be obtained by instead solving the 7 point Laplacian stencil (Figure 1(d)) over a 3D grid, with described by Niemeyer et al. [1] to simulate the branching an initial enclosing sphere instead of a circle (Figure 1(c)). patterns that occur in electric discharge. While the model The initial boundary condition in Fig. 1 is arbitrary, and could generalizes to many natural phenomena, we will describe it be set to other configurations to produce different discharge intuitively in terms of electrical discharge. The simulation patterns. η proceeds in three steps: The term in Eqn. 2 is a user parameter that controls the dimension of the growth structure. At η =0, a fully φ 1) Calculate the electric potential on a regular grid 2D growth structure known as an Eden cluster is produced according to some boundary condition. [12], and at η =4, a 1D line is obtained [13]. Therefore, by φ 2) Select a grid cell as a ‘growth site’ according to . tuning η between 0 and 4, the entire spectrum of structures 3) Add the growth site to the boundary condition. between 1 and 2 dimensions can be obtained. Similarly, in One application of these three steps is considered a single three dimensions, the spectrum between 1D and 3D can be iteration of DBM. The algorithm is iterated until the desired obtained by tuning η. growth structure, or aggregate, is obtained. The 2D initial boundary conditions described in the original III. FAST SIMULATION OF LAPLACIAN INSTABILITY paper [1] are shown in Figure 1(a). The red cells represent a boundary condition of φ =0, and the blue cells are φ =1. In this section, we will propose a faster, more memory Intuitively, φ =0corresponds to a region of negative charge, efficient Laplacian growth algorithm. In DBM, a large amount and φ =1a region of positive charge. The potentials φ in of computation time is spent on the first step. Computing the neutral white cells are obtained by solving the Laplace the potential is expensive because we are numerically treating equation, the interior of the aggregate as a perfect conductor, and the 2 charge redistributes drastically even if only a small perturba- ∇ φ =0, (1) tion to the boundary is introduced. Therefore, computing the potential field for this new distribution is still expensive. In according to these boundary conditions. In 2D, the Laplace order to circumvent this problem, we constrain the interior of equation can be solved by constraining the values of the grid the aggregate to be a perfect insulator instead. Even under cells according to the 5 point Laplacian stencil (Figure 1(b)). these different physical conditions, we have found that the These constraints produce a linear system that can then be branching patterns characteristic of Laplacian instability still solved with an efficient solver such as conjugate gradient. occur (Figure 2). Physically, this suggests that the conductivity Once the potential φ is known, a growth site must be of the aggregate is not an essential component of Laplacian selected. All grid cells that are adjacent to negative charge instability. are considered candidate growth sites. The growth site is DBM simulates dielectric breakdown; when breakdown then randomly selected from a distribution weighted according occurs an insulator (ie dielectric) is converted into a conduc- to the local potential at each candidate site. The weighted tor. Our algorithm instead simulates the opposite case, fuse probability function is given in Eqn. 2, breakdown [2], where a conductor converts into an insulator. 3

A. Solving the Laplace Equation The constants can then be solved for using the boundary conditions: In the first step of DBM, the solution of Laplace equation R1 −1 can be determined by solving a large linear system correspond- c1 = −( − 1) (7) ing to a uniform grid. However, as the grid size increases, the R2 1 1 linear system quickly becomes intractable. Each step of the −1 c2 =( − ) . (8) DBM algorithm increases the size of the aggregate by one, so R2 R1 n n growing an aggregate of size takes timesteps. Given a grid As R2 approaches infinity, this function reduces to: containing G cells, growing an aggregate of size n takes at best 1.5 R1 O(n × G ) time. As G is typically very large, particularly φ =1− (9) in 3D, this running time scales poorly. r It appears that a conjugate gradient solver should be able The R2 →∞case is arguably what DBM is trying to simulate to solve the linear system very efficiently since the shape of in the first place. In nature, we do not often encounter nega- the aggregate changes relatively slowly between timesteps. tive charges surrounded by uniform rings of positive charge. However, as stated before, the charge distribution on the Instead, we assume that the universe is charge conserving, interior of the aggregate changes rapidly in order to enforce and for every negative charge, the universe contains sufficient the φ =0boundary condition along the aggregate surface, positive charge to balance it out. However, these positive causing non-trivial changes in the potential field. There exist charges are only well approximated by a homogeneous ring variants of DBM that try to solve for this charge distribution when they are very far away from the negative point charge. directly, such as [14], but their formulations involve solving a Now that we know the potential induced by a single point dense G × G linear system. charge as shown in Eqn. 9, we can solve for the potential field In contrast, we instead treat the interior as an insulator induced by many insulated point charges by simply summing and no longer require a large regular grid. Therefore, we can their respective fields. For some grid cell of index i, the eliminate the need to solve a large linear system. Conceptually, potential can then be calculated by: we replace the φ =1and φ =0boundary conditions with n   R1 positive and negative point charges. By summing the fields φi = 1 − r (10) induced by these point charges, we can compute the potential j=0 i,j field produced by a collection of insulated point charges. where j is the index of a point charge, ri,j is the distance Formally, this is still a valid solution to the Laplace equation between grid cell i and point charge j, and n is the total because the Laplace equation is linear, and admits superposed number of point charges. By treating the aggregate as an solutions. insulator instead of a conductor, we have now circumvented We must first determine the field induced by one such the most computationally expensive step of DBM. insulated point charge. In order to facilitate later performance comparisons to DBM, we utilize boundary conditions that are analogous to those in DBM. Assume we have an N × N × N B. Algorithm Description grid, where h is the physical length of a grid cell. The initial We will now use Eqn. 10 to design a new fast algorithm case of DBM corresponds to the case where a negatively for simulating Laplacian instability. DBM solves the Laplace R = h charged circle of radius 1 2 is located at the center of equation over a large regular grid because the linear system the grid, and is surrounded by a larger, positively charged ring requires a numerical medium through which far away bound- R = Nh of radius 2 2 . The potential in the space between the ary conditions can be propagated to the candidate sites. Our circle and ring is then defined by the Laplace equation (Eqn. formulation requires no such propagators. While Eqn. 10 may 1). We can solve for φ analytically in this initial case by using appear to be an expensive series to compute, we only need the spherical form of the Laplace equation: to compute it at the candidate sites. Additionally, we observe that there would be a good deal of repeated work between ∂2φ 1 ∂2φ 1 ∂2φ 2 ∂φ ∇2φ(r, θ, β)= + + + =0. successive iterations. Unlike in DBM, the potential field we ∂r2 r2 ∂θ2 2 2 ∂β2 r ∂r r sin θ construct changes very slowly, as the addition of a single point (3) charge does not force a charge redistribution in the rest of the The positive hollow sphere and negative sphere can then be aggregate. In fact, the values of φi from the previous iteration stated as Dirichlet boundary conditions: are already correct, save for one new charge. In order to exploit this coherence, the potential at each candidate site can instead φ(R1,θ,β)=0 (4) be computed as: φ(R2,θ,β)=1. (5) t+1 t R1 φi = φi +(1− ) (11) In this case, the boundary conditions are independent of θ and ri,t+1 β, so we can drop the middle two terms, reducing the PDE to t+1 where φi corresponds to the potential at position i at an Euler equation whose solution is the 3D Green’s function: t timestep t +1, φi is the potential at the same point at the R c previous timestep, and (1 − 1 ) is the potential contributed φ = c + 2 ri,t+1 1 r (6) by the new (t +1)th point charge. 4

k Finally, we observe that in DBM, the value of the potential where Yn (θ, β) is a spherical harmonic basis function and field is constrained to the [0, 1] range. In our formulation, Akn is its corresponding coefficient. The spherical Laplace this constraint no longer holds. However, in order for the η equation is usually solved for as the product of a radial, polar, exponent in Eqn 2 to be effective, this constraint must be and azimuthal function. Eqn. 14 already satisfies the polar enforced. Therefore, prior to growth site selection, we nor- and azimuthal components, but we must choose an appropriate malize the potential values according to the current minimum radial function. Only two radial harmonic functions, r n and −n−1 and maximum potential values, φmin and φmax: r , are capable of satisfying our boundary conditions. Our (Φ )η potential function thus takes the form: p =  i i n η (12) ∞ n j=1(Φj ) n −n−1 k φ(r, θ, β)= (anr + bnr ) AknYn (θ, β). (15) where: n=0 k=−n The coefficients an and bn solve to: φi − φmin Φi = . (13) Rn+1 φmax − φmin a = 2 n R2n+1 − R2n+1 We have now described all the components of the fast growth  2 1  n −1 algorithm. To sum up, the algorithm is initialized as follows: −(n+1) R2 bn = R2 − 2n+1 . 1) Insert a point charge at the origin, R1 2) Locate the candidate sites around the charge. On a In order to incorporate the spherical harmonic solution into square 2D (3D) grid, these would be the eight (twenty- the overall algorithm, we then use Eqn. 15 in place of Eqn. 9. six) neighbors, However, we cannot set R2 = ∞ as we did in the 3) Calculate the potential at each candidate site according homogeneous case. Consider the limit of bn: to Eqn. 10.   Rn −1 An iteration of the algorithm is as follows: −(n+1) 2 lim R2 − 2n+1 =0. R2→∞ R 1) Randomly select a growth site according to Eqn. 12. 1 2) Add a new point charge at the growth site. All bn are forced to zero with the exception of the n =0case: 3) Update the potential at all the candidate sites according   1 1 −1 to Eqn. 11. lim − = −R1. R →∞ R R 4) Add the new candidate sites surrounding the growth site. 2 2 1 5) Calculate the potential at new candidate sites using Eqn. The same holds true for an. Thus, if we try to set R2 = ∞, 10. we obtain the following result:   We note that while Eqn. 10 is the Green’s function for the R φ(r, θ, β)= 1 − 1 A . 3D case, we also use it when growing 2D fractals. The 2D r 00 solution to the Laplace equation requires an impractical charge conservation constraint to be enforced due to the presence of Note that this equation is exactly the same as Eqn. 9, but a logarithm. Details are in Appendix A of the supplemental scaled by the global average of the spherical function, A 00. In- materials. tuitively, this occurs because the outer boundary condition has been pushed out so far that any angular variation is completely suppressed, and only the overall average remains. Therefore, C. Spherical Harmonic Solution in order for angular effects to appear in the simulation, R 2 The algorithm we have described generalizes to arbitrary must be set to some finite value. In our simulations, we set Dirichlet boundary conditions, allowing the incorporation of R2 to twice the expected radius of the final aggregate. spherical functions such as an environment map into the growth conditions. This is accomplished by replacing the outer D. Algorithm Analysis and Comparison sphere of uniform positive charge with a function. The new n boundary conditions can be stated as: Over iterations, the running time of our algorithm is O(n2). For a single iteration, steps 1, 3, and 5 of our algorithm φ(R1,θ,β)=0 require O(n) time, and steps 2 and 4 require O(1) time. n O(n 2) φ(R2,θ,β)=f(θ, β). Therefore, over iterations, the running time is . This is optimal for any exact potential field approach because The function introduces angular dependency, so we must now the contribution of a new point charge must be computed solve the full spherical Laplace equation (Eqn. 3). Methods every iteration. As electric potentials have infinite support, of solving this equation are well-known, and are available in this requires updating O(n) candidate sites. By comparison, any book on partial differential equations. First we replace the running time of DBM is approximately O(n ∗ G1.5), since f(r, θ, β) with its spherical harmonic series conjugate gradient runs in roughly O(G 1.5). Since n<

IV. IMPLEMENTATION AND RESULTS

E. User Parameters We implemented the our algorithm in C++ using the linked list and multimap templates available in STL. We implemented As our fast algorithm still utilizes the η variable, the ability DBM with Incomplete Cholesky Conjugate Gradient as its to generate a final structure of arbitrary dimension is retained. solver. The solver exploits the Intel SSE instruction set, has However, the 2D to 1D transition range of 0 ≤ η ≤ 4 shifts the Laplace equation hard-coded into the calculations, and to approximately 0 ≤ η ≤ 10. It is unclear if the switch from was compiled under ICL 8.0. Compared to the commonly a conductor to an insulator alone is responsible for this shift. available IML++ [16] implementation, our solver performs an The exact mapping of η to the dimensionality of the aggregate average of 7 times faster. The DBM solver was allowed to is still an area of active research in physics, so further study terminate at a generous 4 digits of precision; adding more is necessary to determine the significance of this shift. digits increased running time by roughly a factor of 2 per The algorithm also permits the use of repulsors and attrac- digit. The infinity norm was used instead of the usual 2- tors. The growth can be repulsed from user specified regions norm, as it more accurately characterizes the precision of by inserting extra negative charges into the simulation, and the solution at the candidate sites. DLA requires a point neglecting to add candidate sites around these charges. The location data structure that allows incremental construction growth will then be repulsed from that region of extra charge. and nearest neighbor queries. We used the optimized Delaunay Conversely, positive charge can be inserted into the simulation, triangulation module of CGAL [17] for this purpose. All the and growth will be attracted to this positive charge. These timings were collected on a 3.2 GHz Xeon PC. two parameters can be used to ‘paint’ a desired path for the aggregate. The spherical harmonic version of the algorithm provides an efficient method of representing and simulating a A. Tree Benchmark dense, complex array of distant repulsors and . The tree in Figure 4 was created by running our algorithm The attractors and repulsors are not restricted to point to 1 million particles with η =3. In order to simulate the charges, but can be any geometry that has a closed form effects of the ground and sun, we placed an infinite plane solution to the Laplace equation. Therefore, geometries such as of negative charge under the initial charge. The potential of 1 infinite lines, planes, and cylinders can be used to manipulate this plane was calculated as r , where r is the perpendicular the growth. distance of a point in space to the plane. 6

We mirrored these environmental conditions in DBM by Our algorithm’s lightning simulation corresponds to a 512 3 also placing a negatively charged plate under the initial charge. DBM simulation, but due to resource limitations, we were only A plate of positive charge was also placed along the top edge able to obtain timing data for a 2563 grid DBM simulation. of the simulation grid because DBM requires the presence Running a 5123 grid DBM simulation to 20,000 particles of some positive charge. The grid resolution was set to would require 5.5 GB of memory and several months of 2563 because visual artifacts become unacceptable at lower computation. However, we project that our algorithm would resolutions, and η was set to 1 to match the visual results give a factor of nearly 30, 000 speedup and a memory savings of the tree generated using our algorithm. We mirrored our factor of nearly 400 using the same grid size of 512 3. algorithm’s conditions in DLA by emitting particles from a Figure 7 shows a Tesla coil discharge simulated by our far away plate in the positive y direction. The ground could algorithm. Tesla coils are known for discharging the type of not be simulated because DLA does not admit any notion of electrical streamers that are common in science fiction and a ‘repulsor’. fantasy films. Previous lightning methods [19] can produce Our algorithm generated the 1-million-particle tree in Fig- visually distracting self-intersections when simulating such ure 4. (Please see the supplementary document for a pho- large scale patterns. In contrast, our physically-based algorithm tograph of a real maple tree with similar characteristics as causes the streamers to naturally repulse each other, producing the tree shown here.) Due to the massive running time of a self-avoiding pattern without any user intervention. In order DBM, we had to limit our comparisons to the first 20,000 to suppress grid aliasing artifacts, we jittered each particle particles of the simulation. Our algorithm generated 20,000 inside its grid cell. particles 1,112 times faster than DBM and reduced memory consumption by a factor of 95. Compared to DLA, our C. Terrain Generation algorithm generated 20,000 particles 132 times faster. The Our algorithm can be used to generate heightfields for supplementary appendices also contain a side-by-side visual terrain representation. The lower left image in Figure 5(b) comparison between an image of our tree and a photograph shows a heightfield representation of the SIGGRAPH logo. of a real maple. The fractal used in this scene was generated in less than The pioneering work L-Systems work of Prusinkiewicz, 2 minutes with an η of 7 and an initial boundary charge Lindenmayer, and collaborators [3] has been widely used in configuration designed to constrain the fractal growth to a computer graphics to generate plants. While our algorithm region resembling the SIGGRAPH logo. We sampled the does not approach the performance of L-Systems, we have resulting potential field on a regular grid and used these found that the two can work in tandem to efficiently simulate values to generate the heightfield, which was then rendered in plant growth under complex lighting conditions. The spherical Blender. Please see the supplementary video for a fly-through harmonic version of our algorithm can be implemented as of this terrain. (This animation also appeared in the Electronic an L-System environmental module [18]. In that work, the Theatre at SIGGRAPH 2005.) lighting conditions are taken into account by solving the volume rendering equation on a regular grid. By using our D. 2D Benchmarks spherical harmonic solution in place of this more expensive solver, our algorithm provides a highly efficient, approximate All the 2D forms in Figure 5(b) were computed in under alternative. The result can be seen in Fig. 6, where biased tree 2 minutes. Explicit timing comparisons are difficult because growth adds only a few seconds to the overall running time, they were generated using user parameters that have no clear yet well captures the influence of directional lighting effects analogs in DBM and DLA. Instead, we performed timing on plant growth. comparisons with the canonical configuration (Figure 1(a)) and found that our algorithm is up to 5,748 faster than DBM in B. Lightning Benchmark 2D. Additional 2D timing data is available in Appendix B of The lightning in Figure 5(a) was created by running our the supplemental materials. algorithm to 250,000 particles and setting η =6.3. We again simulated the ground as a plane of infinite charge, but switched E. Rendering the polarity to positive, and placed the initial charge very far For the tree rendering (Fig. 4), the leaves were placed at from the plane. The initial conditions for DBM and DLA were every fifth particle, and the results were rendered as swept set identically to the tree scene because although the specific sphere cubic splines in POV-Ray. The hybrid tree images phenomena being simulated was different, the basic notion of were rendered in Blender using L-Systems derived from the a branching object growing towards a faraway plane remained environmentally-sensitive systems [18]. The lightning scene the same. was modeled in POV-Ray, and the lightning was rendered Again, due to the massive running time of DBM, we limited using the method described by Kim and Lin [10]. The Tesla our comparison to the first 20,000 particles. Our algorithm coil scene was composed and rendered in Blender, with generated the first 20,000 particles 651 times faster than postprocessing applied using the same method. The 2D fractal DBM, and 77 times faster than DLA (Figure 3(a)). While forms in Figure 5(b) were rendered by calculating Eqn. 10 the performance gain over DBM may appear inferior to that at every pixel, and then colored according to the method witnessed in the tree scene, it should be noted that we ran described by Mandelbrot and Evertsz [20]. The colormaps DBM at half the resolution of our algorithm. were taken from the popular program. 7

F. Discussion and Limitations National Science Foundation, Office of Naval Research, and The memory requirements of our algorithm at runtime are RDECOM. less stringent than those of DBM. Memory consumption for DBM is constant because it must allocate all the memory REFERENCES it will use over the lifetime of the simulation at the very [1] L. Niemeyer, L. Pietronero, and H. J. Wiesmann, “ of beginning. This requirement quickly becomes intractable, as a dielectric breakdown,” Physical Review Letters, vol. 52, pp. 1033Ð1036, 10243 1984. DBM simulation would require over 44 GB of RAM, a [2] B. K. Chakrabarti and L. G. Benguigui, Statistical physics of fracture size that is beyond most commodity hardware. By comparison, and breakdown in disordered systems. Oxford University Press, 1997. our algorithm allocates memory incrementally during the [3] P. Prusinkiewicz and A. Lindenmayer, The Algorithmic Beauty of Plants. Springer Verlag, 1990. simulation and uses orders of magnitude less overall. [4] B. Mandelbrot, The Fractal Geometry of Nature. W H Freeman, 1982. From Table I, it may appear that 2D DLA is faster than the [5] D. Ebert, F. Musgrave, D. Peachey, K. Perlin, and S. Worley, Texturing 2D version of our algorithm; but in practice, we have found and Modeling: A Procedural Approach. AP Professional, 1998. [6] T. Witten and L. Sander, “Diffusion-limited aggregation, a kinetic critical that 2D DLA only excels at generating structures of precisely phenomenon,” Physical Review Letters, vol. 47, no. 19, pp. pp. 1400Ð dimension 1.71D using the canonical configuration (Figure 1). 1403, 1981. Our algorithm appears to outperforms DLA in all other cases. [7] M. Hastings and L. Levitov, “Laplacian growth as one-dimensional turbulence,” Physica D, vol. 116, pp. 244Ð252, 1998. See Appendix B for more details. [8] T. Kim, M. Henson, and M. Lin, “A hybrid algorithm for modeling ice formation,” Proc. of ACM SIGGRAPH / Eurographics Symposium on V. C ONCLUSIONS AND FUTURE WORK Computer Animcation, 2004. [9] B. Desbenoit, E. Galin, and S. Akkouche, “Simulating and modeling We have presented a fast, simple algorithm for simulating lichen growth,” Proc. of Eurographics 2004, 2004. Laplacian instability. Our algorithm is mathematically similar [10] T. Kim and M. Lin, “Physically based modeling and rendering of lightning,” Proc. of Pacific Graphics 2004, 2004. to previous methods, but is near optimal in both space and [11] T. Vicsek, Fractal Growth Phenomena. World Scientific, 1992. time. We hope that this algorithm will make the simulation of [12] M. Eden, “A two dimensional growth process,” in Proceedings of the many large-scale Laplacian growth phenomena practical. This Fourth Berkeley Symposium on Mathematical Statistics and Probability, 1961. method is suitable for simulating several natural phenomena, [13] M. Hastings, “Fractal to nonfractal phase transition in the dielectric such as snowflakes, lightning, fracture, lichen, coral, riverbeds, breakdown model,” Physical Review Letters, vol. 87, no. 17, 2001. η vasculature, and urban sprawl patterns. Therefore, the ripest [14] C. Amitrano, “Fractal dimensionality of the model,” Physical Review A, vol. 39, pp. 6618Ð6620, 1989. avenues for future work are rigorous investigations of the [15] K. Moriarty, J. Machta, and R. Greenlaw, “Parallel algorithm and physical and mathematical connections between our algorithm dynamic exponent for diffusion-limited aggregation,” Physical Review and these seemingly disparate phenomena. E, vol. 55, no. 5, pp. 6211Ð6218, 1997. [16] J. Dongarra, A. Lumsdaine, R. Pozo, and K. Remington, “A sparse Although we artificially constrained our simulation to a matrix library in c++ for high performance architectures,” in Proceedings virtual square grid, nothing prevents us from generating can- of the Second Object Oriented Numerics Conference, 1992, pp. 214Ð218. didate sites at arbitrary neighbor locations. As such, we could [17] A. Fabri, G.-J. Giezeman, L. Kettner, S. Schirra, and S. Sch¬onherr, “The cgal kernel: A basis for geometric computation,” in Proc. 1st ACM introduce anisotropies into the simulation that were previously Workshop on Appl. Comput. Geom., vol. 1148, 1996, pp. 191Ð202. impossible due to non-physical grid tiling constraints. [18] R. Mech and P. Prusinkiewicz, “Visual models of plants interacting with Finally, the Green’s function for the Laplace equation is their environment,” in SIGGRAPH ’96: Proceedings of the 12th annual conference on Computer graphics and interactive techniques, 1996, pp. known to exist in arbitrarily high dimensions. For any dimen- 397Ð410. sion D>2, the function is: [19] T. Reed and B. Wyvill, “Visual simulation of lightning,” Proc. of SIGGRAPH, 1993. b [20] B. Mandelbrot and C. Evertsz, “The potential distribution around grow- φ = a + rD−2 ing fractal clusters,” Nature, vol. 348, pp. L143ÐL145, 1990. where r is the 2-norm of the difference between two vectors for length D, and a and b are constants. Using our algorithm, we can use these formulæ to construct ‘hyperfractals’ of arbitrarily high dimension. While it is unclear how to interpret these higher-dimensional fractals, they present an interesting avenue for further investigation. Theodore Kim Theodore Kim received his M.S. (2003) and Ph.D. (2006) in Computer Science from ACKNOWLEDGEMENTS the University of North Carolina at Chapel Hill The authors would like to thank Gilles Tran under Ming Lin, and a B.S. (2001) in Computer Sci- ence from Cornell University. His thesis dealt with (http://www.oyonale.com/) for making his POV-Ray scenes physically-based simulation and rendering of solid- available online. Figures 5(a) and 4 are derived from his work ification. He is currently a post-doctoral researcher and used under Creative Commons license 1.0. The lightprobe at UNC, and is investigating efficient, physics-based simulation of various natural phenomena. in Fig. 6 was created using HDRI data courtesy of Industry Graphics (www.realtexture.com) from the LightWorks HDRI Starter Collection (www.lightworkdesign.com). This work was supported in part by Army Research Office, Defense Advanced Research Projects Agency, Intel Corporation, 8

Jason Sewall Jason is currently a graduate stu- dent of Professor Ming Lin at the University of North Carolina at Chapel Hill researching topics from physically based modelling and graphics. He received a Batchelor of Arts in Mathematics and a Batchelor of Science in Computer Science from the University of Maine in 2004.

Avneesh Sud Avneesh Sud is a final year PhD student at Dept of Computer Science at University of North Carolina at Chapel Hill, under the advisory of Prof. Dinesh Manocha. He received his B.Tech (2000) in Computer Science and Engineering from Indian Institute of Technology, Delhi, and his MS (2003) in Computer Science from the University of North Carolina at Chapel Hill. His research inter- ests include geometric and solid modeling, collision detection and proximity queries, effective utilization of commodity graphics hardware to solve geometric problems and interactive rendering of large models.

Ming Lin Ming C. Lin received her B.S., M.S., Ph.D. degrees in Electrical Engineering and Com- puter Science in 1988, 1991, 1993 respectively from the University of California, Berkeley. She is cur- rently a full professor in the Department of Com- puter Science at the University of North Carolina (UNC), Chapel Hill. Prior to joining UNC, she was an assistant professor of the Computer Science Department at both Naval Postgraduate School and North Carolina A&T State University, and a Program Manager at the U.S. Army Research Office. 9

Fig. 4. A tree generated with one million particles using only our algorithm, 1112 times faster than DBM and 132 times faster than DLA.

Fig. 5. a) Lightning generated with a 250,000 particle aggregate. Our algorithm is at least 3 orders of magnitude faster than existing methods and consumes at least 2 orders of magnitude less memory. b) 2D Fractal forms generated with our algorithm. The SIGGRAPH logo is a frame from a short animation featured in the SIGGRAPH 2005 Electronic Theater. 10

Fig. 6. A tree demonstrating bias toward a light source (in the upper right), automatically generated with our method incorporated into “environmentally- sensitive” L-Systems. Inset: a tree grown with the same L-System, without environmental bias.

Fig. 7. A Tesla coil discharging, generated with 500,000 particles with our algorithm. The physical foundation of our algorithm makes the simulated lightning streams repulse each other naturally, producing a self-avoiding pattern without any user intervention.