using System;
using System.Drawing;
public class Program
{
public static PointF[] FromPosition(float width, float row, float col)
float height = 2 * width / (float)Math.Sqrt(3);
// Get coordinate of upper left corner
float leftX = col * width + width / 2 * (row % 2);
float topY = row * height;
return new PointF[]
new PointF(leftX + width / 2, topY), // Top
new PointF(leftX + width, topY + height / 4), // Upper Right
new PointF(leftX + width, topY + height / 4 * 3), // Lower Right
new PointF(leftX + width / 2, topY + height), // Bottom
new PointF(leftX, topY + height / 4 * 3), // Lower Left
new PointF(leftX, topY + height / 4), // Upper Left
};
}
public static void Main()