CreateEquilateral
Introduction
Code Example
using FlatRedBall.Math.Geometry; int numberOfSides = 4;
float radius = 6;
float firstAngle = 0;
Polygon firstPoly = Polygon.CreateEquilateral(numberOfSides, radius, firstAngle);
firstPoly.Visible = true;
firstPoly.X = -8;
// Increase the number of sides:
numberOfSides = 60;
// Now let's make a high-resolution Circle:
Polygon secondPolygon = Polygon.CreateEquilateral(numberOfSides, radius, firstAngle);
secondPolygon.Visible = true;
secondPolygon.X = 8;
Last updated
Was this helpful?