Realizing polar function via Newtonian gravitation Let $r=f(\theta)$ be a smooth, $2\pi$-periodic function, representing
a curve star-shaped with respect to the origin.
Maybe something like this:
         

         
         
         
         

$r=f(2^\theta)-1.7$ (idea from here)


Which functions $f$ can be realized as the orbit of a particle of mass $m$
about a (much larger) mass $M$ at the origin,
with the usual Newtonian gravity force, $F = G m M / r^2$, but with $M=M(t)$ 
an arbitrary smooth function of time $t$?
In other words, if one could control variation of the origin mass, could that suffice
to match any smooth $f(\theta)$?
 A: Basically what you're saying is that the force $F(t)$ is always directed radially, but its magnitude varies arbitrarily.  Actually you didn't say $M > 0$, and in fact negative "mass" may be required in some cases.  Then the answer is yes.
In polar coordinates $(r,\theta)$, your assumption says that $$2 \dot{r} \dot{\theta} + r \ddot{\theta} = 0$$ Basically this is conservation of angular momentum. If $r = f(\theta)$, the chain rule says
$\dot{r} = f'(\theta) \dot{\theta}$, so $2 f'(\theta) \dot{\theta}^2 + f(\theta) \ddot{\theta} = 0$.  For any given function $f$ with $f > 0$, a solution of the differential equation $2 f'(\theta) \dot{\theta}^2 + f(\theta) \ddot{\theta}$ with, say, $\theta(0) = 0$ and $\dot{\theta}(0)=1$ gives us a motion that starts at $\theta = 0$ and stays on the curve $r = f(\theta)$.  Now the existence and uniqueness theorems for differential equations say that (if $f$ is smooth and $f > 0$ everywhere) a unique solution exists in some interval of time $t$.  Moreover, the only way such a solution will stop existing is that $\theta$ goes off to $\infty$ in finite time.  But we're assuming $f$ is periodic, and because of the conservation of angular momentum you have to come back to the starting position with the same speed as you started, so that won't happen. 
