If I interpret your graph correctly, then this is just the Pythagorean theorem
Where a and b are the length and height your right triangle, and c is the hypotenuse.
So your example, is 8 units long and 1.6 units high (4.6-3)
Then
If that is the case, I would find the slope of the hypotenuse by dividing the y value by the x value:
slope =
Find the distance from the angle to the line
8-5=3
Multiply the slope by the distance to find the height off of the base of the triangle
3*.2=.6
Add the distance from the base of the shape to the base of the triangle (this is given in the picture as 3)
.6+3=3.6
And so the height of the line in the middle of the shape is 3.6