29 static_cast<double>(precision - 1));
35 win1.enableMousePanZoom(
true);
41 randomPoly[i].x = radius * cos(ang);
42 randomPoly[i].y = radius * sin(ang);
44 randomPoly.removeRedundantVertices();
45 std::vector<double> x, y;
46 randomPoly.getPlotData(x, y);
47 win1.plot(x, y,
"b-5",
"Polygon");
49 std::vector<TPolygon2D> convexPolys;
51 convexPolys.push_back(randomPoly);
53 win2.enableMousePanZoom(
true);
54 std::string plotName =
"Polygon0";
55 for (std::vector<TPolygon2D>::const_iterator it = convexPolys.begin();
56 it != convexPolys.end(); ++it)
59 it->getPlotData(x, y);
60 win2.plot(x, y,
"r-3", plotName);
61 if (!it->isConvex()) cout <<
"FAIL.\n";