Wieso wird die Kurve verkehrt dargestellt? (also mit y = 0 als Höhepunkt)
Code: Alles auswählen
Wert = 500
CreateImage(0,Wert,Wert)
StartDrawing(ImageOutput(0))
Box(0,0,Wert,Wert,$FFFFFF)
Line(0,Wert/2,Wert,0)
Line(Wert/2,0,0,Wert)
For i = -Wert*10 To Wert*10
x.f = i/10
y.f = Pow(x,2) ;;<<<<<<---- y = x² ( f(x)=x² )
If y < Wert/2 And y > -Wert/2
Plot(x+Wert/2,y+Wert/2)
EndIf
Next i
StopDrawing()
SaveImage(0,"Kurve.bmp")
Und wie bekomme ich einen String von z.B.: "y=x^2+3x-2" in y=Pow(x,2)+3*x-2 ?¿?
MfG Tompazi