151 |
float r = lerp(r0, r1, .5); |
float r = lerp(r0, r1, .5); |
152 |
th = r * thick_t.transform(ZVec(d / r, 0, 0)).x; |
th = r * thick_t.transform(ZVec(d / r, 0, 0)).x; |
153 |
|
|
154 |
a = angle_t.transform(ZVec(d / r, 0, 0)).x; |
a = atan(angle_t.transform(ZVec(d / r, 0, 0)).x); |
155 |
|
|
156 |
// XXX: prevent the connection from being thicker than the node |
// XXX: prevent the connection from being thicker than the node |
157 |
//if (th > 2 * r0) th = 2 * r0; |
//if (th > 2 * r0) th = 2 * r0; |
170 |
float at = asin((t + r2) / (r0 + r2)); |
float at = asin((t + r2) / (r0 + r2)); |
171 |
if (a > at) a = at; |
if (a > at) a = at; |
172 |
|
|
173 |
// XXX: interpolate angle to zero from the point of |
// XXX: interpolate the "tangent" angle to zero from the point of |
174 |
// "overlap" (i.e., where the beginning and end of the side |
// "overlap" (i.e., where the beginning and end of the side |
175 |
// of a fillet meet) to where the nodes coincide. |
// of a fillet meet) to where the nodes coincide. |
176 |
float f = d / (cos(aw) * r0); |
float f = d / (cos(aw) * r0); |