svoid g22drawConnectingCurve(Graphics2D g, Pt start, Pt end, int clipAmount default 4) { var controlY = random(0, 40); var control = doublePt(avg(start.x, end.x), controlY); var path = new Path2D.Float; path.moveTo(start.x, start.y); path.quadTo(control.x, control.y, end.x, end.y); var color = oneOf(ll((Color.black), (Color.gray), (Color.red))); var g2 = (Graphics2D) g.create(); g2.setColor(color); if (clipAmount != 0) { Rect clip = rectFromPoints(start.x+clipAmount, 0, end.x-clipAmount, max(end.y, start.y)-clipAmount); print(+clip); g2.clipRect(clip.x, clip.y, clip.w, clip.h); } g2.draw(path); }