Function: math[areparallel] - checks if two lines are parallel
Calling Sequence:
areparallel(l1, l2);
Parameters:
l1, l2 - two line objects
Description:
The function checks whether two lines defined by geometry/line or math/line are parallel. It returns true if l1 || l2, and false otherwise.
math/areparellel provides an interface to geometry/AreParallel . If the latter function returns FAIL, i.e. at least one of the lines contains symbolic names, math/areparallel applies assume to the condition that makes l1 and l2 parallel and calls itself again to return a solution (true or false).
This function is part of the math package, and so can be used only after performing the command with(math) or with(math, areparallel).
Examples:
> with(math):
> l1 := line(x+1);
> l2 := line(x+2);
> areparallel(l1, l2);
> l3 := line(m1*x+n1);
> l4 := line(m2*x+n2);
> geometry[AreParallel](l3, l4);
geometry[AreParallel] "hint: cannot determine if -m1+m2 is zero"
> areparallel(l3, l4);
geometry/arepara: "hint: cannot determine if -m1+m2 is zero"
areparallel: "applying assume to -m1+m2 = 0"
See Also:
geometry/AreParallel , geometry/line , math/line .
Version History:
Version 1.0 - September 13, 1998