please include function drawThoughtLine. static int drawThoughtArrow_size = 15; static void drawThoughtArrow(BufferedImage bg, BufferedImage img1, int x1, int y1, BufferedImage img2, int x2, int y2, Color color) { double cs = thoughtCircleSize(img2)/2-1; double dist = pointDistance(x1, y1, x2, y2); double arrowLen = drawThoughtArrow_size*drawArrowHead_length-1; Pt v = blendPoints(new Pt(x2, y2), new Pt(x1, y1), (cs+arrowLen)/dist); Pt p = blendPoints(new Pt(x2, y2), new Pt(x1, y1), cs/dist); Graphics2D g = imageGraphics(bg); g.setColor(color); g.setStroke(new BasicStroke(drawThoughtLine_width)); g.drawLine(x1, y1, v.x, v.y); drawArrowHead(g, x1, y1, p.x, p.y, drawThoughtArrow_size); g.dispose(); }