Function Repository Resource:

PolyPainting

Source Notebook

Create a low polygon style painting

Contributed by: Aster Ctor

ResourceFunction["PolyPainting"][img]

turns img into a low polygon style painting.

ResourceFunction["PolyPainting"][img,c]

turns img into a painting using the value c to control complexity.

ResourceFunction["PolyPainting"][img,{accuracy,distortion,mesh}]

turns img into a painting using {accuracy,distortion,mesh} to control complexity.

Details and Options

The default complexity value is 1000.

Examples

Basic Examples (2) 

Load a sample image:

In[1]:=
img = ImageResize[ExampleData[{"TestImage", "Mandrill"}], 256]
Out[1]=

Get low polygon style paintings:

In[2]:=
ResourceFunction["PolyPainting"]@img
Out[2]=

Scope (3) 

Load a sample image:

In[3]:=
img = ImageResize[ExampleData[{"TestImage", "Mandrill"}], 256]
Out[3]=

The default complexity is 1000. Low complexity looks more abstract:

In[4]:=
ResourceFunction["PolyPainting"][img, 100]
Out[4]=

Higher complexity looks more detailed:

In[5]:=
ResourceFunction["PolyPainting"][img, 10000]
Out[5]=

Applications (2) 

Load a sample image:

In[6]:=
img = ImageResize[ExampleData[{"TestImage", "Mandrill"}], 256]
Out[6]=

Use accuracy to control paintings:

In[7]:=
ResourceFunction["PolyPainting"][img, {100}]
Out[7]=

Properties and Relations (1) 

Note that the result is a Graphics instead of an Image:

In[8]:=
Head@ResourceFunction["PolyPainting"]@
  ExampleData[{"TestImage", "Mandrill"}]
Out[8]=

Publisher

Aster Ctor (MoeNet)

Version History

  • 1.0.0 – 08 October 2019

License Information