Previous Up Next

26.5.6  Finding a point of intersection of two objects in the plane

See Section 27.3.3 for single points of intersection of objects in space.

The single_inter or line_inter command finds an intersection point of two geometric objects.

Example

The command circle(0,1) creates the unit circle and line(-1,i) creates a line, these two objects intersect at the points (−1,0) and (0,1).

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

which is the point (−1,0).

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

which is the point (0,1). Similarly, since this second point of intersection is closest to (0,1/2), entering:

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

also draws the second point.


Previous Up Next