34 double dx, dy, adx, ady;
48 adx = dx > 0 ? dx : -dx;
49 ady = dy > 0 ? dy : -dy;
51 s1->
coord.
x * dx + s1->
coord.
y * dy + (dx * dx + dy * dy) * 0.5;
64 out_bisector(newedge);
71 static void doSeg(
Edge * e,
double x1,
double y1,
double x2,
double y2)
82 double x1, x2, y1, y2;
84 if (e->
a == 1.0 && e->
b >= 0.0) {
101 x1 = e->
c - e->
b * y1;
105 x1 = e->
c - e->
b * y1;
112 else if (y2 <=
pymax)
116 x2 = e->
c - e->
b * y2;
120 x2 = e->
c - e->
b * y2;
127 y1 = (e->
c - x1) / e->
b;
131 y1 = (e->
c - x1) / e->
b;
135 y2 = (e->
c - x2) / e->
b;
139 y2 = (e->
c - x2) / e->
b;
146 else if (x1 >=
pxmin)
150 y1 = e->
c - e->
a * x1;
154 y1 = e->
c - e->
a * x1;
161 else if (x2 <=
pxmax)
165 y2 = e->
c - e->
a * x2;
169 y2 = e->
c - e->
a * x2;
176 x1 = (e->
c - y1) / e->
a;
180 x1 = (e->
c - y1) / e->
a;
184 x2 = (e->
c - y2) / e->
a;
188 x2 = (e->
c - y2) / e->
a;
192 doSeg(e, x1, y1, x2, y2);
195 line(x1, y1, x2, y2);
void s1(graph_t *, node_t *)
void * getfree(Freelist *)
void addVertex(Site *s, double x, double y)
void makefree(void *, Freelist *)
Edge * gvbisect(Site *s1, Site *s2)
void endpoint(Edge *e, int lr, Site *s)
void freeinit(Freelist *, int)