вот примерно то что мне надо
Graphics 800,600,0,0
Global x0# = 200
Global y0# = 100
Global x1# = 400
Global y1# = 300
Function f(x#)
If x < (x1-x0)/1.5 Then
Return x - x/2
Else
Return x - ((x1-x0)-x)
End If
End Function
While Not (KeyHit(key_escape) Or AppTerminate())
SetColor 255,255,255
DrawLine x1,y0,x1,y1
DrawLine x0,y1,x1,y1
SetColor 128,128,128
For x# = x0 To x1
DrawRect x,-f(x-x0)+y1,1,1
Next
x# = Rand(x0,x1)
y# = Rand(-f(x-x0)+y1,y1)
SetColor 255,0,0
DrawRect x,y,1,1
Flip
Wend
всем спасибо, все свободны
