Function Repository Resource:

RandomMondrian

Source Notebook

Generate random Mondrian patterns

Contributed by: Aster Ctor

ResourceFunction["RandomMondrian"][]

generates a random Mondrian pattern.

Details and Options

The following are the default appearance settings:
AspectRatio0.618
ImageSizeLarge
EdgeThicknessThickness[1 / 150]
EdgeColorBlack

Examples

Basic Examples (1) 

Generate a random Mondrian pattern:

In[1]:=
ResourceFunction["RandomMondrian"][]
Out[1]=

Applications (7) 

MaxIterations (2) 

MaxIterations controls the complexity of the pattern:

In[2]:=
ResourceFunction["RandomMondrian"][MaxIterations -> 5]
Out[2]=

More iterations means more complex graphics:

In[3]:=
ResourceFunction["RandomMondrian"][MaxIterations -> 9]
Out[3]=

Grids (3) 

Control the number of horizontal grids:

In[4]:=
ResourceFunction["RandomMondrian"]["Grids" -> 10, MaxIterations -> 9]
Out[4]=

The number of vertical grids is converted from AspectRatio:

In[5]:=
ResourceFunction["RandomMondrian"]["Grids" -> 10, MaxIterations -> 9, AspectRatio -> 1]
Out[5]=

Increase this value to control the upper limit of complexity:

In[6]:=
ResourceFunction["RandomMondrian"]["Grids" -> 20, MaxIterations -> 9]
Out[6]=

ColorMap (2) 

Get a different set of color schemes:

In[7]:=
colors = {#, RandomInteger[{1, 10}]} & /@ ColorData[100, "ColorList"]
Out[7]=

Try the final result of this color scheme:

In[8]:=
ResourceFunction["RandomMondrian"]["ColorMap" -> colors]
Out[8]=

Publisher

Aster Ctor (MoeNet)

Version History

  • 1.0.0 – 14 October 2019

Related Resources

License Information