function connected_lines_get_rnd_params() { return { start: new Point(Math.random(), Math.random()), offs: new Point(0.05, 0.05), num_steps: 5, }; } function connected_lines(params) { if(typeof params == 'undefined') { var params = connected_lines_get_rnd_params(); } var lines = []; for(var i=0; i<2; i++) { var x = params.start.x + i*params.offs.x; var y = params.start.y + i*params.offs.y; var path = new paper.Path({strokeWidth: 5, strokeColor: 'black'}); for(var s=0; s