#### 10.2.5 ConvertToObjN

• ConvertToObjN( <facet list>, <vertices>, <facets> )
• Description: that function converts the <facet list> to the obj format, more precisely the two last arguments must be variables. The variable <vertices> gets in output the vertices list (without duplicates) where each vertex is followed by its normal unit vector (that vector is the average of the vectors normal to the facets sharing the vertex). The variable <facets> gets the facet list (delimited by the constant jump) not with the vertices coordinates, but its order of appearance in the vertices list. The function returns a complex $a+ib$ where $a$ is the vertices number and $b$ the faces number. That command is used in the obj and geom exports.

Warning: for a great number of facets (thousand or more), that command takes a certain time !

• Exemple(s): executing the command:
ConvertToObjN(Tetra(Origin,2*vecI,3*vecJ,vecK),S,F)

returns the value 4+4*i, that means $4$ vertices and $4$ facets. The variable $S$ contains in output the list:

[0, 0, -0.57735026918962-0.57735026918962*i, -0.57735026918962,
3*i, 0, -0.87287156094397 +0.43643578047198*i, -0.21821789023599,
2, 0, 0.50709255283711 -0.84515425472851*i, -0.1690308509457,
0, 1, -0.45584230583855 -0.56980288229819*i, 0.68376345875782]
,

and the variable $F$ contains in output the list: [1, 2, 3, jump, 1, 3, 4, jump, 3, 2, 4, jump, 1, 4, 2, jump].