problème résolu voila le code:
Private Sub Command1_Click() Picture1.Line (Picture1.ScaleWidth / 2, 0)-(Picture1.ScaleWidth / 2, Picture1.ScaleHeight) Picture1.Line (0, Picture1.ScaleHeight / 2)-(Picture1.ScaleWidth, Picture1.ScaleHeight / 2)
Let xmin = -3 Let xmax = 3 Let ymin = -3 Let ymax = 3 Let nbintervalles = 100
For y = ymin To ymax Step 0.01 For i = 1 To nbintervalles Let xg = xmin + (i - 1) * (xmax - xmin) / nbintervalles Let xd = xg + (xmax - xmin) / nbintervalles If f(xg, y) * f(xd, y) < 0 Then Do Let xm = (xg + xd) / 2 If f(xg, y) * f(xm, y) < o Then Let xd = xm Else Let xg = xm End If Loop Until xd - xg < 0.0001 Let xecran = 200 * (xd - xmin) / (xmax - xmin) Let yecran = 200 - 200 * (y - ymin) / (ymax - ymin) Picture1.PSet (xecran, yecran) End If Next i Next y End Sub Function f(x, y) f = (x ^ 2 + y ^ 2 - 4) ^ 3 - 108 * y ^ 2 End Function
|