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