Previous Up Next

27.3.3  Finding an intersection point of two objects in space

See Section 26.5.6 for single points of intersection of objects in the plane.

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

Examples

A:=single_inter(plane(point(0,1,1),point(1,0,1),point(1,1,0)), line(point(0,0,0),point(1,1,1))):; coordinates(A)
     
⎡
⎢
⎢
⎣
2
3
,
2
3
,
2
3
⎤
⎥
⎥
⎦
          
B:=single_inter(sphere(point(0,0,0),1),line(point(0,0,0),point(1,1,1))):; coordinates(B)
     
⎡
⎢
⎢
⎣
√
3
3
,
√
3
3
,
√
3
3
⎤
⎥
⎥
⎦
          
B1:=single_inter(sphere(point(0,0,0),1),line(point(0,0,0),point(1,1,1)),point(-1,0,0)):; coordinates(B1)
     
⎡
⎢
⎢
⎣
−
√
3
3
,−
√
3
3
,−
√
3
3
⎤
⎥
⎥
⎦
          
C:=single_inter(sphere(point(0,0,0),1),line(point(1,0,0),point(1,1,1))):; coordinates(C)
     
⎡
⎣
1,0,0⎤
⎦
          
C1:=single_inter(sphere(point(0,0,0),1),line(point(1,0,0),point(1,1,1)),[point(1,0,0)]):; coordinates(C1)
     
⎡
⎢
⎢
⎣
1
3
,
2
3
,
2
3
⎤
⎥
⎥
⎦
          

Previous Up Next