using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace yuxuan { public partial class Form1 : Form { public Form1() { InitializeComponent(); } privatevoid Form1_Load(object sender, EventArgs e) { } privatevoid Form1_Paint(object sender, PaintEventArgs pe) { //余玄曲线 int minX =0, maxX =360; constfloat PI =3.14F; int endX =0; float endY =0; Graphics g = pe.Graphics; Pen pen =new Pen(Color.Blue); for (int i = minX; i <= maxX; i +=1) { endX = i +1; endY =80*(float)Math.Cos(endX * PI /180)+80; g.DrawLine(pen, i, 80*(float)Math.Cos(i * PI /180)+80, endX, endY); } //正玄曲线 for (int i = minX; i <= maxX; i +=1) { endX = i +1; endY =80* (float)Math.Sin(endX * PI /180) +80+200; g.DrawLine(pen, i, 80* (float)Math.Sin(i * PI /180) +80+200, endX, endY); } //g.DrawLine(pen, 10, 100, 200, 100); } } }