(28S) three points are collinear ?
|
12-14-2013, 07:20 PM
(This post was last modified: 06-15-2017 01:59 PM by Gene.)
Post: #1
|
|||
|
|||
(28S) three points are collinear ?
FIRST METHOD:
Code: « C→R 1 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| SECOND METHOD: (added 26/12/2013) A(a,a'), B(b,B'), C(c,c') are lined up if the angle (AB,AC) = 0 modulo π (in radians) Lets find the angle (AB,AC) first Code:
then Code:
Examples: 3: (2,2) 2: (4,1) 1: (5,3) ALIG 1: 0 (false) 3: (2,-3) 2: (4,1) 1: (5,3) ALIG 1: 1 (true) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)