Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get lattice points in a variety of arrangements
ResourceFunction["LatticePointsArrangement"][arrangement,n] generates the first n lattice points based on arrangement. | |
ResourceFunction["LatticePointsArrangement"][] returns all the possible arrangements. |
























Create 20 points in a counter clock wise spiral starting in the eastern direction:
| In[1]:= |
| Out[1]= |
Create some points based on zigzagging diagonally in the first two quadrants:
| In[2]:= |
Visualize the points:
| In[3]:= |
| Out[3]= | ![]() |
LatticePointsArrangement without any arguments returns all the possible arrangements:
| In[4]:= |
| Out[4]= | ![]() |
Currently 160 arrangements are known:
| In[5]:= |
| Out[5]= |
Create the Ulam prime spiral:
| In[6]:= |
| Out[7]= | ![]() |
Recreate the OEIS A316667 sequence of a horse moving on a spirally numbered board and moving to the lowest available unvisited square at each step:
| In[8]:= |
| In[9]:= | ![]() |
| In[10]:= | ![]() |
| In[11]:= | ![]() |
| In[12]:= | ![]() |
| Out[13]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License