Page 1 of 1

Construct a polyhedral fan?

Posted: 27 Nov 2013, 21:21
by Drew
I'm sorry if this is a newbie question, but I can't find helpful documentation for application fan.

I tried:

Code: Select all

fan > $p = new PolyhedralFan(INPUT_RAYS => [[1,0],[1,3]], INPUT_CONES=>[[0,1]]); fan > print $p->F_VECTOR; 2 fan > print $p->CONES; <{0} {1} >
I had hoped that the output would be more like

1 2 1

and

# Dimension 1
0
1
#Dimension 2
0 1

respectively. What am I doing wrong?

Re: Construct a polyhedral fan?

Posted: 28 Nov 2013, 10:57
by assarf
Hi there,

no need apologizing for asking a question :-)

The output is indeed not right. One should expect the following:

Code: Select all

fan > $p = new PolyhedralFan(INPUT_RAYS => [[1,0],[1,3]], INPUT_CONES=>[[0,1]]); fan > print $p->F_VECTOR; 2 1 fan > print $p->CONES; <{0} {1} > <{0,1} >
Since the apex is the only 0-dim thing in a fan f_0 will always be 1. So this is omitted from the output to reduce redundancies. Meaning you don't get the 1 at the beginning.

Your fan is kind of "special" since it is basically just one cone with its faces. Meaning there is only one maximal cone. So the last component should be shown but isn't. So thank you for finding this bug. We're gonna look into it, and hopefully this will be fixed in the next (beta) release.

BUT when you take a fan, with more than one maximal cone, then the output should be as one would expect. Example:

Code: Select all

fan > $p = new PolyhedralFan(INPUT_RAYS => [[1,0,0],[1,1,0],[1,0,1],[1,1,1]], INPUT_CONES=>[[0,1,2],[1,2,3]]); fan > print $p->F_VECTOR; 4 5 2 fan > print $p->CONES; <{0} {1} {2} {3} > <{0 1} {0 2} {1 2} {1 3} {2 3} > <{0 1 2} {1 2 3} >

Re: Construct a polyhedral fan?

Posted: 28 Nov 2013, 18:59
by assarf
This bug has been fixed in the newest perpetual beta version. click

EDIT: if you downloaded the beta yesterday, please update your working copy with an svn up, since there where some difficulties.

Re: Construct a polyhedral fan?

Posted: 02 Dec 2013, 19:40
by Drew
Thank you for the response and bugfix!

In fact I don't think I need to construct a fan with one cone, but I was trying to understand the simplest possible case to make sure I was doing it right.