public void calculate(final int centerX, int centerY,
                          final int distance)
    {
        int x_off, y_off;

        final ShadowList shadows = new ShadowList();
        final ShadowList formerShadows = new ShadowList();

        for(int octant=0; octant < 8; octant ++) {
            Matrix transform = trans[octant];

            formerShadows.clear();
            shadows.clear();

            x_off = 1;

            while(x_off < distance) {
                int posX = x_off-1;
                int posY = 0;

                // save old shadows, we need last columns shadows while building
                // new shadows
                // we modify angles so we need a real copy

                formerShadows.deepCopy(shadows);

                boolean visible_row = false;
                y_off = 0;
                while(y_off < x_off) {
                    boolean visible_pos = fovPos(transform,
                                                 formerShadows,
                                                 shadows,
				                                 centerX, centerY,
                                                 posX, posY);

                    if(visible_pos) {
                        visible_row |= visible_pos;
                        int x = transform.multX(posX, posY);
                        int y = transform.multY(posX, posY);
                        destination.setCanBeSeen(x+centerX, y+centerY);
                    }

                    posY --;
                    y_off ++;
                }

                if(visible_row == false) {
                    break;
                }

                x_off ++;
            }
        } // for
    }