Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

3 points on a line

  1. Jun 1, 2010 #1
    Given points A(x1, y1) and B(x2, y2), I'm supposed to derive the coordinate of the point C
    which should be on the line AB (such that B is on the line segment AC), such that the distance CB is 0.5*distance AC. The point is to avoid the solution where C is on "the other side", such that A is between C and B. We should obtain the solution where B is between A and C.

    Thanks
     
  2. jcsd
  3. Jun 1, 2010 #2

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    Welcome to PF!

    Hi onako! Welcome to PF! :smile:

    (try using the X2 tag just above the Reply box :wink:)

    Show us what you've tried, and where you're stuck, and then we'll know how to help! :smile:
     
  4. Jun 2, 2010 #3
    I know the coordinates when point B is the midpoint of AC (2*x2-x1, 2*y2-y1), but here the distance BC is 0.5*distance AB. I would need coordinates expressed with this percent variable (0.5 here). Thanks
     
  5. Jun 2, 2010 #4

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    If O is the origin (0,0),

    then express AB in terms of OA and OB.
     
  6. Jun 2, 2010 #5
    I dont think this would lead to the solution.
    Any other thoughts?
     
  7. Jun 3, 2010 #6
    I agree with what Tiny-tim said, effectively he's trying to get you to think of this as the vector equation of a line and work it out from there. Rather than using the kinda of standard co-ordinate reasoning solution. The way I would do this is to draw a graph and using OA and OB, think of how you could find C from this.
     
  8. Jun 3, 2010 #7
    The way the question is worded is probably where the problem is it's not really that clear imo.
     
  9. Jun 3, 2010 #8
    Points on [itex]AB[/itex] are given by [itex](x_1+\lambda(x_2-x_1),y_1+\lambda(y_2-y_1))[/itex] where [itex]\lambda[/itex] is the ratio of directed segments [itex]\overrightarrow{AC}/\overrightarrow{AB}[/itex]. When [itex]\lambda=2[/itex] that gives the point you quoted with [itex]\overrightarrow{AC}/\overrightarrow{AB}=2[/itex].

    Originally you said you wanted, "the solution where [itex]B[/itex] is between [itex]A[/itex] and [itex]C[/itex]", with, "distance [itex]CB[/itex] is [itex]0.5[/itex]*distance[itex]AC[/itex]". The sense of the directed segment [itex]\overrightarrow{CB}[/itex] must be opposite from that of [itex]\overrightarrow{AC}[/itex] to meet the first requirement, so [itex]\overrightarrow{AC}=2\overrightarrow{BC}[/itex], whence [itex]\overrightarrow{AB}=\overrightarrow{BC}[/itex] and [itex]\overrightarrow{AC}/\overrightarrow{AB}=2[/itex]. The point you gave is therefore the point [itex]C[/itex] you originally requested, and, yes [itex]B[/itex] is the midpoint of [itex]AC[/itex].

    When you say in the above quote, "[itex]BC[/itex] is [itex]0.5[/itex]*distance [itex]AB[/itex]", this is not what you originally asked for, but if you want a formula based on [itex]\overrightarrow{BC}/\overrightarrow{AB}=-\overrightarrow{BC}/\overrightarrow{BA}[/itex] then you can get that just by switching the [itex]A[/itex] and [itex]B[/itex] coördinates in the above formula.
     
  10. Jun 30, 2010 #9
    Ok. Let's simplify the problem.

    Let A(x1), B(x2) and C(x3) be three points on a line.

    Let us define the aliases:

    a for x1
    b for x2
    c for x3

    Let us define the function hmttr(a,b) as

    [tex]\frac{|b - a| + b - a}{2}[/tex]

    hmttr(a,b) returns b - a if b >= a and 0 otherwise.

    Now we can define c as:

    [tex]b + \frac{ hmttr(a,b) }{2} - \frac{ hmttr(b,a) }{2}[/tex]

    That is, b + half of how much to the right b is from a - half of how much to the right a is from b.

    Now we have:

    [tex]b + \frac{ |b - a| + b - a }{4} - \frac{ |a - b| + a - b }{4}[/tex]

    which works out to

    [tex]\frac{3b - a}{2}[/tex]

    or

    [tex]x_{3} = \frac{3x_{2} - x_{1}}{2}[/tex]

    This will work regardless whether B is to the right of A or vice versa. C will always wind up on the opposite side of B from A.

    Now you solve the line equation for this result to find y3 and z3.

    The abs() function is the mother of logic. Using it you can implement decisional blocks in hardware without logic circuits. I have used it to compute the sign of a number.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook