PointInCircle - Maple Help

ComputationalGeometry

 PointInCircle
 determine if a point lies within a circle of three points accurately

 Calling Sequence PointInCircle( P1, P2, P3, P4 ) PointInCircle( M, locs )

Parameters

 P1, P2, P3, P4 - four points in real 2-D space given as lists or rtables of their coordinates M - an array of point coordinates in 2-D space. Each point is a row in the array. M must be C_order and datatype=float[8] locs - positive integer indices of the four rows of M to treat as input

Description

 • This command returns a string describing the orientation of the fourth point relative to the circle formed by the first three points. If the fourth point is inside the circle then the command returns "inside". If the fourth point is outside then "outside" is returned. If all four points lie on a circle, then "boundary" is returned.
 • The second calling sequence is designed for checking large collections of points without having to make copies of their values.

Examples

 > $\mathrm{with}\left(\mathrm{ComputationalGeometry}\right):$
 > $a≔\left[0,0\right];$$b≔\left[1,1\right];$$c≔\left[0,1\right];$$d≔\left[0.5,1.25\right];$$e≔\left[0.25,0.75\right];$$f≔\left[1,0\right]$
 ${a}{≔}\left[{0}{,}{0}\right]$
 ${b}{≔}\left[{1}{,}{1}\right]$
 ${c}{≔}\left[{0}{,}{1}\right]$
 ${d}{≔}\left[{0.5}{,}{1.25}\right]$
 ${e}{≔}\left[{0.25}{,}{0.75}\right]$
 ${f}{≔}\left[{1}{,}{0}\right]$ (1)
 > \mathrm{plots}:-\mathrm{display}\left(\mathrm{plottools}:-\mathrm{point}\left(\left[a,b,c,d,e,f\right],\mathrm{symbolsize}=20\right),\mathrm{plots}:-\mathrm{textplot}\left(\left[d\left[\right],"d"\right],\mathrm{align}=\left["above","left"\right]\right),\mathrm{plots}:-\mathrm{textplot}\left(\left[e\left[\right],"e"\right],\mathrm{align}=\left["above","left"\right]\right),\mathrm{plots}:-\mathrm{textplot}\left(\left[f\left[\right],"f"\right],\mathrm{align}=\left["above","left"\right]\right),\mathrm{plottools}:-\mathrm{circle}\left(\left[\frac{1}{2},\frac{1}{2}\right],\frac{\mathrm{sqrt}\left(2\right)}{2},\mathrm{style}=\mathrm{line}\right),\mathrm{axes}=\mathrm{box}\right)
 > $\mathrm{PointInCircle}\left(a,b,c,d\right)$
 ${"outside"}$ (2)
 > $\mathrm{PointInCircle}\left(a,b,c,e\right)$
 ${"inside"}$ (3)
 > $\mathrm{PointInCircle}\left(a,b,c,f\right)$
 ${"boundary"}$ (4)
 > $M≔\mathrm{Array}\left(\left[a,b,c,d,e\right],\mathrm{datatype}=\mathrm{float}\left[8\right],\mathrm{order}=\mathrm{C_order}\right)$
 ${M}{≔}\left[\begin{array}{cc}{0.}& {0.}\\ {1.}& {1.}\\ {0.}& {1.}\\ {0.500000000000000}& {1.25000000000000}\\ {0.250000000000000}& {0.750000000000000}\end{array}\right]$ (5)
 > $\mathrm{PointInCircle}\left(M,\left[1,2,3,5\right]\right)$
 ${"inside"}$ (6)

Compatibility

 • The ComputationalGeometry[PointInCircle] command was introduced in Maple 2019.
 • For more information on Maple 2019 changes, see Updates in Maple 2019.