############################################### ## Discrete Geometry II ## Tutorial 06 ## Name: ## ## Remarks: ## You should save the script somewhere, ## where you can find it. Everytime you ## save the file you should reload it into ## polymake via: ## script("/path/to/your/script"); ## After that you have access to all the ## functions inside this script in polymake ## ## The first time you use a variable you ## have to "initialize" it with the keyword ## "my". Like: my $i = 3; ## Check: ## http://polymake.org/doku.php/scripting/start ############################################### use application 'polytope'; ############################################### ############################################### # code for exercise T3 # @param polytope P # @return Float volume sub volume($) { my $p = shift; #your code here. $p is the input polytope #Hint: orthogonalize_subspace() is a usefull function, # that orthogonalize the affine part of the row vectors. print $p; } ############################################### ###############################################