Sampling dependent variables


I want to (uniformly) sample two coordinates x, y that lie within a circle, which are inputs to a stochastic function. It’s easiest to sample the r and theta coordinates and transform these to the Cartesian ones, but I’d like to apply HMC to find the posteriors for x and y. As I understand it this means they need to appear in pyro.sample() statements.

What’s the best way to go about this? Do I need to use HMC to sample r, theta and map these to samples from x and y later?