The initial value for diameter is D=0.6 (mean r=D/2=0.3).
g=0.42 is gravitation field strength at r=0.3
The gravitation field will not change if you increase the radius of the planet.
(The uniform mass outside radius r will not contribute to gravitation field).
I added an object (blue dot) and user can adjust it's mass with slider.
The gravitation force is shown as black arrow.
User can drag the object with mouse,too!
I hope this version is closer to what you need!