140 vector<Z2i::Point> res;
144 StrictPredicate predicate( functor );
150 andrewConvexHullAlgorithm( pointSet.
begin(), pointSet.
end(), back_inserter( res ), predicate );
157 Z2i::Point antipodalP, antipodalQ, antipodalS;
162 trace.info() <<
" ConvexHull HV thickness: " << th << std::endl;
168 board.
drawCircle( antipodalS[0], antipodalS[1], 0.2) ;
170 board.
drawCircle(antipodalP[0], antipodalP[1], 0.2);
171 board.
drawCircle(antipodalQ[0], antipodalQ[1], 0.2);
172 board.
drawLine(antipodalP[0], antipodalP[1], antipodalQ[0], antipodalQ[1]);
175 board.
saveSVG(
"ConvexHullCCW.svg" );
176#ifdef DGTAL_WITH_CAIRO
182 vector<Z2i::Point> res;
186 LargePredicate predicate( functor );
192 andrewConvexHullAlgorithm( pointSet.
begin(), pointSet.
end(), back_inserter( res ), predicate );
197 board.
saveSVG(
"ConvexHullCCWWithPointsOnEdges.svg" );
198#ifdef DGTAL_WITH_CAIRO
205 vector<Z2i::Point> res;
209 StrictPredicate predicate( functor );
215 andrewConvexHullAlgorithm( pointSet.
begin(), pointSet.
end(), back_inserter( res ), predicate );
220 board.
saveSVG(
"ConvexHullCW.svg" );
221#ifdef DGTAL_WITH_CAIRO
227 vector<Z2i::Point> res;
231 StrictPredicate predicate( functor );
234 grahamConvexHullAlgorithm( pointSet.
begin(), pointSet.
end(), back_inserter( res ), predicate );
240 board.
saveSVG(
"ConvexHullCCWbis.svg" );
241#ifdef DGTAL_WITH_CAIRO
247 vector<Z2i::Point> polygonalLine;
258 vector<Z2i::Point> resGraham, res;
261 StrictPredicate predicate( functor );
262 closedGrahamScanFromAnyPoint( polygonalLine.begin(), polygonalLine.end(), back_inserter( resGraham ), predicate );
266 for (std::vector<Z2i::Point>::const_iterator
267 it = polygonalLine.begin(),
268 itEnd = polygonalLine.end();
274 melkmanConvexHullAlgorithm( polygonalLine.begin(), polygonalLine.end(), back_inserter( res ), functor );
279 drawPolygon( polygonalLine.begin(), polygonalLine.end(), board,
true );
280 board.
saveSVG(
"SimplePolygonalLine.svg" );
281#ifdef DGTAL_WITH_CAIRO
285 drawPolygon( resGraham.begin(), resGraham.end(), board );
286 board.
saveSVG(
"SimplePolygonalLineGraham.svg" );
287#ifdef DGTAL_WITH_CAIRO
292 board.
saveSVG(
"SimplePolygonalLineMelkman.svg" );
293#ifdef DGTAL_WITH_CAIRO
298 board.
saveSVG(
"SimplePolygonalLineMelkman2.svg" );
299#ifdef DGTAL_WITH_CAIRO
305 vector<Z2i::Point> res;
306 std::copy( pointSet.
begin(), pointSet.
end(), back_inserter( res ) );
308 std::sort( res.begin(), res.end() );
312 drawPolygon( res.begin(), res.end(), board,
false );
313 board.
saveSVG(
"AndrewWEVP.svg" );
314#ifdef DGTAL_WITH_CAIRO
320 vector<Z2i::Point> res;
321 std::copy( pointSet.
begin(), pointSet.
end(), back_inserter( res ) );
327 std::vector<Z2i::Point>::iterator itMax
328 = std::max_element( res.begin(), res.end() );
333 std::sort( res.begin(), res.end(), comparator );
337 drawPolygon( res.begin(), res.end(), board,
false );
338 board.
saveSVG(
"GrahamWEVP.svg" );
339#ifdef DGTAL_WITH_CAIRO