private void mapToDisk() {
        diskSamples = new ArrayList<Vector2>(samples.size());
        float r;
        float phi;

        for (Vector2 sample : samples) {
            Vector2 sp = new Vector2(2 * sample.getX() - 1.0f, 2 * sample.getY() - 1.0f);

            if (sp.getX() > -sp.getY()) {               //Sector 1
                if (sp.getX() > sp.getY()) {
                    r = sp.getX();
                    phi = sp.getY() / sp.getX();
                } else {                                //Sector 2
                    r = sp.getY();
                    phi = 2 - sp.getX() / sp.getY();
                }
            } else {
                if (sp.getX() < sp.getY()) {            //Sector 3
                    r = -sp.getX();
                    phi = 4 + sp.getY() / sp.getX();
                } else {                                //Sector 4
                    r = -sp.getY();
                    phi = sp.getY() != 0.0f ? 6 - sp.getX() / sp.getY() : 0.0f;
                }
            }
            phi *= PI / 4.0f;
            diskSamples.add(new Vector2((float) (r * cos(phi)), (float) (r * sin(phi))));
        }
    }