public static IList<Point> GetCircle(int thetaDiv)
{
IList<Point> circle;
if (!CircleCache.TryGetValue(thetaDiv, out circle))
{
circle = new PointCollection();
CircleCache.Add(thetaDiv, circle);
for (int i = 0; i < thetaDiv; i++)
{
double theta = Math.PI * 2 * ((double)i / (thetaDiv - 1));
circle.Add(new Point(Math.Cos(theta), -Math.Sin(theta)));
}
}
return circle;
}