#### 10.2.4 ConvertToObj

• ConvertToObj( <facet list>, <vertices>, <facets> )
• Description: that functions converts the <facet list> into the format obj, more precisely the two last arguments have to be variables. the variable <vertices> gets in output the vertices list (without repetitions) and the variable <facets> gets the facet list (separated by the jump constant) not with the vertices coordinates but the 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, geom and jvx exports.

Warning: for a great number of facets (thousand or more), that command takes a certain time ($2$ to $3\phantom{\rule{0.3em}{0ex}}$mn for about $20\phantom{\rule{0.3em}{0ex}}000$ facets)!

• The command MakePoly is the inverse operation.
• Exemple(s): executing ConvertToObj(Tetra(Origin, 2*vecI, 3*vecJ, vecK), S, F) returns the value 4+4*i, which means $4$ vertices and $4$ facets. The variable $S$ contains as output the list: [0,0,3*i,0,2,0,0,1], and the variable $F$ contains the list: [1,2,3,jump,1,3,4,jump,3,2,4,jump,1,4,2,jump].