union of cones

Questions and problems about using polymake go here.
misha
Posts: 5
Joined: 21 Apr 2024, 21:41

union of cones

Postby misha » 08 May 2024, 04:11

Does "union_of_cones" take $array of cones as input? On the webpage illustrating it, one only construct a union of two cones which can be written down explicitly. However, if I want to write a function that produces an array of many cones, and I want to take the union of all of them, how would that be done?

Thank you!

User avatar
joswig
Main Author
Posts: 288
Joined: 24 Dec 2010, 11:10

Re: union of cones

Postby joswig » 08 May 2024, 09:47

Here is a simple example (not mathematically interesting):

Code: Select all

polytope > @list_of_cones = (); for (my $i=0; $i<5; ++$i) { my $C = new Cone(INPUT_RAYS=>[[1,0],[1,$i]]); push @list_of_cones, $C; } polytope > $u = fan::union_of_cones(\@list_of_cones); polytope > print $u->F_VECTOR; 5 4


Return to “Helpdesk”