pictureBox2.CreateGraphics();
            Pen pen = new Pen(Brushes.Red);
            
//初始半径
            float r0 = 10;
            
//圆心
            float x0 = 100;
            
float y0 = 100;

            
//圆的宽度和高度
            float width = 0;
            
float height = 0;

            
float x = 0;
            
float y = 0;
            
//圆半径的递增数量
            float d = 20;

            
for (int i = 0; i < 10; i++)
            {             
                
//计算当前圆的宽度和高度
                width = x0 + r0 + d*i;
                height 
= y0 + r0 + d*i;
                
//计算当前圆的左上角顶点坐标
                x = x0 - width / 2;
                y 
= y0 - height / 2;
                
//画圆
                graphics.DrawEllipse(pen, x, y, width, height);
            }

相关文章: