1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139
|
# Copyright (c) 1997-2024
# Ewgenij Gawrilow, Michael Joswig, and the polymake team
# Technische Universität Berlin, Germany
# https://polymake.org
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2, or (at your option) any
# later version: http://www.gnu.org/licenses/gpl.txt.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#-------------------------------------------------------------------------------
# @topic application
# This is the historically first application, and the largest one.
#
# It deals with convex pointed polyhedra. It allows to define a polyhedron either as a convex hull of a point set, an intersection of
# halfspaces, or as an incidence matrix without any embedding. Then you can ask for a plenty of its (especially combinatorial)
# properties, construct new polyhedra by modifying it, or study the behavior of the objective functions.
#
# There is a wide range of visualization methods for polyhedra, even for dimensions > 4 and purely combinatorial descriptions,
# including interfaces to interactive geometry viewers (such as [[wiki:external_software#JavaView|JavaView]] or [[wiki:external_software#geomview|geomview]]), generating
# PostScript drawings and povray scene files.
IMPORT graph
USE topaz group ideal
HELP help.rules
# A polyhedral cone, not necessarily pointed.
# Note that in contrast to the vertices of a polytope, the [[RAYS]] are given in affine coordinates.
# @tparam Scalar numeric data type used for the coordinates, must be an ordered field. Default is [[Rational]].
declare object Cone<Scalar=Rational> [ is_ordered_field(Scalar) ];
# Not necessarily bounded convex polyhedron, i.e., the feasible region of a linear program.
# Nonetheless, the name "Polytope" is used for two reasons: Firstly, as far as the combinatorics
# is concerned we always deal with polytopes; see the description of [[VERTICES_IN_FACETS]] for details.
# Note that a pointed polyhedron is projectively equivalent to a polytope.
# The second reason is historical.
# We use homogeneous coordinates, which is why Polytope is derived from [[Cone]].
# @example To construct a polytope as the convex hull of three points in the plane use
# > $p=new Polytope(POINTS=>[[1,0,0],[1,1,0],[1,0,1]]);
# > print $p->N_FACETS
# | 3
# Note that homogeneous coordinates are used throughout.
#
# @example Many standard constructions are available directly. For instance, to get a regular 120-cell (which is 4-dimensional) use:
# > $c=regular_120_cell();
# > print $c->VOLUME;
# | 1575+705r5
# This is the exact volume 1575+705*\sqrt{5}.
# polymake has limited support for polytopes with non-rational coordinates.
declare object Polytope<Scalar=Rational> [ is_ordered_field(Scalar) ] : Cone<Scalar>;
# these rules are intrinsic: they don't depend on any external software to be installed separately
INCLUDE
cone_properties.rules
polytope_properties.rules
lp_properties.rules
initial.rules
cone_common.rules
incidence_perm.rules
common.rules
lp.rules
to.rules
unbounded_polyhedron.rules
rational.rules
float.rules
flag_vector.rules
lattice.rules
milp_properties.rules
to_milp.rules
vector_configuration.rules
point_configuration.rules
polarize.rules
visual.rules
stl.rules
schlegel.rules
visual_graph.rules
gale.rules
steiner.rules
voronoi.rules
tight_span.rules
propagated_polytope.rules
edge_orientable.rules
visual_point_configuration.rules
action.rules
group.rules
coxeter.rules
quotient_space.rules
symmetrized_cocircuit_equations.rules
universal_polytope.rules
arbitrary_coords.rules
representations.rules
orbit_polytope.rules
orbit_polytope_helpers.rules
orbit_polytope_visual.rules
wronski.rules
slack_ideal.rules
# self-configuring rules
INCLUDE
postscript.rules
common::geomview.rules
mptopcom.rules
topcom.rules
azove.rules
plantri.rules
# @category Convex hull computation
# Use the //double description// method as implemented in [[wiki:external_software#cddlib]].
# It is the default algorithm for computation of facets from points or dually.
# It operates with arbitrary precision arithmetic ([[wiki:external_software#GMP]]).
label cdd
# @category Convex hull computation
# Use the //reverse search// method, as implemented in [[wiki:external_software#lrslib]].
label lrs
# @category Convex hull computation
# Use the convex hull code implemented in [[wiki:external_software#ppl]].
label ppl
prefer *.convex_hull ppl, cdd, lrs, beneath_beyond
prefer *.simplex cdd, lrs, to
# Local Variables:
# mode: perl
# cperl-indent-level: 3
# indent-tabs-mode:nil
# End:
|