Function

CGAL::perturb_points_2

Definition

The function perturb_points_2 perturbs each point in a given range of points by a random amount.

#include <CGAL/point_generators_2.h>

template <class ForwardIterator>
void
perturb_points_2 (
ForwardIterator first,
ForwardIterator last,
double xeps,
double yeps = xeps,
Random& rnd = default_random,
Creator creator = Creator_uniform_2<Kernel_traits<P>::Kernel::RT,P>)
perturbs the points in the range [first,last) by replacing each point with a random point from the xeps × yeps rectangle centered at the original point. Two random numbers are needed from rnd for each point.

Requirements

See Also

CGAL::points_on_segment_2
CGAL::points_on_square_grid_2
CGAL::random_selection
CGAL::random_selection
std::random_shuffle