Find a point of intersection of two objects: single_inter line_inter

### 11.6.5 Find a point of intersection of two objects: single_inter line_inter

The single_inter (or the line_inter) command takes two geometric objects as arguments and returns one of the points of intersection of the two objects.

The single_inter command optionally takes a third argument, which can be a point or a list of points. If the optional argument is a single point, then single_inter returns the point of intersection closest to the optional argument. If the optional argument is a list of points, then single_inter tries to return a point of intersection not in the list.

For example, the unit circle circle(0,1) and line line(-1,i) intersect at the points (−1,0) and (0,1). Entering
Input:

single_inter(circle(0,1),line(-1,i))

draws the point (−1,0). To draw the other point, enter
Input:

single_inter(circle(0,1),line(-1,i),[-1])

and Xcas will draw (0,1). Similarly, since this second point of intersection is closest to (0,1/2), entering
Input:

single_inter(circle(0,1),line(-1,i),i/2)

also draws the second point.