#  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: overlaid_drawing,v 1.5 2004/12/10 18:52:39 gawrilow Exp $

#  This script illustrates the following concepts:
#
#  - passing arguments via @ARGV:
#    > polymake overlaid_drawing
#    > polymake --script overlaid_drawing 10
#  - constructing objects from the scratch with explicit property values
#  - overriding decoration attributes in visualization methods
#  - composing a picture of several objects
#  - calling preference labels as user functions

application 'tropical';

my $thickness=@ARGV ? $ARGV[0] : 20;

sub draw {
   visualize(map { $_->VISUAL(VertexStyle=>"thickness $thickness") } @_);
}

my $tr1=TropicalPolytope( VERTICES => [ "0 1 0", "0 0 1", "0 -1 -1" ] );
my $tr2=TropicalPolytope( VERTICES => [ "0 2 2", "0 -2 0", "0 0 -2" ] );
postscript;
draw($tr2, $tr1);


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