title: Smooth radial gradient
body: <p>So, I'm trying to create a radial gradient (for static lighting in a game). I came up with this:</p>
  
  <pre><code>int step = 4;
  int forLen = (radius / step);
  g.setColor(new Color(0, 0, 0, intensity));
  for (int i = 0; i &lt; forLen; i++)
      g.fillOval(radius - i * step, radius - i * step, i * step * 2, i * step * 2);
  </code></pre>
  
  <p>But the result i get is this:</p>
  
  <p><img src="https://i.stack.imgur.com/XydpR.png" alt="enter image description here"></p>
  
  <p>I'd like to get a smoother gradient, like:</p>
  
  <p><img src="https://i.stack.imgur.com/EEM56.png" alt="enter image description here"></p>
  
  <p>I tried playing around with the step and the intensity, but i can't get something similar to the gradient above.
  What would be a good way of doing this??
  Thanks in advance!</p>