Q:

Transforming the circle function to round mitered line segments

I am trying to achive fast, smooth, variable width lines in a graphics application. The goal is to draw a 2 segment line with a rounded corner in the middle.
Ultimately the goal would be to minimize the following:

The amount of quadrilaterals (or triangles if you find it easier to
think in terms of that.
Minimize the computation to find the points of the geometry

I will define the problem with points p0, p1, and p2. w1 would be the width of the rectangle through p0 and p1, and w2 would be the width of the rectangle between p1 and p2. the final goal would be to get a drawing such as this:

One of the first problems I have is calculating the position of the mitter in a situation where w1≠w2. I have seen the formula when both of the widths are equal but have never seen it extended for different widths.
The problem with the mitter based approach is when ∠p0p1p2 is very small the mitter gets extremely large. 
After calculating the two quads formed by the tree points the geometry is passed to a pixel shader and the goal would be to mathematically determine which pixels need to be shaved off to round the outer corner formed by the three points.
Here is the tricky part. In the pixel shader there is no conception of space. I can pass in things like angles or ratios etc but those must be used to interpret an interpolated xy value from 0 to one.

The above diagram shows my understanding of how the value is interpolated but the key take away is that it has no idea of what kind of shape it is forming just its distance from each of the vertices.
So the problem I have essentially is:
Given the 2 dimensional value representing a pixel's interpolated position figure out whether the pixel should be shaded or not.
You are welcome to use any specific values to help interpret and transform the interpolated value given in. 

A:

Here is a suggestion of how one might decide whether or not to shade a pixel on the inside or outside of the bend.

I'm thinking that the idea is to have a smooth curve from $A$ to $B$ which is tangent to the outer sides of the rectangles at the points $A$ and $B$.
This can be done in a smooth way by looking at the ratios of angles and moving smoothly between a distance of $W_1$ from $C$ to a distance $W_2$ from $C$.
For a given pixel at $X$ lying between the rays $AC$ and $AB$, define the ratio $r_X=\dfrac{\angle ACX}{\angle ACB}$.
Then $0\le r_X\le 1$.
Then for each such pixel $X$ define a width
$$ W_X=(1-r_X)\cdot W_1+r_X\cdot W_2 $$
Note that when $r_X=0$ then $W_X=W_1$ and when $r_X=1$ then $W_X=W_2$.
The idea is to shade pixel $X$ unless it is further from $C$ than $W_X$.
For the inside of the bend, label a point on $EC$ a distance $W_1$ from $C$ and a point on $CF$ a distance $W_2$ from $C$ (Sorry, I forgot to put those two points on the diagram).
Then one can do something similar for pixels inside the bend.
Define $s_Y=\dfrac{\angle ECY}{\angle ECF}$. (Note that $\angle ECF=\angle $ACB.)
Then define
$$ W_Y=(1-s_Y)\cdot W_1+s_Y\cdot W_2 $$
Then shade pixel $Y$ unless it is further from $C$ than $W_Y$.

