title: Python - Generate random vertices around center (x, y) position
body: <p>I haven't been able to find an article or an stackoverflow question around this subject as I need it.</p>
  
  <p>I'm making  2D game and I want to generate a random shaped asteroid. Every asteroid has a center, a <code>X, Y</code> position, I want t generate let's say 8 vertices around it (the number of vertices is variable)</p>
  
  <p><a href="https://i.stack.imgur.com/24q4M.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/24q4M.png" alt="enter image description here"></a></p>
  
  <p>If I can achieve this shape now I want to add a random element, let's say a variable and random distance from the center to create a random rock shape.</p>
  
  <p><a href="https://i.stack.imgur.com/Y2nRw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y2nRw.png" alt="enter image description here"></a></p>
  
  <p>I've researched some trigonometry concept called Polar to <strong>Cartisian Coordinates</strong> but haven't been able to figure out how to apply it to this goal. Although there's tutorials for it in Javascript, it uses libraries and functions that I would have to make in python from scratch.</p>
  
  <p><strong>EDIT:</strong> 
  So your answer is focused on explaining the formula to get the vertices around the center, these are the things that I already know how to do, </p>
  
  <p>1) Draw a polygon in the graphics library I'm using
  2) Get random numbers</p>
  
  <p>Thank you so much in advance!</p>