function createLines(sourcePoint, targetPoint, vertices) {
        // make a flattened array of all points
        var points = [].concat(sourcePoint, vertices, targetPoint);
        return points.reduce(function(resultLines, point, idx) {
            // if there is a next point, make a line with it
            var nextPoint = points[idx + 1];
            if (nextPoint != null) {
                resultLines[idx] = g.line(point, nextPoint);
            }
            return resultLines;
        }, []);
    }
Transform start/end and vertices into series of lines
@param {g.point} sourcePoint start point
@param {g.point} targetPoint end point
@param {g.point[]} vertices optional list of vertices
@return {g.line[]} [description]