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