184 Geometry
Examples:
If GA is defined to be the unit circle, then area(GA) returns
.
area(4-x^2/4, x=-4..4) returns 14.666…
coordinates
Given a vector of points, returns a matrix containing the x- and
y-coordinates of those points. Each row of the matrix defines
one point; the first column gives the x-coordinates and the
second column contains the y-coordinates.
coordinates([point1, point2, …, pointn]))
distance
Returns the distance between two points or between a point
and a curve.
distance(point1, point2) or distance(point,
curve)
Examples:
distance(1+i, 3+3i) returns 2.828… or 2√2.
if GA is the point at (0, 0) and GB is defined as
plotfunc(4–x^2/4), then distance (GA, GB) returns 3.464…
or 2√3.
distance2
Returns the square of the distance between two points or
between a point and a curve.
distance2(point1, point2) or distance2(point,
curve)
Examples:
distance2(1+i, 3+3i) returns 8.
If GA is the point at (0, 0) and GB is defined as plotfunc(4-
x^2/4), then distance2(GA, GB) returns 12.