How to define range of plot?

Questions and problems about using polymake go here.
EFR
Posts: 1
Joined: 10 May 2022, 21:59

How to define range of plot?

Postby EFR » 13 May 2022, 22:01

Hi all!

I'm trying to make a visualization of the intersection of a 3D-fan with the hyperplane \( \{z=1\} \). I have made the following code:

Code: Select all

application('fan'); $p = new Polytope<Rational>(POINTS=>[[1,2,0,1],[1,1,1,0],[1,0,2,1],[1,1,0,0],[1,0,1,0],[1,0,0,2]]); $f = normal_fan<Rational>($p); $H = new Polytope<Rational>(POINTS=>[[1,-1,-1,1],[1,1,-1,1],[1,-1,1,1],[1,1,1,1]]); compose($f->VISUAL,$H->VISUAL);
However, the range of the plot of the fan is too small, so it doesn't intersect the hyperplane in the visualization. How do I define the range of the plot of a fan?

hnagel
Posts: 1
Joined: 28 Mar 2019, 14:44

Re: How to define range of plot?

Postby hnagel » 15 Jun 2022, 17:33

Hi EFR,

you can change the size of your plotted fan with the Transformation option:

Code: Select all

application('fan'); $p = new Polytope<Rational>(POINTS=>[[1,2,0,1],[1,1,1,0],[1,0,2,1],[1,1,0,0],[1,0,1,0],[1,0,0,2]]); $f = normal_fan<Rational>($p); # same Hyperplane as yours but a little bigger and bounded by $bf $H = new Polytope<Rational>(EQUATIONS=>[[-1,0,0,1]], INEQUALITIES=>[[1,0,0,0]]); $bf = cube(3,2,-2)->FACETS; $factor = 2; $trafo = diag(new Vector<Float>([$factor,$factor,$factor])); compose($f->VISUAL(Transformation=>$trafo), $H->VISUAL(BoundingFacets=>$bf));
I hope this still helps.


Return to “Helpdesk”

cron