1 /* Copyright (c) 1997-2021
2 Ewgenij Gawrilow, Michael Joswig, and the polymake team
3 Technische Universität Berlin, Germany
4 https://polymake.org
5
6 This program is free software; you can redistribute it and/or modify it
7 under the terms of the GNU General Public License as published by the
8 Free Software Foundation; either version 2, or (at your option) any
9 later version: http://www.gnu.org/licenses/gpl.txt.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 --------------------------------------------------------------------------------
16 */
17
18 #include "polymake/client.h"
19 #include "polymake/topaz/connected_sum.h"
20 #include "polymake/topaz/complex_tools.h"
21
22 namespace polymake { namespace topaz {
23
klein_bottle()24 BigObject klein_bottle()
25 {
26 const Array<Set<Int>> PJP = real_projective_plane_facets();
27 const std::list<Set<Int>> C = connected_sum(PJP,PJP);
28 BigObject p("SimplicialComplex",
29 "FACETS", C,
30 "DIM", 2,
31 "MANIFOLD", true,
32 "CLOSED_PSEUDO_MANIFOLD", true,
33 "ORIENTED_PSEUDO_MANIFOLD", false);
34 p.set_description() << "The Klein bottle.\n";
35 return p;
36 }
37
38 UserFunction4perl("# @category Producing from scratch\n"
39 "# The Klein bottle.\n"
40 "# @return SimplicialComplex",
41 &klein_bottle, "klein_bottle()");
42
43 } }
44
45 // Local Variables:
46 // mode:C++
47 // c-basic-offset:3
48 // indent-tabs-mode:nil
49 // End:
50