CGAL::points_on_segment_2

Definition

The function points_on_segment_2 generates a set of points equally spaced on a segment given the endpoints of the segment.

#include <CGAL/point_generators_2.h>

template <class P, class OutputIterator>
OutputIterator
points_on_segment_2 ( P p,
P q,
std::size_t n,
OutputIterator o)
creates n points equally spaced on the segment from p to q, i.e.  i: 0 i < n: o[i] := (n-i-1)/(n-1) p + (i)/(n-1) q. Returns the value of o after inserting the n points.

See Also

CGAL::points_on_segment_2
CGAL::points_on_square_grid_2
CGAL::random_collinear_points_2