IsOnLine - Maple Help

# Online Help

###### All Products    Maple    MapleSim

geometry

 IsOnLine
 test if a point, a list, or a set of points is on a line

 Calling Sequence IsOnLine(f, l, cond)

Parameters

 f - point, list or set of points l - line cond - (optional) name

Description

 • The routine returns true if the point f or the list/set of points f is on line l; false if it is not; and FAIL if it is unable to reach a conclusion.
 • In case of FAIL, if the third optional argument is given, the condition that makes f on line l is assigned to this argument. It will be either of the form $\mathrm{expr}=0$ or of the form $&\mathrm{and}\left(\mathrm{expr_1}=0,...,\mathrm{expr_n}=0\right)$ where expr, expr_i are Maple expressions.
 • The command with(geometry,IsOnLine) allows the use of the abbreviated form of this command.

Examples

 > $\mathrm{with}\left(\mathrm{geometry}\right):$
 > $\mathrm{line}\left(\mathrm{l1},y=0,\left[x,y\right]\right),\mathrm{line}\left(\mathrm{l2},x+y=1,\left[x,y\right]\right),\mathrm{point}\left(A,\frac{1}{2},\frac{1}{2}\right):$
 > $\mathrm{IsOnLine}\left(A,\mathrm{l1}\right)$
 ${\mathrm{false}}$ (1)
 > $\mathrm{IsOnLine}\left(A,\mathrm{l2}\right)$
 ${\mathrm{true}}$ (2)
 > $\mathrm{point}\left(A,a,\frac{1}{2}\right),\mathrm{point}\left(B,\frac{3}{5},b\right):$
 > $\mathrm{IsOnLine}\left(\left\{A,B\right\},\mathrm{l2},'\mathrm{cond}'\right)$
 IsOnLine:   "hint: the following conditions must be satisfied: {-2/5+b = 0, -1/2+a = 0}"
 ${\mathrm{FAIL}}$ (3)
 > $\mathrm{cond}$
 $\left({-}\frac{{2}}{{5}}{+}{b}{=}{0}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{&and}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\left({-}\frac{{1}}{{2}}{+}{a}{=}{0}\right)$ (4)

make the necessary assumptions

 > $\mathrm{assume}\left(\mathrm{op}\left(\mathrm{cond}\right)\right)$
 > $\mathrm{IsOnLine}\left(\left\{A,B\right\},\mathrm{l2}\right)$
 ${\mathrm{true}}$ (5)

 See Also