VertexFaceMap

VertexFaceMap[gr, v, f, n]
builds an map function of the Graphics3D object it fills up the vertex (v) face (f) and face normal (n) map.
  • The function parse all polygon of the Graphics3D object and extracts the vertex coordinates and stores in v symbol. The polygon definition are converted to vertex index definition and stored in the f symbol. Finally the function calculates the surface normals of the faces and stores it in the n symbol.
  • v[All], f[All], n[All] returns the list of indexes of the vertex face and face normal map.
  • v[i_Integer], f[i_Integer], n[i_Integer] returns the value of the ith vertex, face and face normal respectively.
  • Face normal is calculated using the right hand side enumeration of the vertexes, which traditionally specifies the outer side of the face.
  • Cylinder and Cone primitives are converted to polygon approximation before the mapping is calculated.
  • The following options can be given:
AccuracyGoalAutomaticAccuracyGoal is an option for various numerical operations which specifies how many effective digits of accuracy should be sought in the final result.
Load LinkageDesigner
In[1]:=
Click for copyable input
Load a polyhedron
In[2]:=
Click for copyable input
Out[2]=
Calculate the map function and assign it to v,f,n symbols
In[3]:=
Click for copyable input
Out[3]=
List all vertices
In[4]:=
Click for copyable input
Out[4]=
List all faces
In[5]:=
Click for copyable input
Out[5]=
List all normals
In[6]:=
Click for copyable input
Out[6]=
Annotate the polygon. Display the vertex index in the status area while the face index as a tooltip
In[7]:=
Click for copyable input
Out[7]=
Calculate vertex face map of a cone and display the approximated geometry
In[8]:=
Click for copyable input
Out[8]=