How Do You Calculate the Coordinates of a Point Based on Distance and Gradient?

Click For Summary
SUMMARY

This discussion focuses on calculating the coordinates of a point B based on the coordinates of point A, the distance AB, and the gradient (slope) of the line connecting them. The formula derived involves using the equation of the line y = mx, where m represents the slope. The distance from point A to point B is calculated using the formula L = x√(1 + m²), allowing for the determination of the x and y coordinates of point B. The solution emphasizes that the coordinates of point A can be added back after calculating the relative position of point B.

PREREQUISITES
  • Understanding of Cartesian coordinates
  • Familiarity with basic algebra and geometry
  • Knowledge of slope and distance formulas
  • Ability to manipulate equations
NEXT STEPS
  • Study the derivation of the distance formula in coordinate geometry
  • Learn about vector representation in 2D space
  • Explore applications of gradient in trajectory prediction
  • Investigate programming techniques for implementing mathematical formulas
USEFUL FOR

Mathematicians, programmers developing trajectory prediction algorithms, and students learning about coordinate geometry and distance calculations.

Inquisitus
Messages
12
Reaction score
0
Not actually homework, but just a general query...

I'm trying to write a program that will predict the trajectory of a moving point by analysing several positions through which the point has passed.

Part of this involves finding the coordiantes of a point B, given the coordinates of another point A, the length of AB and its gradient. Obviously there are two possible points... one to the right A and one to the left, but I'm only interested in the one to the right.

I basically need two simple formulae in terms of the x and y coordinates of B, which I can apply in the program itself, although I wouldn't mind knowing how the formula was reached as well :smile:

I've tried getting my head around it but I'm just getting confused. Any help would be greatly appreciated, thanks!
 
Last edited:
Physics news on Phys.org
I'm not sure what you mean by the gradient. Is that the slope of the line connecting A to B? Are you asking how to find a point B=(x2,y2) given a point A=(x1,y1), and the length L and slope m of AB?

If so, this can be found by pretending A is at (0,0) (you can add the coordinates of A back in at then end). Then the line containing AB has the equation y=mx, so that points along the line have coordinates like (x,mx). The distance from A to a point (x,mx) is [itex]\sqrt{x^2+m^2 x^2}=x\sqrt{1+m^2}[/itex]. Then you want to solve for x using [itex]L= x\sqrt{1+m^2}[/itex]. This x is the difference between the x values of A and B, and multiplying it by m gives the difference between the y values.
 
Last edited:

Similar threads

Replies
20
Views
4K
Replies
3
Views
2K
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 40 ·
2
Replies
40
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K