I don’t know much about math, so forgive me if this is an obvious / unnecessary question. Please feel free to point me towards any resource that might enlighten me. However I need to know this for a game I’m interested in developing.
Here’s what I’m wondering: If two lines are drawn at different angles but emerge from the same point, is there some constant for calculating how far apart those lines have become at some point along those lines?
I’ve drawn a dot to represent 90 degrees. I’ve drawn two lines from that point, one at 80 degrees and the other at 60 degrees. I know that after 5.2mm on the 60-degree line, and 4.9mm on the 80-degree, the two lines are 12mm apart.
What I can’t figure out is how to use that information to calculate the how far away the lines will be at some other theoretical point along one of them. I feel like that there’s some simple exponent for this, but I can’t figure this out.
Any help would be appreciated. Thanks.
The question as it stands, is not precise. Please clarify what you mean by “distance” between the lines, i.e. give a proper definition. It would be better if you could provide some diagram.
2 days ago
I mean if you draw a straight line between the two angles lines that emerge from the dot, how far would it be between them (in mm, cm, etc.)? Obviously the further up the lines you go, the length of the straight line will increase. That’s what I want to know – can you calculate the theoretical distance of that straight line just by knowing the angle of the other two lines and how far along those lines the straight line is?
– Lachy Vass
2 days ago
What you need is the cosine rule . cos(p) = (a^2+b^2-c^2)/2ab, where b is the side opposite to the angle p. Which gives you, c = sqrt(x^2+y^2-2xy*cos(20)) = “distance” between the two lines for your case. Here, x and y are the distances along the two lines. For further help with the cosine rule: https://en.wikipedia.org/wiki/Law_of_cosines
The distance of a point from a line is the perpendicular distance.
If you know the distance from the origin, all you need to do is to multiply that distance by the cosine of the angle it makes with those lines.
I am not sure if this is the answer to your question. I wish you could attach a diagram to the question.
2 days ago