Node:Regular Closed Plane Curve Intersections, Next:Regular Closed Plane Curve Segments, Previous:Querying Regular Closed Plane Curves, Up:Regular Closed Plane Curve Reference
bool_point_pair intersection_points (Point ref_pt, Point p0, Point p1)  const function 
bool_point_pair intersection_points (const Point& ref_pt, const Path& p)  const function 
The version of this function taking Point arguments finds the
intersection points, if any, of the
Reg_Cl_Plane_Curve and the line
p
that passes through the Points
p_0
and
p_1.
In the other version, the Path argument must be a linear
Path , and its first and last Points are passed to the
first version of this function as p0 and p1, respectively.
Let
C
be the In [next figure]
, the line AB
is normal to the
The line DE is skew to the plane of e, and intersects e at i_1, on the perimeter of e. Point p0(2, 2, 3); Ellipse e(p0, 3, 4, 30, 60, 5.2); Point p1 = p0.mediate(e.get_point(11), .5); Point A = e.get_normal(); A *= 2.5; A.shift(p1); Point B = A.mediate(p1, 2); bool_point_pair bpp = e.intersection_points(A, B); Point C(0, 2, 0); Point D(0, 3.5, 0); C *= D.rotate(2, 0, 5); C *= D.shift(e.get_point(4)); bpp = e.intersection_points(C, D);
In [next figure]
, q and e are coplanar. In this case,
only the intersections of q with the perimeter of e are returned by
A = p0.mediate(e.get_point(3), 1.5); B = p0.mediate(e.get_point(11), 1.5); Path q(A, B); bpp = e.intersection_points(q);
