The SDL extension module DECLARE and API constants will live in a separate include file and IMPORTed (only add once) at the top of the script. I don't know how far I'm going to go with this. If it continues to be this easy, we may end up with a nice SDL interface for SB that is cross platform. The nice part is I really don't have to write any new code and only interface to it.
' ScriptBasic Peacock
IMPORT sdl.inc
Window 700, 500, "Peacock Plume"
q = 1
q1 = 0.9997
v = 0.01
vv = 0.0004
xs = 750
ys = 730
xm = 650
ym = 180
br = -0.7393
bi = 0.117
ar = 0.0
ai = 0.0
_cos = cos(0.01)
_sin = sin(0.01)
t1 = Ticks()
FOR d = 1 TO 15000
tr = ar * ar - ai * ai + br
ti = 2 * ar * ai + bi
x = tr * xs + xm
y = ti * ys + ym
v = v + vv
q = q * q1
c = d ^ 2.1
Draw_Line x, y, x + (_cos * 50 * q), y + (_sin * 50 * q), c
ar = tr
ai = ti
NEXT
t2 = Ticks()
t3 = (t2 - t1) / 1000
CreateTerm
TermFont "./VeraMono.ttf", 12
TermSize 40, 2
TermPosition 10, 450
TermSetColor 0, 0, 0, 0
TermBorderColor 0, 0, 0, 0
FGColor 255,255,255,255
BGColor 0,0,0,0
TermClear
TermPrint FORMAT("%.4f", t3) & " Seconds\n"
TermPrint STR(d-1) & " Lines Drawn"
TermShow
UpdateRect
WaitKey