Considering this visualization:
f(x) is an intersecting line from A to B. (WORKS)
g(x) is a perpendicular line to f(x), meaning any point on g(x) is equidistant from points A and B and thus extrudes from A and B. (WORKS)
h(x) is a line parallel to f(x) that is t distance from any point on f(x). There are two possible lines t distance from f(x), so this line is the one that is further away from point C. (DOESN'T WORK)
Point C is the intersection between g(x) and h(x), meaning it is the vertex, away from C and on line g(x), which is equidistant from A and B and is t away from any point on f(x). This is our goal. (WORKS, BUT h(x) MESSES UP ITS POSITION DUE TO h(x) NOT WORKING AS INTENDED)
I am struggling to make h(x) be t distance from f(x) given different configurations of A and B. When f(x)'s slope is 0, the extrusion works perfectly, but as I move A or B as to increase f(x)'s slope, the distance between f(x) and h(x) goes from t to 0, meaning h(x) erroneously becomes closer to f(x) the higher the slope of f(x) instead of staying t distance away from f(x) the whole time.
Any help would be appreciated. I've included images below to demonstrate the issue, and my Desmos graph will definitely help as well with understanding the issue. Just move A or B around, and you will see how h(x) becomes closer to f(x). I just need to fix my formula for h(x) and everything will fall into place.
h(x) := {C.y < f(C.x) : t, -t} + f(x)
Format: {Condition : True, False}
I am guessing I need to multiply t or -t by the slope of f(x) in the above equation for h(x), but when I attempted to do so, the graph adopted some strange properties.
I look forward to hearing what you all have to say. Thank you!
Here's an explanation without trigonometry. From $$ \Delta x={\Delta y\over-m}\quad\text{and}\quad |\Delta x\cdot\Delta y|=|t|\cdot\sqrt{\Delta x^2+\Delta y^2} $$ you can get $\Delta y$.