Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Represent a spherical polygon
ResourceFunction["SphericalPolygon"][{p1,…,pn}] represents a filled spherical polygon with points pi on a sphere centered at the origin. | |
ResourceFunction["SphericalPolygon"][c,{p1,…,pn}] represents a filled spherical polygon on a sphere centered at the point c. |
A spherical triangle:
| In[1]:= |
|
Show the spherical triangle:
| In[2]:= |
|
| Out[2]= |
|
A spherical rectangle:
| In[3]:= |
|
Show the spherical rectangle:
| In[4]:= |
|
| Out[4]= |
|
A spherical polygon with a specified sphere center:
| In[5]:= |
|
Show the polygon on a sphere:
| In[6]:= |
|
| Out[6]= |
|
Use directives to specify the face colors:
| In[7]:= |
|
| Out[7]= |
|
| In[8]:= |
|
| Out[8]= |
|
Specify the style of the edges:
| In[9]:= |
|
| Out[9]= |
|
Specify face and edge styling:
| In[10]:= |
|
| Out[10]= |
|
Show the edges of the spherical polygon:
| In[11]:= |
|
| Out[11]= |
|
Consecutive vertices of SphericalPolygon cannot be antipodal points:
| In[13]:= |
|
| Out[13]= |
|
SphericalPolygon does not directly support spherical digons:
| In[14]:= |
|
| Out[14]= |
|
To render a spherical digon, add the midpoints of the edges:
| In[15]:= |
|
| Out[15]= |
|
SphericalPolygon is best used for convex spherical polygons. Concave polygons might display artifacts:
| In[16]:= |
|
| Out[16]= |
|
Split the concave spherical polygon into two spherical triangles:
| In[17]:= |
|
| Out[17]= |
|
Random triangulation of a sphere:
| In[18]:= |
|
| In[19]:= |
|
| Out[19]= |
|
Use SphericalPolygon to depict a soccer ball:
| In[20]:= |
|
| In[21]:= |
|
| Out[21]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License