math question
Jun 20, 2007 at 11:44pm
math questionHi List I have four points [x,y] on a plane and I need to be able to determine if they are in a line at any angle. I Any hints are appreciated. Thanks Need personalized email and website? Look no further. It’s easy 

Jun 20, 2007 at 11:55pm
One way you could do this is calculate the normal to the plane Anthony
—– Original Message —– > Hi List 

Jun 21, 2007 at 12:26am
I may have been a bit vague in my explanation. Take a look Anthony
—– Original Message —– > One way you could do this is calculate the normal to the plane 

Jun 21, 2007 at 12:41am
You want to look at slopes i.e. (y1y0)/(x1x0) if these are the same for all points, then they are colinear. wes On 6/20/07, apalomba@austin.rr.com 

Jun 21, 2007 at 12:39pm
Take 2 points. > Hi List 

Jun 21, 2007 at 12:42pm
Check out the CGA FAQ, subject 1.03, http://www.exaflop.org/docs/cgafaq/. Good old FAQs. – Paul P.S. Here’s the text: This problem can be extremely easy or extremely difficult depends on your Let A,B,C,D be 2space position vectors. Then the directed line segments AB AB=A+r(BA), r in [0,1] If AB & CD intersect, then A+r(BA)=C+s(DC), or Ax+r(BxAx)=Cx+s(DxCx) Solving the above for r and s yields (AyCy)(DxCx)(AxCx)(DyCy) (AyCy)(BxAx)(AxCx)(ByAy) Let P be the position vector of the intersection point, then P=A+r(BA) or Px=Ax+r(BxAx) By examining the values of r & s, you can also determine some other limiting If 0< =r<=1 & 0<=s<=1, intersection exists  If the denominator in eqn 1 is zero, AB & CD are parallel  If the numerator in eqn 1 is also zero, AB & CD are coincident If the intersection point of the 2 lines are needed (lines in this context  If r>1, P is located on extension of AB If r<0, P is located on extension of BA If s>1, P is located on extension of CD If s<0, P is located on extension of DC Also note that the denominators of eqn 1 & 2 are identical. References: [O'Rourke]< http://www.exaflop.org/docs/cgafaq/cga0.html#%5BO%27%20Rourke%5D>pp. On 6/20/07, Wesley Smith
– 

Jun 21, 2007 at 1:44pm
…or you can use some of the test object from the pmpd library : Mathieu 

Jun 21, 2007 at 1:59pm
Thanks for all of the suggestions. I ended up calculating slopes and comparing, it works great and was This whole thing makes me wish I’d paid more attention in my math classes instead of complaining David
Need personalized email and website? Look no further. It’s easy 
You must be logged in to reply to this topic.