Previous Up Next

13.6.6  Finding a point of intersection of two objects in the plane: single_inter line_inter

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

The single_inter command finds an intersection point of two geometric objects.
line_inter is a synonym for single_inter


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).
Input:

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

Output:

which is the point (−1,0).
Input:

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

Output:

which is the point (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.


Previous Up Next