Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a polygon from a list of midpoints
ResourceFunction["ReverseMidpointPolygon"][mid] returns a polygon or polyline with given midpoints mid. |
Find the vertices of a reverse midpoint polygon (rvp) for a given list of midpoints:
| In[1]:= | ![]() |
| Out[2]= |
Check that the midpoints of rvp match the given list of midpoints:
| In[3]:= |
| Out[3]= |
Show both:
| In[4]:= |
| Out[4]= | ![]() |
Repeat a few more times:
| In[5]:= | ![]() |
| Out[5]= | ![]() |
For a square, find one of the many reverse midpoint polygons:
| In[6]:= |
| Out[7]= |
Show it:
| In[8]:= |
| Out[8]= | ![]() |
Try a skew quadrilateral:
| In[9]:= |
| Out[10]= |
One of many possible polylines is returned with the given midpoints. For any solution, the ends of the polyline are separated by a vector four times the magnitude of the vector between diagonal midpoints:
| In[11]:= | ![]() |
| Out[11]= | ![]() |
Find one of the many solutions for the regular hexagon:
| In[12]:= | ![]() |
| Out[12]= | ![]() |
Find one of many polylines with a given set of six midpoints:
| In[13]:= | ![]() |
| Out[14]= |
Check that the polyline ends have 6 times the separation of the even and odd centroids:
| In[15]:= |
| Out[15]= |
Show the polyline with the displacement between the even and odd centroids:
| In[16]:= | ![]() |
| Out[16]= | ![]() |
Find a Varignon-balanced extension for a pentagon:
| In[17]:= |
| Out[17]= |
| In[18]:= |
| Out[18]= |
Find the ReverseMidpointPolygon:
| In[19]:= |
| Out[20]= |
Show it:
| In[21]:= |
| Out[21]= | ![]() |
If an even number of points is even slightly unbalanced, a polyline is returned instead:
| In[22]:= |
| Out[23]= |
Find a polygon with midpoints on an octagon:
| In[24]:= | ![]() |
| Out[25]= |
Check that the polyline ends have 8 times the separation of the even and odd centroids:
| In[26]:= |
| Out[26]= |
Show the polyline with the displacement between the even and odd centroids:
| In[27]:= | ![]() |
| Out[27]= | ![]() |
Wolfram Language 14.0 (January 2024) or above
This work is licensed under a Creative Commons Attribution 4.0 International License