def resize(line, factor):
a = angle(line)<EOL>mx, my = middle(line)<EOL>d = length(line) * factor * <NUM_LIT:0.5><EOL>dx = cos(a) * d<EOL>dy = sin(a) * d<EOL>return mx - dx, my - dy, mx + dx, my + dy<EOL>
factor: relative length (1->no change, 2-> double, 0.5:half)