Fast Multipole Representation of Diffusion Curves and Points Timothy Sun * Papoj Thamjaroenporn * Changxi Zheng Columbia University (a) (b) (b) (e) (e) (f) (f) (c) (c) (d) (d) Figure 1: Starry Night: Starting with two diffusion curve images (a) and (b), the moon in (b) is cloned into (a), producing (c). Diffusion points are added to simulatestars (d) and an aurora (e). For the reflection on the lake (f), the hue is shifted towards green. Finally, (e) and (f) are composited with a mask to produce the final image on the right. Note that the reflection is darker away from the horizon. All these editing operations were performed on the fast multipole representation. Abstract We propose a new algorithm for random-access evaluation of diffu- sion curve images (DCIs) using the fast multipole method. Unlike all previous methods, our algorithm achieves real-time performance for rasterization and texture-mapping DCIs of up to millions of curves. After precomputation, computing the color at a single pixel takes nearly constant time. We also incorporate Gaussian radial basis functions into our fast multipole representation using the fast Gauss transform. The fast multipole representation is not only a data structure for fast color evaluation, but also a framework for vector graphics analogues of bitmap editing operations. We exhibit this capability by devising new tools for fast diffusion curve Poisson cloning and composition with masks. CR Categories: I.3.3 [Computer Graphics]: Picture/Image Gener- ation, Graphics Utilities—Display Algorithms Keywords: diffusion curves, vector graphics, fast multipole method, fast Gauss transform, image editing Links: DL PDF W EB V IDEO ∗ joint first authors 1 Introduction Diffusion curves [Orzan et al. 2008] are powerful vector graphics primitives for creating smoothly shaded images. Roughly, user- defined colors along a set of control curves are diffused across the en- tire image plane. This model is compact and resolution-independent like traditional vector graphics models, and its increasing popular- ity has motivated recent work on improving its runtime evaluation performance [Pang et al. 2012; Jeschke et al. 2009; Ilbery et al. 2013], extending its expressiveness [Bezerra et al. 2010; Finch et al. 2011], shading volumetric objects [Takayama et al. 2010], and tex- turing [Sun et al. 2012]. One trend for rasterizing diffusion curve images makes use of bound- ary element methods (BEMs), which start by precomputing color derivatives along the control curves. Current BEM-based algo- rithms [Sun et al. 2012; Ilbery et al. 2013] accelerate color eval- uation by introducing adaptive schemes or evaluating several points at once, but none are able to render images in real time. In this paper, we propose a different BEM method, the fast multipole representation (FMR), for rendering DCIs. The FMR stores a lattice on the image plane, and for any point located in a cell, its color is de- scribed by a precomputed asymptotic expansion at the cell’s center and a boundary integral of a few nearby curves. This representation produces a continuous color distribution nearly identical to the orig- inal DCI. In contrast to previous methods, our color evaluation per pixel has nearly constant complexity after precomputation except in rare cases where many curves meet at a point. Furthermore, using the fast Gauss transform [Greengard and Strain 1991], the FMR can also represent Gaussian radial basis functions, which we call diffusion points in this context. We use diffusion points for adding simple effects (Figure 1) to DCIs that are ineffi- cient to achieve with just diffusion curves. Unlike DCIs, evaluating an image composed of diffusion points requires no boundary inte- gral, and thus each pixel can be rendered in constant time.