public static Vector3f onUnitSphere() {

        float u = nextRandomFloat();
        float v = nextRandomFloat();

        // azimuthal angle: The angle between x-axis in radians [0, 2PI]
        float theta = FastMath.TWO_PI * u;
        // polar angle: The angle between z-axis in radians [0, PI]
        float phi = (float) Math.acos(2f * v - 1f);

        float cosPolar = FastMath.cos(phi);
        float sinPolar = FastMath.sin(phi);
        float cosAzim = FastMath.cos(theta);
        float sinAzim = FastMath.sin(theta);

        return new Vector3f(cosAzim * sinPolar, sinAzim * sinPolar, cosPolar);
    }
Returns a random point on the surface of a sphere with radius 1.0

@return A new {@link Vector3f} representing a random point on the surface of the unit sphere.
jme3-core/src/main/java/com/jme3/math/FastMath.java