public double getValue(double u, double v) {
        double nu = u;
        double nv = v;

        // mirror the u,v around the center so we only have to deal with the top 
        // left corner.
        if (nu > 0.5) {
            nu = 1 - nu;
        }

        if (nv > 0.5) {
            nv = 1 - nv;
        }

        //how far are we from the center of the 'corner' sphere
        double dist = GraphUtils.distance(nu, nv, radius, radius);
        
        //check we are in the corner sphere, or beyond it, and not negative
        if ((dist < radius || nu > radius || nv > radius) && (nu > 0 && nv > 0)) {
            return 1;
        } else {
            return 0;
        }
        
    }