geometry
diameter
compute the diameter of points on a plane
Calling Sequence
Parameters
Description
Examples
diameter(g)
g
-
list or set of points
The routine computes the diameter of a given set or list of points g. The output is a list of three elements where the first two elements are two points denoting the two endpoints of the diameter of g, the third element the distance between these two endpoints.
To find the diameter of a list or set of points, the coordinates of the points must be numeric.
The command with(geometry,diameter) allows the use of the abbreviated form of this command.
with⁡geometry:
point⁡A,0,0,point⁡B,2,0,point⁡C,1,3,point⁡F,1,6:
point⁡M,sqrt⁡2,3:
ps≔A,B,C,F,M:
diameter⁡ps
A,F,37
See Also
geometry[convexhull]
Download Help Document