public Polygon ToPolygon(int offset = 0, float overrideWidth = -1)
{
var result = new Polygon();
var outRadius = (overrideWidth > 0
? overrideWidth
: (offset + Radius) / (float)Math.Cos(2 * Math.PI / CircleLineSegmentN));
for (var i = 1; i <= CircleLineSegmentN; i++)
{
var angle = i * 2 * Math.PI / CircleLineSegmentN;
var point = new Vector2(
Center.X + outRadius * (float)Math.Cos(angle), Center.Y + outRadius * (float)Math.Sin(angle));
result.Add(point);
}
return result;
}