|
|
@ -6,6 +6,7 @@ function connected_lines_get_rnd_params() { |
|
|
|
offs_x: 0.05, |
|
|
|
offs_x: 0.05, |
|
|
|
offs_y: 0.05, |
|
|
|
offs_y: 0.05, |
|
|
|
num_steps: 5, |
|
|
|
num_steps: 5, |
|
|
|
|
|
|
|
line_distance: 7/500, |
|
|
|
}; |
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -40,9 +41,8 @@ function connected_lines(params) { |
|
|
|
var o1start = lines[1].getOffsetOf(lines[1].segments[i].point); |
|
|
|
var o1start = lines[1].getOffsetOf(lines[1].segments[i].point); |
|
|
|
var o1end = lines[1].getOffsetOf(lines[1].segments[i+1].point); |
|
|
|
var o1end = lines[1].getOffsetOf(lines[1].segments[i+1].point); |
|
|
|
|
|
|
|
|
|
|
|
// TODO param: conn lines density
|
|
|
|
var num_steps2_0 = (o0end - o0start) / params.line_distance; |
|
|
|
var num_steps2_0 = (o0end - o0start) / (7/500); |
|
|
|
var num_steps2_1 = (o1end - o1start) / params.line_distance; |
|
|
|
var num_steps2_1 = (o1end - o1start) / (7/500); |
|
|
|
|
|
|
|
var num_steps2 = Math.min(num_steps2_0, num_steps2_1); |
|
|
|
var num_steps2 = Math.min(num_steps2_0, num_steps2_1); |
|
|
|
for(var j=0; j<num_steps2; j++) { |
|
|
|
for(var j=0; j<num_steps2; j++) { |
|
|
|
var p0 = lines[0].getPointAt(o0start + (o0end-o0start) * (j/num_steps2)); |
|
|
|
var p0 = lines[0].getPointAt(o0start + (o0end-o0start) * (j/num_steps2)); |
|
|
|