title: Generate irregular blob Shape in java
body: <p>I'm trying to generate a random irregular <code>java.awt.Shape</code> blob, something like the examples in the second answer (the one by Paul Gaborit) to <a href="https://tex.stackexchange.com/questions/126144/how-to-draw-a-irregular-circleshape">this question on tex.stackexchange.com</a>.</p>
  
  <p>If there is a way to start with an <code>Ellipse2D</code> and then modify that similar to how it is done in TeX in that answer, great.</p>
  
  <p>Otherwise, maybe I could do something like this?:</p>
  
  <pre><code>public Shape createShape(int pointCount, double max_deviation, int median_radius,
                           int[] center)
  {
      int[][] pathPoints = new int[pointCount][2];
      Random rand = new Random();
      for (int i=0;i&lt;pointCount;i++)
      {
          double angle = (2*Math.PI/((double)pointCount))*((double)i);
          double temp_deviation = (0.5-rand.nextDouble())*2.0*max_deviation;
          double temp_radius = median_radius+temp_deviation;
          int x = (int) Math.round(temp_radius*Math.cos(angle));
          int y = (int) Math.round(temp_radius*Math.sin(angle));
          pathPoints[i] = new int[] {x+center[0],y+center[1]};
      }
      // somehow make pathPoints into a Shape with smooth curves
      return shape;
  }
  </code></pre>
  
  <p>Still, that would only produce a crude initial blob. It would be nice if I could then introduce fined grained random ripples in that random shape.</p>