public Vector3f random(Vector3f result) {
        if (result == null) {
            result = new Vector3f();
        }

        // compute a random radius according to the ring area distribution
        float inner2 = innerRadius * innerRadius,
              outer2 = outerRadius * outerRadius,
              r = FastMath.sqrt(inner2 + FastMath.nextRandomFloat() * (outer2 - inner2)),
              theta = FastMath.nextRandomFloat() * FastMath.TWO_PI;
        up.cross(Vector3f.UNIT_X, b1);
        if (b1.lengthSquared() < FastMath.FLT_EPSILON) {
            up.cross(Vector3f.UNIT_Y, b1);
        }
        b1.normalizeLocal();
        up.cross(b1, b2);
        result.set(b1).multLocal(r * FastMath.cos(theta)).addLocal(center);
        result.scaleAdd(r * FastMath.sin(theta), b2, result);
        return result;
    }
<code>random</code> returns a random point within the ring.

@param result Vector to store result in
@return a random point within the ring.
jme3-core/src/main/java/com/jme3/math/Ring.java