See Section 26.5.7 for points of intersection of objects in the plane.
The inter command finds the intersection of two geometric objects in ℝ3.
With the argument P, the command returns the point of intersection closest to P.
LA:=inter(plane(point(0,1,1),point(1,0,1),point(1,1,0)),line(point(0,0,0),point(1,1,1))):; coordinates(LA) |
|
LB:=inter(sphere(point(0,0,0),1),line(point(0,0,0),point(1,1,1))):; coordinates(LB) |
|
To get just one of the points, use the usual list indices.
coordinates(LB[0]) |
|
To get the point closest to (1/2,1/2,1/2):
LB1:=inter(sphere(point(0,0,0),1),line(point(0,0,0),point(1,1,1)),point(1/2,1/2,1/2)):; coordinates(LB1) |
|