Skip to content

Make outer normal fans readily available #27993

@sagetrac-nailuj

Description

@sagetrac-nailuj

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.

CC: @jplab

Component: geometry

Keywords: NormalFan, polytope, days100

Author: Julian Ritter

Branch/Commit: 440689c

Reviewer: Jean-Philippe Labbé, Frédéric Chapoton

Issue created by migration from https://trac.sagemath.org/ticket/27993

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions