Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate random zonogons
ResourceFunction["RandomZonogon"][n] gives a random zonogon with n sides where n should be even. | |
ResourceFunction["RandomZonogon"][{n,m}] gives a random zonogon with between n and m sides. | |
ResourceFunction["RandomZonogon"][n,{min, max}] gives a random zonogon with n sides and side lengths beteen min and max. | |
ResourceFunction["RandomZonogon"][n,{min, max},{n1,n2,n3,…}] gives an n1⨯n2⨯n3⨯… array of random zonogons. |
Create a random zonogon with 6 sides:
In[1]:= |
Out[1]= |
Visualize it:
In[2]:= |
Out[2]= |
Create an 8-sided zonogon with side lengths between 4 and 10:
In[3]:= |
Out[3]= |
Create a 2⨯4 array of random zonogons with number of sides between 4 and 20 with side lengths between 0 and 1:
In[4]:= |
Out[4]= |
Create a random parallelogram:
In[5]:= |
Out[5]= |
Create a random rhombus:
In[6]:= |
Out[6]= |
If n (or m) are odd, the function will stay unevaluated:
In[7]:= |
Out[7]= |
In[8]:= |
Out[8]= |
With a negative side lengths the polygon is generally not convex:
In[9]:= |
Out[9]= |
Make a scribbly tornado:
In[10]:= |
Out[10]= |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License