Subject: CGAL users discussion list
List archive
[cgal-discuss] Re: Constructing Nef polyhedra from polygons with points at infinity
Chronological Thread
- From: erickee <>
- To:
- Subject: [cgal-discuss] Re: Constructing Nef polyhedra from polygons with points at infinity
- Date: Thu, 26 Jan 2012 09:24:37 -0800 (PST)
I can construct nef polyhedra by converting my polygons to half-spaces and
performing complements and intersections. Unfortunately this is awkward.
For example, if a section of my polygonal boundary is concave, I must find
the section and treat it separately. (Imagine defining something like a
crescent shape as a union of half-spaces.)
The various constructors for nef polyhedra build the very structure that I
already have: a polygonal boundary with some points at infinity. Points on
the polygon are converted from type Homogenous to Extended_homogeneous (line
460, Nef_polyhedron_2.h). So, it seems like I should be able to construct
my polygon from Homogeneous points, and pass it to the polygon-based
constructor for Nef_polyhedron_2.
I have constructed my polygons and passed them to Nef_polyhedron_2, but
something doesn't work. For example, I can convert a polygon of standard
homogeneous points into a Nef_polyhedron_2:
Homogeneous points on a finite square: (0,0,1); (1,0,1); (1,1,1);
(0,1,1)
Give a Nef_polyhedron_2 with three faces. The last face is the "marked"
face:
Edge 1: (0,0,1) ---> (1,0,1)
Edge 2: (1,0,1) ---> (1,1,1)
Edge 3: (1,1,1) ---> (0,1,1)
Edge 4: (0,1,1) ---> (0,0,1)
(code example A, below)
But it appears that I can't convert an infinite square into a
Nef_polyhedron_2:
Homogeneous points around the first quadrant: (0,0,1); (1,0,0); (1,1,0);
(0,1,0)
Give a Nef_polyhedron_2 with *two* faces. There is no "marked" face. The
second face is:
Edge: (-1,1,0) ---> (-1,-1,0)
Edge: (-1,-1,0) ---> (1,-1,0)
Edge: (1,-1,0) ---> (1,0,0)
Edge: (1,0,0) ---> (0,0,1)
Edge: (0,0,1) ---> (1,0,0)
Edge: (1,0,0) ---> (1,1,0)
Edge: (1,1,0) ---> (-1,1,0)
(code example B, below)
The problem is that Nef_polyhedron_2 only accepts standard points---even
homogeneous points are required to represent standard points. I need to
pass non-standard points (points at infinity) and pass them into
Nef_polyhedron_2 somehow. Is there a way? Do I need to write a new
constructor?
Code example A
typedef CGAL::Filtered_extended_homogeneous<int> Extended_kernel;
typedef CGAL::Nef_polyhedron_2<Extended_kernel> Nef_polyhedron;
typedef Nef_polyhedron::Point Point;
Point r1[4] = { Point(0,0,1), Point(1,0,1), Point(1,1,1), Point(0,1,1) };
std::list<std::pair<Point*,Point*> > polylines;
polylines.push_back(std::make_pair(r1+0, r1+4));
Nef_polyhedron RST(polylines.begin(), polylines.end(),
Nef_polyhedron::POLYGONS);
Code example B
// Same as example A, except this line changes:
Point r1[4] = { Point(0,0,1), Point(1,0,0), Point(1,1,0), Point(0,1,0) };
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Constructing-Nef-polyhedra-from-polygons-with-points-at-infinity-tp4327351p4331068.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Constructing Nef polyhedra from polygons with points at infinity, erickee, 01/25/2012
- Re: [cgal-discuss] Constructing Nef polyhedra from polygons with points at infinity, Sebastien Loriot (GeometryFactory), 01/26/2012
- [cgal-discuss] Re: Constructing Nef polyhedra from polygons with points at infinity, erickee, 01/26/2012
- [cgal-discuss] Re: Constructing Nef polyhedra from polygons with points at infinity, erickee, 01/26/2012
- Re: [cgal-discuss] Re: Constructing Nef polyhedra from polygons with points at infinity, Sebastien Loriot (GeometryFactory), 01/27/2012
- [cgal-discuss] Re: Constructing Nef polyhedra from polygons with points at infinity, erickee, 01/27/2012
- Re: [cgal-discuss] Re: Constructing Nef polyhedra from polygons with points at infinity, Sebastien Loriot (GeometryFactory), 01/27/2012
- [cgal-discuss] Re: Constructing Nef polyhedra from polygons with points at infinity, erickee, 01/26/2012
- [cgal-discuss] Re: Constructing Nef polyhedra from polygons with points at infinity, erickee, 01/26/2012
- Re: [cgal-discuss] Constructing Nef polyhedra from polygons with points at infinity, Sebastien Loriot (GeometryFactory), 01/26/2012
Archive powered by MHonArc 2.6.16.