# Copyright (c) 1997-2007 # 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: povray.rules 7578 2007-01-21 22:48:26Z gawrilow $ CONFIGURE : common:: package Povray::Viewer; global_method povray.graph: draw(Visual::Graph, @) { my ($self, $Graph)=@_; my $nodes=$Graph->get_number_nodes; my @edges=$Graph->get_all_edges; my @parameters = ( name => $Graph->Name, points => $Graph->Coord, pointSet_dim => Modules::common::dim($Graph->Coord), lines => \@edges, lineSet_arrow_flag => ($Graph->Directed ? "show" : "hide"), vertex_thicknesses($Graph, $nodes, "NodeStyle"), vertex_colors($Graph, $nodes, "NodeColor"), colors($Graph, $Graph->edges, "EdgeColor", $Visual::Color::edges, "line"), thicknesses($Graph, $Graph->edges, "EdgeStyle", 1, "line"), visible($Graph), bounding_box($Graph,$Graph->Coord) ); $self->append(new Povray::wire(@parameters)); } # Local Variables: # mode: perl # c-basic-offset:3 # End: