用vb编写的函数作图软件的代码: Const Pi = 3.1415926535 '定义圆周率 Dim a, wor '定义用于在Picture1上的一个位置打印字符函数 Private Function PrintWord(X, Y, Word As String) With Picture1 .CurrentX = X .CurrentY = Y .ForeColor = RGB(0, 0, 255) End With Picture1.Print Word End Function '定
绝对可以实现的 c# 绘制正弦函数 Bitmap bitM = new Bitmap(this.pictureBox1.Width, this.pictureBox1.Height); Graphics g = Graphics.FromImage(bitM); g.Clear(Color.White); const int size = 300; double[] x = new double[size]; Pen pen = new Pen(Color.Teal); //画正弦曲线的横轴间