public static void GenImage()
{
int size = 1000;
Bitmap image = new Bitmap( size, size );
ImageSpace i = new ImageSpace( size, size );
double b = 1.1;
i.XMin = -b; i.XMax = b;
i.YMin = -b; i.YMax = b;
Vector3D cen = HoneycombPaper.CellCenBall;
cen = H3Models.BallToUHS( cen );
Sphere[] simplex = Simplex( ref cen );
Sphere inSphere = InSphere( simplex );
using( Graphics g = Graphics.FromImage( image ) )
foreach( int[] reflections in AllCells() )
{
Sphere clone = inSphere.Clone();
foreach( int r in reflections )
clone.Reflect( simplex[r] );
Sphere ball = new Sphere();
Circle3D inSphereIdealBall = ball.Intersection( clone );
Circle3D inSphereIdealUHS = H3Models.BallToUHS( inSphereIdealBall );
Circle inSphereIdeal = new Circle { Center = inSphereIdealUHS.Center, Radius = inSphereIdealUHS.Radius };
using( Brush brush = new SolidBrush( Color.Blue ) )
DrawUtils.DrawFilledCircle( inSphereIdeal, g, i, brush );
}
image.Save( "threefifty.png", ImageFormat.Png );
}