-
-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #27993: Make outer normal fans readily available
For a polytope `P`, both `NormalFan(P)` and `P.normal_fan()` return the inner normal fan having the inner facet normals as rays. The outer normal fan, using the outer facet normals, is well-known, but not as easy to find in Sage. As an example, create the polytope on p.193 of Ziegler's "Lectures on Polytopes" with its normal fan: {{{ sage: V=[(-8,-4),(-8,6),(-4,-8),(0,-9),(0,6),(4,-8)] sage: P=Polyhedron(V) sage: NormalFan(P) }}} The result is the inner normal fan of `P`, which is the outer normal fan of `-P`. This ticket adds to `Polyhedron.normal_fan` an argument `direction` set to either `'inner'` or `'outer'` to determine which of the directions to use. The default will stay `'inner'` in order to match the default of `NormalFan`. The description of `NormalFan` is extended by a hint to use `NormalFan(-P)` for the outer normal fan. Additionally, this ticket adds in `sage.geometry.polyhedron.representation` a method `Inequality.outer_normal`. This allows to obtain the outer normal vector without having to think about the appropriate sign of `Inequality.A()` whenever dealing with the facet inequalities of a polyhedron. URL: https://trac.sagemath.org/27993 Reported by: nailuj Ticket author(s): Julian Ritter Reviewer(s): Jean-Philippe Labbé, Frédéric Chapoton
- Loading branch information
Showing
3 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters