AreCollinear - Maple Help

Online Help

All Products    Maple    MapleSim


geometry

  

AreCollinear

  

test if three points are collinear

 

Calling Sequence

Parameters

Description

Examples

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

withgeometry:

pointA,0,0,pointB,2,0,pointC,3,0,pointF,2,3:

pointM,mx,my:

AreCollinearA,B,C

true

(1)

AreCollinearA,C,F

false

(2)

AreCollinearA,F,M,cond

AreCollinear:   "hint: could not determine if 2*my-3*mx is zero"

FAIL

(3)

cond

2my3mx=0

(4)

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

assumecond

AreCollinearA,F,M

true

(5)

See Also

geometry[AreConcurrent]

geometry[IsOnCircle]

geometry[IsOnLine]

geometry[point]