Solved

# Checking if 3 points are collinear?

Posted on 2008-10-20
1,487 Views
Hi,

How can I check if 3 points are collinear?

Thanks
0
Question by:DJ_AM_Juicebox
• 2

LVL 84

Accepted Solution

ozo earned 250 total points
ID: 22762668
0

LVL 6

Assisted Solution

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

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

## Featured Post

### Suggested Solutions

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Lithium-ion batteries area cornerstone of today's portable electronic devices, and even though they are relied upon heavily, their chemistry and origin are not of common knowledge. This article is about a device on which every smartphone, laptop, an…
The viewer will learn how to implement Singleton Design Pattern in Java.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.