Geometry/Excel problem

Feb 04, 2010 13:16

Consider this problem ( Read more... )

Leave a comment

Comments 4

miss_next February 4 2010, 07:19:20 UTC
Your maths is slightly flawed, I'm afraid. The original line will indeed make a certain angle to the x-axis, but in order to know whether an additional point is on one side of it or the other, you don't just need to know the angle from the origin; you also need to know where the line cuts the x-axis, and measure the angle from there.

A better way to do it is to work out the equation of the line. Suppose your first two points are (1,3) and (3,7). You then call these (x1, y1) and (x2, y2) (sorry, can't do subscripts), and plug into the equation

(x - x1)/y - y1) = (x2 - x1)/y2 - y1)

Work all that out, and you get y = 2x + 1, which you can easily check by making sure your two initial points satisfy this equation. Now take the co-ordinates of your third point and plug them into the line equation. If y > 2x + 1, the point is above the line; if y < 2x + 1, it is below the line; and of course if they're equal, it's on the line.

Foolproof, and no trig required. :-)

Reply

rosyatrandom February 4 2010, 14:55:49 UTC
Shall we consider the case where the two original points are identical, or on a vertical line? :D

Reply

miss_next February 4 2010, 14:57:19 UTC
You can if you like, though I think those special cases are likely to make themselves rather obvious. :-)

Reply

toad2000 February 4 2010, 16:56:51 UTC
Since we are (most likely) dealing with the real world, where these two things are highly unlikely, why not stop confusing the poor man with mathematical pendantry :-p

Reply


Leave a comment

Up