Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Return the lines passing through three or more points, given a set of points
ResourceFunction["FindExtraordinaryLines"][pts] returns indices for sets of three or more points in pts lying on the same line. |
Here are 11 points that make 15 lines of three points each:
In[1]:= | ![]() |
Out[2]= | ![]() |
A graphic showing the points and lines:
In[3]:= | ![]() |
Out[3]= | ![]() |
Find all the lines of 3 or more points in a 3×3×3 lattice:
In[4]:= | ![]() |
Out[5]= | ![]() |
In[6]:= | ![]() |
Out[6]= | ![]() |
Here is a set of 20 lattice points where all lines are ordinary:
In[7]:= | ![]() |
Out[8]= | ![]() |
In[9]:= | ![]() |
Out[9]= | ![]() |
Most sets of 20 points from this lattice will have many extraordinary lines:
In[10]:= | ![]() |
Out[10]= | ![]() |
In[11]:= | ![]() |
Out[11]= | ![]() |
Find lines going through powers of a complex solution for x3=x+1:
In[12]:= | ![]() |
Out[12]= | ![]() |
In[13]:= | ![]() |
Out[13]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License