|
分類:[VB.NET/VB2005]
計算結果より曲線を描こうと思ってます。 下のプログラムでは、全ての点を通って曲線を描いてしまいます。 点を通らなくてもよいので滑らかな曲線(近似曲線)を描きたいと思うのですが、 分かりません。 よいアドバイスをお願いします。
Dim g As Graphics = e.Graphics g.PageUnit = GraphicsUnit.Millimeter
Dim point0 As New Point(40, 249) Dim point1 As New Point(50, 257) Dim point2 As New Point(60, 254) Dim point3 As New Point(70, 246) Dim point4 As New Point(80, 236) Dim point5 As New Point(90, 222) Dim point6 As New Point(100, 205) Dim point7 As New Point(110, 186) Dim point8 As New Point(120, 163) Dim point9 As New Point(130, 137) Dim point10 As New Point(140, 108)
Dim curvePoints As Point() ={point0, point1, point2, point3, point4, point5, _ point6, point7, point8, point9, point10}
g.DrawCurve(Pens.Black, curvePoints, 0.4)
|