*/
protected void genCurves() {
float factor = BEZIER_CURVE_FACTOR * length;
// normal vector to the edge
Vector n = new Vector(direction.y, -direction.x);
n.mult(factor);
// first control point
Vector v1 = new Vector(direction);
v1.mult(factor);
v1.add(new Vector(node1.getPosition()));
v1.add(n);
// second control point
Vector v2 = new Vector(direction);
v2.mult(-factor);
v2.add(new Vector(node2.getPosition()));
v2.add(n);
curves.add(new CubicBezierCurveImpl(
node1.getPosition(),
new PointImpl(v1),
new PointImpl(v2),