#8169: include TOPCOM
----------------------------+-----------------------------------------------
   Reporter:  vbraun        |       Owner:  AlexGhitza  
       Type:  enhancement   |      Status:  needs_work  
   Priority:  major         |   Milestone:  sage-feature
  Component:  geometry      |    Keywords:              
     Author:  Volker Braun  |    Upstream:  N/A         
   Reviewer:                |      Merged:              
Work_issues:                |  
----------------------------+-----------------------------------------------
Changes (by vbraun):

  * status:  needs_info => needs_work


Old description:

> TOPCOM is a C++ program for triangulating polyhedra. More generally, it
> can find a single triangulation as well as enumerate all triangulations
> of a "point configuration", that is, the convex hull of points in
> euclidean space such that all vertices of simplices of the triangulation
> are in the given (finite) list of points.
>
> One problem with the upstream distribution is that it statically links
> many helper programs, yielding almost 200mb of binaries. Therefore, I
> suggest the following:
>
>  - dynamically link TOPCOM via libtools to reduce size
>  - Write a sage<->TOPCOM interface at sage.geometry.triangulation.py
>
> As an initial submission, my libtoolized TOPCOM spkg is here:
>
> http://www.stp.dias.ie/~vbraun/TOPCOM-0.16.2.spkg
>
> and a first draft of triangulation.py is attached. The basic usage is
>
> {{{
> sage: points = PointConfiguration([[0,0],[0,1],[1,0],[1,1],[-1,-1]]);
> sage: points
> A point configuration in QQ^2 consisting of 5 points.
> sage: triang = points.triangulate()   # find one triangulation
> sage: triang
> A triangulation in QQ^2 consisting of 4 simplices.
> sage: triang.plot(axes=False)
> }}}
>
> After we confirm that the libtoolized TOPCOM builds on all sage
> platforms, I'll contact upstream for eventual inclusion of the autotools
> sources.
>
> Note: see #8115 for a modified cddlib (required by TOPCOM) that provides
> a non-static cddlib library.

New description:

 TOPCOM is a C++ program for triangulating polyhedra. More generally, it
 can find a single triangulation as well as enumerate all triangulations of
 a "point configuration", that is, the convex hull of points in euclidean
 space such that all vertices of simplices of the triangulation are in the
 given (finite) list of points.

 One problem with the upstream distribution is that it statically links
 many helper programs, yielding almost 200mb of binaries. Therefore, I
 suggest the following:

  - dynamically link TOPCOM via libtools to reduce size
  - Write a sage<->TOPCOM interface at sage.geometry.triangulation.py

 As an initial submission, my libtoolized TOPCOM spkg is here:

 http://www.stp.dias.ie/~vbraun/TOPCOM-0.16.2.p2.spkg

 and a first draft of triangulation.py is attached. The basic usage is

 {{{
 sage: points = PointConfiguration([[0,0],[0,1],[1,0],[1,1],[-1,-1]]);
 sage: points
 A point configuration in QQ^2 consisting of 5 points. The
 triangulations of this point configuration are assumed to
 be connected, not necessarily fine, not necessarily regular.
 sage: triang = points.triangulate()   # find one triangulation
 sage: triang
 (<0,1,2>, <0,1,4>, <0,2,4>, <1,2,3>)
 sage: triang[0]
 (0, 1, 2)
 sage: list( points.triangulations() )
 [(<0,1,2>, <0,1,4>, <0,2,4>, <1,2,3>),
  (<0,1,3>, <0,1,4>, <0,2,3>, <0,2,4>),
  (<1,2,3>, <1,2,4>),
  (<1,3,4>, <2,3,4>)]
 sage: triang.plot(axes=False)
 }}}

 After we confirm that the libtoolized TOPCOM builds on all sage platforms,
 I'll contact upstream for eventual inclusion of the autotools sources.

 Note: see #8115 for a modified cddlib (required by TOPCOM) that provides a
 non-static cddlib library.

--

Comment:

 I've dealt with 3. and 4. in comment 15, and 6. in comment 16. Now
 generally tuples instead of lists are returned, and a new `class Point` is
 added which has methods for affine, projective, or reduced (with
 linearities removed) coordinates. This should also fix Marshall's
 problems.

 Now `PointConfiguration`/`Triangulation` have a Parent/Element
 relationship. In particular, the `PointConfiguration` is unique and
 immutable. The `restrict_to_...` interface for restricting the admissible
 triangulations has been slightly changed, and now returns a '''new'''
 `PointConfiguration`. I think that also fits better with the general Sage
 philosophy.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8169#comment:26>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to