Solved

Checking if 3 points are collinear?

Posted on 2008-10-20
3
1,493 Views
Last Modified: 2013-11-25
Hi,

How can I check if 3 points are collinear?

Thanks
0
Comment
Question by:DJ_AM_Juicebox
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 250 total points
ID: 22762668
0
 
LVL 6

Assisted Solution

by:Talmash
Talmash earned 250 total points
ID: 22784672
in case you are interested with 2D lines, OZO's answer is fine.

in case you want a 3D (streometric),

and you have 3 points A,B,C with coordinations (Xa,Ya,Za,..,Xc,Yc,Zc)

do:
check if X,Y for all 3 points are linear.
check if X,Z for all 3 points are linear. (use Z coordinations as Y)
check if Y,Z for all 3 point are linear. (use Z coordinations as X)

tal
0
 
LVL 84

Expert Comment

by:ozo
ID: 22785275
area works in 3D too
the magnitude of the cross product of any two sides is proportional to area
0

Featured Post

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
My 2003 Land Rover discovery 2 key for code for car alarm 7 123
countHi2 challenge 7 55
split53 challenge 7 97
Properties of numbers 14 50
This article will show, step by step, how to integrate R code into a R Sweave document
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question