public void sublogic(int index) {
        Graphics2D g2 = (Graphics2D) bi.getGraphics();

        // We talked about this above...
        if (foci[index] == null) {
            if (DALLATONCE)
                return;
            else
                generateCircle(index);
        }
        
        Circle subject = foci[index];

        drawCircle(subject, g2);

        //let's inflate the circle now...
        subject.inflate();

        //if it's out of bounds, then:
        if (!inBounds(index)) {
            /* If we're not permuting, we can call finishCircle,
             * which adds the old subject circle to the others list and
             * sets the subject circle to null in the foci[] array.
             */
            if (!DPERMUTE) {
                finishCircle(index);
                return;
            }
            
            // HOWEVER, if we ARE permuting:
            
            //let's permute the circle's X and Y to get a new position...
            //first, let's store the old circle's info.
            double originalRad = subject.rad - DINFLATE;
            double originalX = subject.x;
            double originalY = subject.y;
            boolean corrected = false;

            /* This loop looks for a new circle position that is within the
             * boundaries and that does not intersect any other circles.
             * I'm pretty sure it prefers the top-right corner first...
             */
            outer:
            for (double xi : XPOSES) {
                for (double yj : YPOSES) {
                    subject.x = originalX + DINFLATE * xi;
                    subject.y = originalY + DINFLATE * yj;

                    if (inBounds(index)) {
                        corrected = true;
                        break outer;
                    }
                }
            }

            if (!corrected) {
                //if we couldn't fit the circle anywhere, then too bad...
                finishCircle(index);
            } else {
                //this is bad code duplication... but whatever.
                //We need to get rid of the old circle first.
                representation.setFrame(originalX - originalRad, originalY - originalRad, originalRad * 2, originalRad * 2);
                g2.setColor(Color.WHITE);
                g2.fill(representation);

                drawCircle(subject, g2);
            }
        }
    }