private void pointsPanel_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{
Graphics g = e.Graphics;
using (Brush brush = new SolidBrush(Color.Blue))
{
// draw all points
for (int i = 0, n = points.GetLength(0); i < n; i++)
{
g.FillEllipse(brush, points[i, 0] - 2, points[i, 1] - 2, 5, 5);
}
}
}