Solve Manhattan Dist. Equation for 2D Line AB, Point C

  • Thread starter onako
  • Start date
  • Tags
    Line
In summary, the conversation discusses deriving an equation to compute a point C on a line AB with a given distance t, assuming Euclidean distances. The speaker then mentions wanting a similar equation for Manhattan distance which involves absolute value terms, causing issues with their calculations. They clarify the Manhattan distance formula and the constraint of point C being on line AB, and express their uncertainty about their current approach. They request assistance with deriving the correct equation.
  • #1
onako
86
0
I've derived an equation to satisfy the following:
Given two points A and B in 2D and distance t, compute the point C such that C is on the line AB, and the distance from A to C is t. Here, Euclidean distances are assumed.
Now, I want something similar; the point C is constrained to lie on the line AB, but the desired distance t needs be Manhattan distance. The absolute value terms make problems for my calculations. Any help on how to derive this is welcome.
 
Physics news on Phys.org
  • #2
To clarify some things: the manhattan distace is
[tex]
d_{ac}=|x_c-x_a|+|y_c-y_a|
[/tex]
and constraining point C to be on AB (the final solution should have on the line order of ABC or ACB)
[tex]
y_c=y_a+\frac{y_b-y_a}{x_b-x_a}(x_c-x_a).
[/tex]
Here, the absolute value is the problem. Without it, I get the following:
[tex]
x_c = \frac{d_{ac}}{d_{ab}}(x_b-x_a)+x_a
[/tex],
where one expression I replace with the Manhattan distance between A and B. However, I'm not sure if this is correct.
Any help on this is highly appreciated.
 
Last edited:

FAQ: Solve Manhattan Dist. Equation for 2D Line AB, Point C

What is the Manhattan Distance Equation for a 2D line?

The Manhattan Distance Equation for a 2D line is a formula used to calculate the distance between two points on a 2D plane using only the horizontal and vertical components. It is also known as the Taxicab Distance or L1 Distance.

How do you solve the Manhattan Distance Equation for a 2D line?

To solve the Manhattan Distance Equation, you will need to know the coordinates of two points, A and B, on the line as well as the coordinates of a third point, C, that is not on the line. Once you have these coordinates, you can plug them into the equation: |x2 - x1| + |y2 - y1| = |x2 - x3| + |y2 - y3|, where (x1, y1) and (x2, y2) are the coordinates of points A and B, and (x3, y3) is the coordinate of point C.

What does the solution to the Manhattan Distance Equation represent?

The solution to the Manhattan Distance Equation represents the shortest distance between the 2D line AB and the point C. This distance is measured along the horizontal and vertical axes, rather than a straight line.

Can the Manhattan Distance Equation be used for lines in 3D space?

No, the Manhattan Distance Equation is only applicable for 2D lines. In 3D space, the distance between two points is calculated using the Pythagorean Theorem, taking into account the horizontal, vertical, and diagonal components.

Are there any other equations that can be used to find the distance between two points on a 2D plane?

Yes, there are other equations such as the Euclidean Distance Equation and the Chebyshev Distance Equation. However, the Manhattan Distance Equation is specifically useful for finding the distance between points in a city grid-like layout.

Similar threads

Back
Top