title: JAVA draw regular polygon
body: <p>I am looking for an algorithm to draw regular polygon like triangle, quadrangle, pentagon, hexagon etc.</p>
  
  <p>I guess it`s basically dealing with the fact that all polygon points are located on the line of the circle.</p>
  
  <p>What`s the algorithm to calculate those N points for Polygon object?
  After drawing a regular polygon I need to draw another regular polygon based on the first one but rotated by K degrees.</p>