Top
Back: containsRelatively
Forward: convexIntersection
FastBack:
FastForward:
Up: gfan_lib
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.13.2.14 convexHull

Procedure from library gfan.lib (see gfan_lib).

Usage:
convexHull(c1,c2); c1 cone, c2 cone
convexHull(c1,p1); c1 cone, p1 polytope
convexHull(p1,c1); p1 cone, c1 polytope
convexHull(p1,p2); p1 polytope, p2 polytope

Return:
cone resp polytope, the convex hull of its two input objects

Example:
 
LIB "gfan.lib";
intmat M1[2][2]=
1,0,
0,1;
cone c1=coneViaPoints(M1);
intmat M2[2][2]=
1,1,
1,-1;
cone c2=coneViaPoints(M2);
intmat M3[2][2]=
1,0,
0,-1;
cone c3=coneViaPoints(M3);
cone c12=convexHull(c1,c2);
c12;
==> AMBIENT_DIM
==> 2
==> FACETS
==> 1,0,
==> 1,1
==> LINEAR_SPAN
==> 
==> 
print(rays(c12));
==> 1,-1,
==> 0, 1
cone c23=convexHull(c2,c3);
c23;
==> AMBIENT_DIM
==> 2
==> FACETS
==> 1,-1,
==> 1, 0
==> LINEAR_SPAN
==> 
==> 
print(rays(c23));
==> 0,-1,
==> 1, 1
cone c13=convexHull(c1,c3);
c13;
==> AMBIENT_DIM
==> 2
==> FACETS
==> 1,0
==> LINEAR_SPAN
==> 
==> 
print(rays(c13));
==> 1,0


Top Back: containsRelatively Forward: convexIntersection FastBack: FastForward: Up: gfan_lib Top: Singular Manual Contents: Table of Contents Index: Index About: About this document
            User manual for Singular version 4.3.1, 2022, generated by texi2html.