ComputationalGeometry
PointInCircle
determine if a point lies within a circle of three points accurately
Calling Sequence
Parameters
Description
Examples
Compatibility
PointInCircle( P1, P2, P3, P4 )
PointInCircle( M, locs )
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
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.
with⁡ComputationalGeometry:
a≔0,0;b≔1,1;c≔0,1;d≔0.5,1.25;e≔0.25,0.75;f≔1,0
a≔0,0
b≔1,1
c≔0,1
d≔0.5,1.25
e≔0.25,0.75
f≔1,0
plots:-display⁡plottools:-point⁡a,b,c,d,e,f,symbolsize=20,plots:-textplot⁡d,d,align=above,left,plots:-textplot⁡e,e,align=above,left,plots:-textplot⁡f,f,align=above,left,plottools:-circle⁡12,12,sqrt⁡22,style=line,axes=box
PointInCircle⁡a,b,c,d
outside
PointInCircle⁡a,b,c,e
inside
PointInCircle⁡a,b,c,f
boundary
M≔Array⁡a,b,c,d,e,datatype=float8,order=C_order
M≔0.0.1.1.0.1.0.5000000000000001.250000000000000.2500000000000000.750000000000000
PointInCircle⁡M,1,2,3,5
The ComputationalGeometry[PointInCircle] command was introduced in Maple 2019.
For more information on Maple 2019 changes, see Updates in Maple 2019.
See Also
ComputationalGeometry[PointOrientation]
Download Help Document