Function autoware_utils_geometry::random_concave_polygon

Function Documentation

std::optional<Polygon2d> autoware_utils_geometry::random_concave_polygon(const size_t vertices, const double max)

generate a random non-convex polygon

algorithm from https://digitalscholarship.unlv.edu/cgi/viewcontent.cgi?article=3183&context=thesesdissertations

Parameters:
  • vertices – number of vertices for the desired polygon

  • max – points will be generated in the range [-max, max]