title: What is the algorithm behind the PDF cloud annotation?
body: <p>I've noticed that several PDF Annotation applications (Adobe Acrobat, Bluebeam, etc) have an algorithm for creating a cloud pattern around a polygon:</p>
  
  <p><a href="https://i.stack.imgur.com/t4l3D.png" rel="noreferrer"><img src="https://i.stack.imgur.com/t4l3D.png" alt="Cloud Annotation in PDF"></a></p>
  
  <p>When you drag the vertices of this polygon, the cloud pattern is recalculated:</p>
  
  <p><a href="https://i.stack.imgur.com/dPLNE.png" rel="noreferrer"><img src="https://i.stack.imgur.com/dPLNE.png" alt="Modified Cloud Annotation in PDF"></a></p>
  
  <p>Notice how the arcs are recalculated to wrap around the polygon. They are not being stretched or warped. Whatever algorithm used to define this seems to be an industry standard. Several PDF editors allow you to create this, and in each one the cloud arcs look the same when dragging the vertices.</p>
  
  <p>I am trying to create a WPF sample application that replicates this, but I can't seem to find the documentation anywhere for generating the cloud pattern. </p>
  
  <p>I'm quite fluent with graphic design and 2D programming, and I'm capable of creating the tool to drag the vertices around, but I need help with figuring out how to draw these arcs. It looks like a series of <code>ArcSegments</code> in a <code>PathGeometry</code>.</p>
  
  <p><strong>So my question would be, what's the algorithm to create these arcs around a polygon?</strong></p>
  
  <p>or</p>
  
  <p><strong>Where can I find the documentation for these industry-standard PDF patterns, drawings, and/or annotations? (Cloud, arrows, borders, etc)</strong></p>