Simulating Decorative Mosaics Alejo Hausner University of Toronto
Simulating Decorative Mosaics2 Mosaic Tile Simulation Reproduce mosaic tiles –long-lasting (graphics is ephemeral) –realism with very few pixels –pixels have orientation
Simulating Decorative Mosaics3 Real Tile Mosaics
Simulating Decorative Mosaics4 Real Mosaics II
Simulating Decorative Mosaics5 The Problem Square tiles cover the plane perfectly Variable orientation --> loose packing Opposing goals: –non-uniform grid –dense packing
Simulating Decorative Mosaics6 Previous Work Romans: algorithm? Relaxation (Haeberli90) –scatter points on image –voronoi region = tile –tiles not square
Simulating Decorative Mosaics7 Previous Work Escherization (Kaplan00) –regular tilings –use symmetry groups Stippling (Deussen01) –voronoi relaxation –round dots
Simulating Decorative Mosaics8 Voronoi Diagrams What are they –sites, and regions closest to each site How to compute them? –Divide & conquer (PS) –sweepline (Fortune) –incremental
Simulating Decorative Mosaics9 Voronoi Diagram
Simulating Decorative Mosaics10 Centroidal Voronoi Diagrams VD sites are not centroids Lloyds method (k-means) –move site to centroid, –recalculate VD –repeat
Simulating Decorative Mosaics11 Centroidal Voronoi Diagrams VD sites are not centroids Lloyds method (k-means) –move site to centroid, –recalculate VD –repeat
Simulating Decorative Mosaics12 Centroidal Voronoi Diagrams VD sites are not centroids Lloyds method (k-means) –move site to centroid, –recalculate VD –repeat
Simulating Decorative Mosaics13 Centroidal Voronoi Diagram
Simulating Decorative Mosaics14 CVD uses Nature: –honeycombs –giraffe spots Sampling –approximates Poisson-disk (low discrepancy) –can bias for filter function
Simulating Decorative Mosaics15 Hardware-assisted VDs SG99: Hoff et al –uses graphics hardware –draw cone at each site –orthogonal view from above –each region is single-coloured –can extend to non-point sites (curves) project
Simulating Decorative Mosaics16 Key idea Cone is distance function –radius = height Non-euclidean distance: –different kind of cone –eg square pyramid –can be non-isotropic (rotate pyramid around Z) r h h=|x-a|+|y-b| (a,b) (x,y) h
Simulating Decorative Mosaics17 Basic Tiling Algorithm Compute orientation field (details later) scatter points on image –use pyramids to get oriented tiles apply Lloyds method to spread sites evenly draw oriented tile at each site
Simulating Decorative Mosaics18 Details Lloyds method: –To compute centroid of each Voronoi region: 1: read back pixels, 2: get average (row,col) per colour 3: convert back to object coords.
Simulating Decorative Mosaics19 Lloyd Near Convergence
Simulating Decorative Mosaics20 Orientation Field Choose edges that need emphasis compute generalized VD for edges (Hoff99) get gradient vector of distance field –distance = z-buffer distance gradient orientation = tile orientation –points away from edges
Simulating Decorative Mosaics21 Orientation Field
Simulating Decorative Mosaics22 Edge Discrimination Must line up tiles on edges But both sides of edge oriented same –square tiles ==> 180 o rotational symmetry Use hardware –draw edge thick, different colour –voronoi regions move away from edges –leaves gap where edge is.
Simulating Decorative Mosaics23 Tiles Straddle Edge
Simulating Decorative Mosaics24 Thick Edge: Centroid Repelled
Simulating Decorative Mosaics25 After 10 Iterations
Simulating Decorative Mosaics26 Original Voronoi Diagram
Simulating Decorative Mosaics27 After 20 Iterations
Simulating Decorative Mosaics28 One Tile per Voronoi Region
Simulating Decorative Mosaics29 Thinner Tiles
Simulating Decorative Mosaics30 Round Tiles
Simulating Decorative Mosaics31 Rhomboidal Tiles
Simulating Decorative Mosaics32 Tiles are not Pixels 4000 pixels 4000 tiles
Simulating Decorative Mosaics33 More Pictures
Simulating Decorative Mosaics34 Painterly Rendering Tile = Paint stroke
Simulating Decorative Mosaics35 Summary New method for packing squares on curvilinear grid Minimizes sum of particle distances
Simulating Decorative Mosaics36 Further Work Reduce grout –final pass: adjust tile shapes currently dont use adjacency info –use divergence of orientation field · Improve colour –real tiles have fixed colour set: Dither? How?