#  Copyright (c) 1997-2004
#  Ewgenij Gawrilow, Michael Joswig (Technische Universitaet Berlin, Germany)
#  http://www.math.tu-berlin.de/polymake,  mailto:polymake@math.tu-berlin.de
#
#  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.
#-----------------------------------------------------------------------------
#  $Project: polymake $$Id: gale.rules,v 1.40 2004/11/12 13:38:35 gawrilow Exp $

object Polytope;

# category: Basic properties
# Coordinates of the Gale transform.
#
property GALE_TRANSFORM
$type="matrix";


# category: Visualization
# Coordinates of points for an affine Gale diagram.
#
property GALE_VERTICES
$type="matrix";
$temporary=1;


GALE_TRANSFORM : VERTICES
PRECONDITION: BOUNDED
   $this->BOUNDED
BODY:
   client("gale_transform", $this);

GALE_VERTICES : GALE_TRANSFORM
   client("gale_vertices", $this);

use VisualGale;


# category: Visualization
# Generate the Gale diagram of a `d`-polyhedron with at most `d+4` vertices.
# return: Visual::Gale

user_method GALE (%Visual::Gale::decorations) {
   my ($this, $decor)=@_;
   visualize( new Visual::Gale(
      Name => $this->name,
      VertexLabels => $this->lookup("VERTEX_LABELS"),
      Polytope => $this,
      $decor
   ));
}


# Local Variables:
# mode: perl
# c-basic-offset:3
# End:
