Colinear Points
|
12-25-2013, 04:48 PM
Post: #1
|
|||
|
|||
Colinear Points
Following up on a HP28s example made by Damien in another sub-forum, I thought to try to do the same on the Prime.
Damien's examples and explanation: A(a, a'), B(b, b'), C(c, c') are lined up if the determinant = 0 |a a' 1| |b b' 1| = 0 |c c' 1| Examples: (2,2) (4,1) (5,3) -> The points are not colinear (2,-3) (4,1) (5,3) -> The points are colinear Code:
The program must be run in Textbook or Algebraic as if not the calculator will crash, so to avoid that I preserve the Entry mode in a local variable and reinstate it at the end. It is also only relevant to 3 points and does not check if more points have been entered in the matrix editor. However, when running the program off the stack whilst in RPN mode it always return a 2 (which is the Entry state) to the stack. I have looked but cannot find a way to avoid this undesired result in the program. Does anybody have a suggestion for how this could be achieved? Cheers, Terje |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Colinear Points - Terje Vallestad - 12-25-2013 04:48 PM
RE: Colinear Points - Han - 12-25-2013, 05:33 PM
RE: Colinear Points - Terje Vallestad - 12-25-2013, 06:56 PM
RE: Colinear Points - Han - 12-26-2013, 01:59 AM
RE: Colinear Points - debrouxl - 12-25-2013, 06:13 PM
RE: Colinear Points - Terje Vallestad - 12-25-2013, 07:05 PM
RE: Colinear Points - patrice - 12-25-2013, 07:47 PM
RE: Colinear Points - Terje Vallestad - 12-25-2013, 09:35 PM
|
User(s) browsing this thread: 1 Guest(s)