Solve 3 Points on a Line: Point C 0.5 AC from A to B

In summary: In this particular case you can use it to check if x3 is less than or greater than x2. If it is greater, then z3 is positive and vice versa. In summary, In order to solve for y3 and z3, you use the abs() function to determine if x3 is greater than x2. If it is, then z3 is positive and if x3 is less than x2, then z3 is negative.
  • #1
onako
86
0
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
 
Physics news on Phys.org
  • #2
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:
 
  • #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
 
  • #4
If O is the origin (0,0),

then express AB in terms of OA and OB.
 
  • #5
tiny-tim said:
If O is the origin (0,0),

then express AB in terms of OA and OB.

I don't think this would lead to the solution.
Any other thoughts?
 
  • #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.
 
  • #7
The way the question is worded is probably where the problem is it's not really that clear imo.
 
  • #8
onako said:
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

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.
 
  • #9
onako said:
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

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.
 

FAQ: Solve 3 Points on a Line: Point C 0.5 AC from A to B

What does it mean to solve 3 points on a line?

Solving 3 points on a line means finding the coordinates of three points that lie on the same straight line. This involves using mathematical equations or techniques to determine the values of the x and y coordinates for each point.

How do you find the distance between two points?

To find the distance between two points, use the distance formula: d = √[(x2 - x1)^2 + (y2 - y1)^2]. You will need to know the coordinates of both points to plug into the formula.

What does it mean for Point C to be 0.5 AC from A to B?

Point C being 0.5 AC from A to B means that the distance between Point A and Point C is half of the distance between Point A and Point B. This can also be expressed as Point C being halfway between Point A and Point B on the line segment AB.

How many solutions are there for solving 3 points on a line?

There is only one unique solution for solving 3 points on a line. This is because three non-collinear points uniquely determine a line, meaning there is only one straight line that passes through all three points.

Can you solve 3 points on a line without knowing the coordinates of all 3 points?

No, you cannot solve 3 points on a line without knowing the coordinates of all 3 points. This is because the coordinates of all 3 points are necessary to plug into equations or use other techniques to solve for the coordinates of each point.

Back
Top