Solved

Checking if 3 points are collinear?

Posted on 2008-10-20
3
1,487 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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++.

746 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now