I’m currently using two lines extending from the same point to their separate points. What I’m trying to achieve is an inside set of parallel lines that extend no further than the distance equal to the point on the line that would be parallel to the other.
As shown on the image, the red lines are the original points, with the yellow lines being the inside sides, created from the position and angle of the red. As you can see the yellow lines are longer than I need them to be.
I’m guessing what you want, is at the end of the red line, you want a perpendicular line leading out to the yellow line? and the excess of the yellow line is to be cut off?
If so, the length of the yellow line on either side is the length of the red line minus the length of the blue line times to cosine of the angle between the blue line and the red line.
If that’s confusing, lets call the length of the red line x, the length of the yellow line y, the length of the blue line z, and the angle between the blue line and the red line d. Then the length of the yellow line y = x - z*cos(d)
Looks like you’re trying to calculate the angle between two points. While they’re stored as vectors, this will return a number, but not the angle you want. to find the angle between the two red vectors, you’ll need to use