public static void visualize(Graphics g)
    {
        if (list == null)   return;
        list.reset();
        g.setColor(Color.red);
        while (list.hasNext())
        {
            AngleInterval ai = list.getNext();
            if ((int)ai.leftDist == 0 && (int)ai.rightDist == 0)
                continue;
            g.drawLine((int)(src.X() + Math.cos(ai.leftAngle) * ai.leftDist),
                    (int)(src.Y() + Math.sin(ai.leftAngle) * ai.leftDist),
                    (int)(src.X() + Math.cos(ai.rightAngle) * ai.rightDist),
                    (int)(src.Y() + Math.sin(ai.rightAngle) * ai.rightDist));
        }
    }