Opened 2 years ago

Last modified 5 weeks ago

#25122 needs_work enhancement

Construct RationalPolyhedralFan from possibly overlapping cones

Reported by: yzh Owned by:
Priority: major Milestone: sage-9.2
Component: geometry Keywords: RationalPolyhedralFan, cone arrangement, IMA-PolyGeom
Cc: novoselt, vbraun, moritz, jipilab, mkoeppe Merged in:
Authors: Yuan Zhou Reviewers:
Report Upstream: N/A Work issues:
Branch: u/yzh/construct_rationalpolyhedralfan_from_possibly_overlapping_cones (Commits) Commit: 4371ee7f1702396985c648a059902bd4c5e45b48
Dependencies: Stopgaps:

Description (last modified by yzh)

Given a cone arrangement where the cones are not necessarily face-to-face, construct a rational polyhedral fan that is a subdivision of the cone arrangement. This could be useful for topological computations with non-convex unions of polyhedral sets.

In the following example, the intersection of the cones c1 and c2 is not a face of each. Thus, they do not belong to the same rational polyhedral fan. By using the allow_arrangement=True option in the Fan constructor, we construct a fan so that c1 and c2 are unions of cones in the fan. There is no guarantee that it will be "the" coarsest subdivision, though.

sage: c1 = Cone([(-2,-1,1), (-2,1,1), (2,1,1), (2,-1,1)])
sage: c2 = Cone([(-1,-2,1), (-1,2,1), (1,2,1), (1,-2,1)])
sage: Fan([c1,c2])
Traceback (most recent call last):
...
ValueError: these cones cannot belong to the same fan!
...
sage: fan = Fan([c1, c2], allow_arrangement=True)
sage: fan.ngenerating_cones()
5
sage: fan.plot()
Graphics3d Object

Change History (10)

comment:1 Changed 2 years ago by novoselt

What the result should be? The coarsest subdivision? And in what situations is it necessary?

comment:2 Changed 2 years ago by yzh

  • Cc novoselt vbraun moritz jipilab mkoeppe added
  • Description modified (diff)
  • Keywords RationalPolyhedralFan cone arrangement IMA-PolyGeom added

comment:3 Changed 2 years ago by yzh

  • Branch set to u/yzh/construct_rationalpolyhedralfan_from_possibly_overlapping_cones

comment:4 Changed 2 years ago by yzh

  • Commit set to 984ba246406648168236b7a9173a1ce5cb81291c
  • Status changed from new to needs_review

New commits:

984ba24implement allow_arrangement option in Fan constructor

comment:5 Changed 2 years ago by moritz

Please put your name as an author, yzh

comment:6 Changed 2 years ago by yzh

  • Authors set to Yuan Zhou

comment:7 Changed 2 years ago by mkoeppe

allow_arrangement is misspelled once in the documentation

comment:8 Changed 2 years ago by git

  • Commit changed from 984ba246406648168236b7a9173a1ce5cb81291c to 4371ee7f1702396985c648a059902bd4c5e45b48

Branch pushed to git repo; I updated commit sha1. New commits:

4371ee7fix a typo in documentation

comment:9 Changed 2 months ago by mkoeppe

  • Milestone changed from sage-8.2 to sage-9.2

Moving some tickets to 9.2. This is not a promise that I will be working on them.

comment:10 Changed 5 weeks ago by mkoeppe

  • Status changed from needs_review to needs_work
**********************************************************************
File "src/sage/geometry/fan.py", line 510, in sage.geometry.fan.?
Failed example:
    for cone in fan.generating_cones(): print(cone.rays())
Expected:
    N(1, 0),
    N(2, 1)
    in 2-d lattice N
    N(1, 2),
    N(2, 1)
    in 2-d lattice N
    N(1, 2),
    N(0, 1)
    in 2-d lattice N
    N(-1, -2)
    in 2-d lattice N
Got:
    N(2, 1),
    N(1, 0)
    in 2-d lattice N
    N(1, 2),
    N(2, 1)
    in 2-d lattice N
    N(1, 2),
    N(0, 1)
    in 2-d lattice N
    N(-1, -2)
    in 2-d lattice N
**********************************************************************

This doctest should be rewritten so it does not depend on the unspecified orders of cones in the fan and rays in the cones.

Note: See TracTickets for help on using tickets.