Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Decompose a graphics 3D primitive into polygons when possible
ResourceFunction["PrimitiveToPolygons"][pr] decomposes the graphics 3D primitive pr into polygons when possible. |
Convert a Parallelepiped primitive to polygons:
In[1]:= |
![]() |
Out[1]= |
![]() |
Display the polygons as tubes:
In[2]:= |
![]() |
Out[2]= |
![]() |
Using VertexTextureCoordinates:
In[3]:= |
![]() |
Out[3]= |
![]() |
Number of polygons:
In[4]:= |
![]() |
Out[4]= |
![]() |
A tetrahedron with edge length 2:
In[5]:= |
![]() |
Out[5]= |
![]() |
Using VertexColors:
In[6]:= |
![]() |
Out[6]= |
![]() |
A pyramid:
In[7]:= |
![]() |
Out[7]= |
![]() |
A simplex in dimension 3 with texture:
In[8]:= |
![]() |
Out[8]= |
![]() |
Using Polyhedron:
In[9]:= |
![]() |
Out[9]= |
![]() |
Scale and rotate polygons:
In[10]:= |
![]() |
Out[10]= |
![]() |
The resource functions PerforatePolygons and OutlinePolygons internally use PrimitiveToPolygons:
In[11]:= |
![]() |
Out[11]= |
![]() |
In[12]:= |
![]() |
Out[12]= |
![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License