Private Sub Form_Activate()
Dim x, y, z As Single
Scale (-20, 20)-(20, -20)
Line (0, 17)-(0, -17)
Line (18, 0)-(-18, 0)
For z = 0 To 15 Step 0.01
y = z * Sin(z)
x = z * Cos(z)
PSet (x, y)
Next z
Private Sub Form_Activate()
Dim x, y, z As Single
Scale (-20, 20)-(20, -20) ‘定义坐标系,窗体左上角坐标为 (-20,20),右下角坐标为 (20,-20)
Line (0, 17)-(0, -17) ’画线(纵轴),起始点坐标(0,17),终点(0,-17)
Line (18, 0)-(-18, 0) '画线(横轴),起始点坐标(18,0),终点(-18,0)
For z = 0 To 15 Step 0.01 循环画点
y = z * Sin(z) '取纵坐标值
x = z * Cos(z) '取横坐标值
PSet (x, y) ’画点
Next z