12.4.3  Find an intersection point of two objects in space: single_interline_inter

See section 11.6.5 for single points of intersection of objects in the plane.

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.

Input:

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)))

then:

coordinates(A)

Output:

[2/3,2/3,2/3]

Input:

B := single_inter(sphere(point(0,0,0),1),
line(point(0,0,0),point(1,1,1)))

then:

coordinates(B)

Output:

[1/sqrt(3), 1/sqrt(3), 1/sqrt(3)]

Input:

B1 := single_inter(sphere(point(0,0,0),1),
line(point(0,0,0),point(1,1,1)), point(-1,0,0))

then:

coordinates(B1)

Output:

[-1/sqrt(3), -1/sqrt(3), -1/sqrt(3)]

Input:

C := single_inter(sphere(point(0,0,0),1),
line(point(1,0,0),point(1,1,1)))

then:

coordinates(C)

Output:

[1,0,0]

Input:

C1 := single_inter(sphere(point(0,0,0),1),
line(point(1,0,0),point(1,1,1)),[point(1,0,0)])

then:

coordinates(C1)

Output:

[1/3,2/3,2/3]
{"ft_lang_label":"__label__en","ft_lang_prob":0.5002991,"math_prob":0.99996185,"size":1384,"snap":"2019-26-2019-30","text_gpt3_token_len":465,"char_repetition_ratio":0.19782609,"word_repetition_ratio":0.025806451,"special_character_ratio":0.35693642,"punctuation_ratio":0.26756757,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9982074,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-06-17T10:44:32Z\",\"WARC-Record-ID\":\"<urn:uuid:f00ceaa3-623c-42ea-9a27-382f122b7649>\",\"Content-Length\":\"4193\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:5f2e9945-675f-418f-956c-cd32415a9189>\",\"WARC-Concurrent-To\":\"<urn:uuid:ceebf838-212a-46a9-b7b4-10a9dc28889f>\",\"WARC-IP-Address\":\"152.77.212.12\",\"WARC-Target-URI\":\"http://www-fourier.ujf-grenoble.fr/~parisse/giac/doc/en/cascmd_en/cascmd_en836.html\",\"WARC-Payload-Digest\":\"sha1:GEWGLZC3ISM32N6WA7B7I6UH7NAIJHCB\",\"WARC-Block-Digest\":\"sha1:7BOROQBCNYUMCWOCBBHMPOZTUYPLFCQA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-26/CC-MAIN-2019-26_segments_1560627998473.44_warc_CC-MAIN-20190617103006-20190617125006-00135.warc.gz\"}"}