Subject: CGAL users discussion list
List archive
- From: liudaisuda <>
- To:
- Subject: [cgal-discuss] Dual power cell of a vertex in Regular Triangulation
- Date: Sun, 5 May 2013 05:48:57 -0700 (PDT)
I hope this is not a dumb question to ask. I am trying to compute for each
vertex in a regular triangulation its dual power cell which I am thinking
could be represented as a set of segments (for example
Segment(ray->source(),ray->point(100)) ). For unbouded power cells, I will
simply cut the rays into long segments. This is how I did it.
//collect segments of the power cell of a finite vertex
Vertex_handle vi;
std::vector<Point_2> segments;
Edge_circulator ecirc = RT::incident_edges(vi);
Edge_circulator eend = ecirc;
CGAL_For_all(ecirc, eend)
{
if (!RT::is_infinite(ecirc))
{
CGAL::Object obj = RT::dual(ecirc);
Segment s;
Ray r;
Line l;
if(CGAL::assign(s,obj)){
const Segment *segment =
CGAL::object_cast<Segment> (&obj) ;
if(segment->is_degenerate())
segments.push_back(*segment);
} else if(CGAL::assign(r,obj)) {
const Ray *ray =
CGAL::object_cast<Ray> (&obj);
Segment segment =
Segment(ray->source(),ray->point(100));
if(!segment.is_degenerate())
segments.push_back(segment);
}else if(CGAL::assign(l,obj)) {
//do nothing with line
}
}
Well, I am not sure I did the right thing. What do you guys think?
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Dual-power-cell-of-a-vertex-in-Regular-Triangulation-tp4657357.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Dual power cell of a vertex in Regular Triangulation, liudaisuda, 05/05/2013
- [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, liudaisuda, 05/05/2013
- Re: [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, 杨成林, 05/05/2013
- [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, liudaisuda, 05/05/2013
- [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, liudaisuda, 05/05/2013
- Re: [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, rong tian, 05/06/2013
- Re: [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, 杨成林, 05/06/2013
- Re: [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, Haibo Chen, 05/06/2013
- Re: [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, 杨成林, 05/06/2013
- [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, liudaisuda, 05/06/2013
- Re: [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, Haibo Chen, 05/06/2013
- Re: [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, 杨成林, 05/06/2013
- Re: [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, Haibo Chen, 05/06/2013
- Re: [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, 杨成林, 05/05/2013
- [cgal-discuss] Re: Dual power cell of a vertex in Regular Triangulation, liudaisuda, 05/05/2013
Archive powered by MHonArc 2.6.18.