Can anyone think of how to do this;

I have two lines z(o) = TAN(az) * (x(o) - ex) + ez and z(o) = TAN(az + wz) * (x(o) - ex) + ez

on one side they read all the points inside of the two line.

what I am having trouble with is the other side there needs to be base to the triangle. The base needs to have a slope of

-1/(tan(az + .5wz)), and I need to know the distance between one of the leg vertexes and a point made by a line passing though the vertex of the original two lines (ex, ez ) and a object (x(o), z(o)).

If you are unsure of what I need please ask; I how much it sucks to solve something hard just to find out the question was badly worded.