(iterations, smooth, points)
| 25 | |
| 26 | |
| 27 | def smooth_stroke(iterations, smooth, points): |
| 28 | for i in range(iterations): |
| 29 | new_points = list() |
| 30 | new_points.append(points[0]) |
| 31 | for j in range(1, len(points) - 1): |
| 32 | new_points.append(smooth / 2 * (points[j - 1] + points[j + 1]) + (1 - smooth) * points[j]) |
| 33 | new_points.append(points[-1]) |
| 34 | points = new_points |
| 35 | return points |
| 36 | |
| 37 | |
| 38 | def smooth_distribute_gp_layer(gp_layer, dist, smooth_iterations): |
no outgoing calls
no test coverage detected