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

  • Context: Undergrad 
  • Thread starter Thread starter onako
  • Start date Start date
  • Tags Tags
    Line
Click For Summary
SUMMARY

The discussion focuses on deriving a Manhattan distance equation for a point C constrained to lie on the line segment AB defined by two points A and B in 2D space. The user has successfully formulated the Euclidean distance equation but encounters challenges with the absolute value terms in the Manhattan distance equation, specifically d_{ac}=|x_c-x_a|+|y_c-y_a|. The user seeks assistance in correctly incorporating the absolute values while maintaining the linear relationship defined by y_c=y_a+\frac{y_b-y_a}{x_b-x_a}(x_c-x_a). The goal is to ensure that point C maintains the order of points A, B, and C along the line.

PREREQUISITES
  • Understanding of 2D coordinate geometry
  • Familiarity with distance metrics, specifically Manhattan and Euclidean distances
  • Knowledge of linear equations and their graphical representations
  • Basic algebraic manipulation skills
NEXT STEPS
  • Research the properties of Manhattan distance in 2D geometry
  • Study methods for handling absolute values in algebraic equations
  • Explore linear interpolation techniques for constrained points on a line
  • Learn about geometric transformations and their applications in distance calculations
USEFUL FOR

Mathematicians, computer scientists, and engineers working on geometric algorithms, particularly those focused on distance calculations and point positioning in 2D space.

onako
Messages
86
Reaction score
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
To clarify some things: the manhattan distace is
<br /> d_{ac}=|x_c-x_a|+|y_c-y_a|<br />
and constraining point C to be on AB (the final solution should have on the line order of ABC or ACB)
<br /> y_c=y_a+\frac{y_b-y_a}{x_b-x_a}(x_c-x_a).<br />
Here, the absolute value is the problem. Without it, I get the following:
<br /> x_c = \frac{d_{ac}}{d_{ab}}(x_b-x_a)+x_a<br />,
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:

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
7K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 40 ·
2
Replies
40
Views
5K
  • · Replies 36 ·
2
Replies
36
Views
2K
  • · Replies 9 ·
Replies
9
Views
15K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K