下载地址:
下载地址1(本站为飞网专业下载站,域名:down.cfei.net)
资源简介:
用C#绘制正弦曲线,要用到Form1_Resize,Form1_Paint两个方法,C#源代码 int x1, x2; double y1, y2; double a; Pen myPen = new Pen(Color.Blue, 3); x1 = x2 = 0; y1 = y2 = this.ClientSize.Height / 2; for (x2 = 0; x2 < this.ClientSize.Width; x2++) { a = 2 * Math.PI * x2 / this.ClientSize.Width; y2 = Math.Sin(a); y2 = (1 - y2) * this.ClientSize.Height / 2; e.Graphics.DrawLine(myPen, x1, (float)y1, x2, (float)y2); x1 = x2; y1 = y2; }
飞网下载站,免费下载共享资料,内容涉及教育资源、专业资料、IT资源、娱乐生活、经济管理、办公文书、游戏资料等。