Manual

188 Geometry
is_parallel
Tests whether or not two lines are parallel. Returns 1 if they
are and 0 otherwise.
is_parallel(line1, line2)
Example:
is_parallel(line(2x+3y=7),line(2x+3y=9)
returns 1.
is_parallelogram
Tests whether or not a set of four points are vertices of a
parallelogram. Returns 0 if they are not. If they are, then
returns 1 if they form only a parallelogram, 2 if they form a
rhombus, 3 if they form a rectangle, and 4 if they form a
square.
is_parallelogram(point1, point2, point3,
point4)
Example:
is_parallelogram(point(0,0), point(2,4),
point(0,8), point(-2,4)) returns 2.
is_perpendicular
Similar to is_orthogonal. Tests whether or not two lines are
perpendicular.
is_perpendicular(line1, line2)
is_rectangle
Tests whether or not a set of four points are vertices of a
rectangle. Returns 0 if they are not, 1 if they are, and 2 if they
are vertices of a square.
is_rectangle(point1, point2, point3, point4)
Examples:
is_rectangle(point(0,0), point(4,2),
point(2,6), point(-2,4)) returns 2.
With a set of only three points as argument, tests whether or
not they are vertices of a right triangle. Returns 0 if they are
not. If they are, returns the number order of the common point
of the two perpendicular sides (1, 2, or 3).
is_rectangle(point(0,0), point(4,2),
point(2,6)) returns 2.