What is the value of (xC, yC) in this simple diagram I made, and what's the formula to do it?

Koalanet21

New member
Joined
Jun 16, 2020
Messages
12
seg.PNG

Here's my (probably really simple) problem.
Let's say I already know the coordinates of (xA, yA) and I also know the coordinates of (xB, yB)
What is the formula to determine the coordinates of the red dot (xC, yC)?
This dot is at 1/5 of the segment w starting from (xA, ya)
 
View attachment 28183

Here's my (probably really simple) problem.
Let's say I already know the coordinates of (xA, yA) and I also know the coordinates of (xB, yB)
What is the formula to determine the coordinates of the red dot (xC, yC)?
This dot is at 1/5 of the segment w starting from (xA, ya)
If I were to do your assignment, I would

calculate the length of BC as

LBC = \(\displaystyle \sqrt{(x_B - x_C)^2 \ + \ (y_B - y_C)^2}\)

Similarly calculate the length of AC..... and continue

Please show us what you have tried and exactly where you are stuck.

Please follow the rules of posting in this forum, as enunciated at:


Please share your work/thoughts about this problem
 
View attachment 28183

Here's my (probably really simple) problem.
Let's say I already know the coordinates of (xA, yA) and I also know the coordinates of (xB, yB)
What is the formula to determine the coordinates of the red dot (xC, yC)?
This dot is at 1/5 of the segment w starting from (xA, ya)
Since point C is 1/5 of the way from A to B, the same is true of its coordinates. So find [MATH]x_B-x_A[/MATH], divide by 5, and add that to [MATH]x_A[/MATH]. Then do the same with the y.
 
This is an application of linear interpolation. Fundamentally, it's a matter of moving from one position to another by some proportion of the total difference. It appears in animation, color blending and just about anything else you could imagine.

A general formula for linear interpolation is this:

[MATH]result = s + a(e - s)[/MATH]​

Where:
  • [MATH]s[/MATH] is the starting position
  • [MATH]e[/MATH] is the ending position
  • [MATH]a[/MATH] is the proportion of the total difference from [MATH]s[/MATH] in the direction of [MATH]e[/MATH]
In the example provided:
  • [MATH]xC = xA + \frac{1}{5}(xB - xA)[/MATH]
  • [MATH]yC = yA + \frac{1}{5}(yB - yA)[/MATH]
 
This is an application of linear interpolation. Fundamentally, it's a matter of moving from one position to another by some proportion of the total difference. It appears in animation, color blending and just about anything else you could imagine.

A general formula for linear interpolation is this:

[MATH]result = s + a(e - s)[/MATH]​

Where:
  • [MATH]s[/MATH] is the starting position
  • [MATH]e[/MATH] is the ending position
  • [MATH]a[/MATH] is the proportion of the total difference from [MATH]s[/MATH] in the direction of [MATH]e[/MATH]
In the example provided:
  • [MATH]xC = xA + \frac{1}{5}(xB - xA)[/MATH]
  • [MATH]yC = yA + \frac{1}{5}(yB - yA)[/MATH]
A particularly nice form is \((1-a)s + ae\); in the example, we just add 4/5 of \(x_A\) and 1/5 of \(x_B\), and likewise with y.
 
Top