public static Point2D.Double randomPointInCircle(double radius, Point2D.Double origin, double theta, double offset) {
        Random randomGen = new Random();
        
        if (origin == null) {
            origin = new Point2D.Double();
        }
        
        double u = (randomGen.nextDouble() * radius) + (randomGen.nextDouble() * radius);
        
        //2*PI is the entire circle. Multiplied by theta gives a subsection of that circle in standard position.
        //Multiply that by a random percent, and you get a random angle within that subsection.
        double t = (2 * Math.PI) * theta * randomGen.nextDouble();
        
        //Add the offset to that angle, and you have a random angle offset by the given number of radians from standard position.
        t += offset;
        
        double r;
        if (u > 1) {
            r = 2 - u;
        } else {
            r = u;
        }
        
        return new Point2D.Double((r * Math.cos(t)) + origin.x, (r * Math.sin(t)) + origin.y);
    }