Page 1 of 1

union of cones

Posted: 08 May 2024, 04:11
by misha
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!

Re: union of cones

Posted: 08 May 2024, 09:47
by joswig
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