VB编程怎样画出函数曲线?用到什么?
来源:百度知道 编辑:UC知道 时间:2024/06/15 23:50:36
建系画坐标轴后
For i=1 to 2000 step 0.1 '此处循环自己设定
picture1.pset (i,i*i+i+1) '解析式y=x^2+x+1
next i
Public Declare Function PolyBezier Lib "gdi32" Alias "PolyBezier" (ByVal hdc As Long, lppt As POINTAPI, ByVal cPoints As Long) As Long
Public Type POINTAPI
x As Long
y As Long
End Type
The PolyBezier function draws one or more Bézier curves.
BOOL PolyBezier(
HDC hdc, // handle to device context
CONST POINT *lppt, // endpoints and control points
DWORD cPoints // count of endpoints and control points
);
Parameters
hdc
[in] Handle to a device context.
lppt
[in] Pointer to an array of POINT structures that contain the endpoints and control points of the curve(s).
cPoints
[in] Specifies the number of points in the lppt array. This value must be one more than three times the number of curves to be drawn,