Create a Mesh Region from Image Data
Using an image as input, create a mosaic or "stained glass" representation by repeated use of VoronoiMesh.
In[1]:= | ![]() X |
Find the edges of the image.
In[2]:= | ![]() X |
Out[2]= | ![]() |
Create a Voronoi mesh from the edge positions.
In[3]:= | ![]() X |
In[4]:= | ![]() X |
Out[4]= | ![]() |
Recursively apply VoronoiMesh to the mean vertex positions of the precursive Voronoi cells to create a more uniform mesh.
In[5]:= | ![]() X |
Out[5]= | ![]() |
Color each polygon with the image color coinciding with its mean vertex positions.
In[6]:= | ![]() X |
Out[6]= | ![]() |