# Thread: Is distance from a point to the sides of any triangle injective to R^3?

1. ## Is distance from a point to the sides of any triangle injective to R^3?

This question was raised when I was attempting to create a Python program inspired by Trilinear coordinates.

*Typo: I meant bijective.

Given:
The user is able to move any vertices of the triangle. Point P is fixed.
The returned coordinate is the distances from point P to the sides of the triangle made by the vertices.
User is allowed to make degenerate triangles. Examples: Points collinear, all points concurrent.

Question: Does this allow the user, in principle, to generate any coordinate in R^3?

Note:
If the vertices in a non-degenerate triangle are fixed and only P can move, then a bijection doesn't exist between distances and R^3. Consider P on a line defined by two vertices. There exists an upper and lower bound of distances possible between the third point and point P.

I don't think it matters if P can move or not. This in effect only shifts where the triangle should be to produce the desired coordinate.

2. ## Re: Is distance from a point to the sides of any triangle injective to R^3?

When you say "distance from a point to the sides of the triangle" do you mean to the extended sides of the triangle? The distance from a point to a line is measured along the perpendicular from the point to the line. But with a line segment, that perpendicular to the line may not be in the line segment. In that case, the shortest distance from the point to the line segment would be to the nearest endpoint.

3. ## Re: Is distance from a point to the sides of any triangle injective to R^3?

Sorry, yes, I mean the extended sides of the triangle. Thank you for raising that distinction.

4. ## Re: Is distance from a point to the sides of any triangle injective to R^3?

Sorry, yes, I mean the extended sides of the triangle. Thank you for raising that distinction.
Suppose that $\ell: ax+by+c=0$ is your line and $P: (p,q)$ is a point then $D(\ell,P)=\dfrac{|ap+bq+c|}{\sqrt{a^2+b^2}}$

Now you do you need help getting the equations of the lines?

5. ## Re: Is distance from a point to the sides of any triangle injective to R^3?

I'm not sure what you mean exactly.

I can see the utility in describing the triangles defined by vertices as a set of line equations instead.
However, I'm at a loss at how this will be useful for my problem.

Here are some further thoughts as a result to what has been said, however.
- The equations of lines that describe a triangle cannot have the same slope unless those lines are concurrent. This might be useful in constructing a counterexample, a point in R^3 which cannot be constructed as described above.
- If I can show any distances-coordinate within a smaller region of R^3 can be constructed, I can apply scale factors for other coordinates in R^3
- Rotation of a triangle retains distances from point P, so if I set a base line, then I can consider the family of lines on one side of the base line only.

6. ## Re: Is distance from a point to the sides of any triangle injective to R^3?

This thread can be closed. The answer is yes. I was overthinking the problem.

The three distances from point P are free variables. Each perpendicular line can have its distance altered by moving a side closer / further away.
The restriction of the setup is that the angles between the lines allows a triangle, but this doesn't restrict distance length.