vb怎么将多个点用光滑曲线连起来,并画出这条曲线的平均线
来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/06 03:14:42
vb怎么将多个点用光滑曲线连起来,并画出这条曲线的平均线
最好加上代码 平均线是穿过曲折直线的一条直线,
最好加上代码 平均线是穿过曲折直线的一条直线,
用贝塞尔曲线画就可以了
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function PolyBezierTo Lib "gdi32.dll " (ByVal hdc As Long,lppt As POINTAPI,ByVal cCount As Long) As Long
Private Sub Form_Paint()
Dim pts(0 To 6) As POINTAPI
'set the coördinates
pts(0).x = 22:pts(0).y = 33
pts(1).x = 66:pts(1).y = 55
pts(2).x = 177:pts(2).y = 88
pts(3).x = 199:pts(3).y = 111
pts(4).x = 299:pts(4).y = 222
pts(5).x = 80:pts(5).y = 333
PolyBezierTo Me.hdc,pts(0),6
End Sub
平均线 是个什么线?求出平均值后话直线吗?
那就lineto好了
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function PolyBezierTo Lib "gdi32.dll " (ByVal hdc As Long,lppt As POINTAPI,ByVal cCount As Long) As Long
Private Sub Form_Paint()
Dim pts(0 To 6) As POINTAPI
Dim pt(0 To 6) As POINTAPI
'set the co?rdinates
pts(0).x = 22:pts(0).y = 33
pts(1).x = 66:pts(1).y = 55
pts(2).x = 177:pts(2).y = 88
pts(3).x = 199:pts(3).y = 111
pts(4).x = 299:pts(4).y = 222
pts(5).x = 80:pts(5).y = 333
For n = 1 To 6
pt(n).x = (pts(n).x + pts(n - 1).x) / 2
pt(n).y = (pts(n).y + pts(n - 1).y) / 2
Next n
PolyBezierTo Me.hdc,pt(0),6
PolyBezierTo Me.hdc,pts(0),6
End Su
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function PolyBezierTo Lib "gdi32.dll " (ByVal hdc As Long,lppt As POINTAPI,ByVal cCount As Long) As Long
Private Sub Form_Paint()
Dim pts(0 To 6) As POINTAPI
'set the coördinates
pts(0).x = 22:pts(0).y = 33
pts(1).x = 66:pts(1).y = 55
pts(2).x = 177:pts(2).y = 88
pts(3).x = 199:pts(3).y = 111
pts(4).x = 299:pts(4).y = 222
pts(5).x = 80:pts(5).y = 333
PolyBezierTo Me.hdc,pts(0),6
End Sub
平均线 是个什么线?求出平均值后话直线吗?
那就lineto好了
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function PolyBezierTo Lib "gdi32.dll " (ByVal hdc As Long,lppt As POINTAPI,ByVal cCount As Long) As Long
Private Sub Form_Paint()
Dim pts(0 To 6) As POINTAPI
Dim pt(0 To 6) As POINTAPI
'set the co?rdinates
pts(0).x = 22:pts(0).y = 33
pts(1).x = 66:pts(1).y = 55
pts(2).x = 177:pts(2).y = 88
pts(3).x = 199:pts(3).y = 111
pts(4).x = 299:pts(4).y = 222
pts(5).x = 80:pts(5).y = 333
For n = 1 To 6
pt(n).x = (pts(n).x + pts(n - 1).x) / 2
pt(n).y = (pts(n).y + pts(n - 1).y) / 2
Next n
PolyBezierTo Me.hdc,pt(0),6
PolyBezierTo Me.hdc,pts(0),6
End Su
在Excel中画完xy的散点图之后怎么画趋势线啊?不是直接用光画曲线连起来的那种.事后必有重谢!
知道一些坐标,怎么用matlab画出曲线并计算出曲线的曲率.
知道了曲线的斜率怎么画出曲线的切线?
已知曲线C上的每一点到点A(0,-2)的距离与它到x轴的距离的差等于2,求这条曲线的方程,并画出这条曲线
CAD制图中已知一条样条曲线,而且已知将要画的切线的方向,要画出这段曲线的切线怎么画?
CAD制图中已知一条样条曲线比如说抛物线,而且已知将要画的切线的方向,要画出这段曲线的切线怎么画?
1、尝试绘制等高线:首先经过地形测量获得个点的海拔;把海拔相同的点用光滑的曲线连接起来,最后在每条高线上标出海拔.2、根
科学画图什么时候用光滑的曲线什么时候用折线
sketchUP 怎么画出圆形的曲线
已知两组不同的数据,怎么用Matlab画出两条对应的曲线?
【proe】【已知两条半径不等的曲线,怎么画出由它们组成的管道!
无数条等产量曲线与等成本曲线的切点连接起来的曲线是( ) A.无差异曲线 B.消费可能线 C.收入消费曲线