/* See {Sphere3.h} */ #include /* Last edited on 2007-02-03 13:49:18 by stolfi */ #define Sphere3_C_COPYRIGHT \ "Copyright © 2000,2007 Universidade Estadual de Campinas (UNICAMP)" #include #include #include #include #include #include #include #include #include Place_t MakeSphere3(uint order) { EightPlaces_t a = MakeTetraTopo(order,order); (void)Glue(Spin(a.p[1]),a.p[0],order,TRUE); (void)Glue(Spin(a.p[3]),a.p[2],order,TRUE); /* Return a place not killed by the Glue Procedure: */ return a.p[1]; } Place_t MakeSphere3_H1(uint order) { EightPlaces_t a = MakeTetraTopo(order,order); (void)Glue(Spin(a.p[5]),a.p[4],order,TRUE); (void)Glue(Spin(a.p[7]),a.p[6],order,TRUE); /* Return a place not killed by the Glue Procedure: */ return a.p[5]; } Place_t MakeSphere3_H2(uint order) { EightPlaces_t a = MakeTetraTopo(order,order); (void)Glue(Spin(a.p[1]),a.p[0],order,TRUE); (void)Glue(Spin(a.p[7]),a.p[6],order,TRUE); /* Return a place not killed by the Glue Procedure: */ return a.p[1]; } Place_t MakeSphere3_H3(uint order) { EightPlaces_t a = MakeTetraTopo(order,order); (void)Glue(Spin(a.p[5]),a.p[4],order,TRUE); (void)Glue(Spin(a.p[3]),a.p[2],order,TRUE); /* Return a place not kill by the Glue Procedure: */ return a.p[5]; } Place_t MakeSphere1Sub(uint order) { EightPlaces_t a = MakeTetraTopo(order,order); EmphasizeTetrahedron(a.p[0], a.p[3], order); Glue(Spin(a.p[1]),a.p[0],order,TRUE); Glue(Spin(a.p[3]),a.p[2],order,TRUE); /* Return a place not killed by the Glue Procedure */ return a.p[1]; } #define Sphere3_C_author \ "Modula-3 version of procedures by L. A. P. Lozada, 1999-2000.\n" \ "Modification history:\n" \ " 2007-01-27 C version created by J. Stolfi.\n" \ " 2007-01-31 Brought {MakeSphere3}, {MakeSphere3_H1}, {MakeSphere3_H2}\n" \ " and {MakeSphere3_H3} from {MakeComplex.c}.\n" \ " 2007-02-01 Brought {MakeSphere1Sub} from {MakeManifold.c}."