geometry - Maple Help

Home : Support : Online Help : Mathematics : Geometry : 2-D Euclidean : Point Functions : geometry/AreCollinear

geometry

 AreCollinear
 test if three points are collinear

 Calling Sequence AreCollinear(P, Q, R, cond)

Parameters

 P, Q, R - three points cond - (optional) name

Description

 • Points P, Q, R are said to be collinear if they lie on the same straight line.
 • The routine returns true if P, Q, and R are collinear; false if they are not; and FAIL if it is unable to determine if the three points are collinear.
 • If FAIL is returned, and the optional argument cond is given, the condition that makes the points collinear is assigned to this argument.
 • The command with(geometry,AreCollinear) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{geometry}\right):$
 > $\mathrm{point}\left(A,0,0\right),\mathrm{point}\left(B,2,0\right),\mathrm{point}\left(C,-3,0\right),\mathrm{point}\left(F,2,3\right):$
 > $\mathrm{point}\left(M,\mathrm{mx},\mathrm{my}\right):$
 > $\mathrm{AreCollinear}\left(A,B,C\right)$
 ${\mathrm{true}}$ (1)
 > $\mathrm{AreCollinear}\left(A,C,F\right)$
 ${\mathrm{false}}$ (2)
 > $\mathrm{AreCollinear}\left(A,F,M,'\mathrm{cond}'\right)$
 AreCollinear:   "hint: could not determine if 2*my-3*mx is zero"
 ${\mathrm{FAIL}}$ (3)
 > $\mathrm{cond}$
 ${2}{}{\mathrm{my}}{-}{3}{}{\mathrm{mx}}{=}{0}$ (4)

make necessary assumption so that A, F, M are collinear

 > $\mathrm{assume}\left(\mathrm{cond}\right)$
 > $\mathrm{AreCollinear}\left(A,F,M\right)$
 ${\mathrm{true}}$ (5)