Sub coordinates(x As Single, y As Single, sx As Integer, sy As Integer, OnScreen As Boolean)
sx = Round((getmaxx / Rx) * x + ((-getmaxx / Rx) * X_max + getmaxx))
sy = Round((-getmaxxy / Ry) * y + ((getmaxy / Ry) * Y_min + getmaxy))
OnScreen = Not ((sx < 0) Or (sy < 0) Or (sx > getmaxx) Or sy > (getmaxy))
End Sub