vb.net作业,画坐标轴及标尺,画y=sin(x)曲线
展开全部
Private Sub mainfrm_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim pt(200) As PointF
Dim a As Integer
For a = 0 To 200
pt(a).X = 50 * a
pt(a).Y = 200 - 50 * Math.Sin(a - 1)
Next
Me.CreateGraphics.DrawLine(Pens.Blue, 0, 200, 800, 200)
Me.CreateGraphics.DrawLine(Pens.Blue, 50, 0, 50, 600)
Me.CreateGraphics.DrawCurve(Pens.Blue, pt)
End Sub
Dim pt(200) As PointF
Dim a As Integer
For a = 0 To 200
pt(a).X = 50 * a
pt(a).Y = 200 - 50 * Math.Sin(a - 1)
Next
Me.CreateGraphics.DrawLine(Pens.Blue, 0, 200, 800, 200)
Me.CreateGraphics.DrawLine(Pens.Blue, 50, 0, 50, 600)
Me.CreateGraphics.DrawCurve(Pens.Blue, pt)
End Sub
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |