DOWNLOAD PEACE.EXE a program that drawn a peace sign on a background of swirling rainbows. Save it to disk and then open it...
The picture is one of MILLIONS generated by the programs. Language=Visual Basic 4.0 by Microsnot
DOWNLOAD a different PROGRAM by clicking here... (the one used to generate the lovely picture below)
Some explanation of how it's done...
This snippit of code changes the color of a the lines gradually...draw a line, change the color a little... move the line a little, change color a little...repeat millions of times...
cnew = cnew + &H10002 'add a little to existing color
If cnew > &HFFFFFF Then cnew = cnew - &HFFFFFF
'test to see if color is larger than maximum value allowed
'IT'S a COLORWHEEL...
'this is an up-down counter that is used to move the endpoints of the lines...
i = i + ifactor
If i > 420 Then ifactor = -1
If i < -420 Then ifactor = 1
'first it increments to 420 then it decrements to -420
'then it increments up to 420 again...
'IT'S A "SAWTOOTH WAVEFORM GENERATOR"
Here is the code...
'you will need a form that is 640 wide by 480 tall called frmAni
'two buttons, cmdQuit and cmdStart
'a textbox called txtSpeed
Private Sub cmdQuit_Click()
Unload frmAni
End
End Sub
Private Sub cmdStart_Click()
frmAni.Scale (0, 480)-(640, 0)
Dim ha As Integer
Dim haf As Integer
haf = 1
Dim i As Integer
Dim ifactor As Integer
ifactor = 1
Dim ii As Integer
Dim iifactor As Integer
iifactor = -2
Dim iii As Integer
Dim iiifactor As Integer
iiifactor = 3
Dim c As Single
Dim cc As Single
Dim ccc As Single
Dim cnew As Single
Dim k As Integer
Dim kk As Integer
Dim speed As Integer
Dim sp As Integer
Dim slow As Integer
Dim Iranian As Integer
Dim forever As Integer
Dim eterniy As Integer
Dim colorspin As Integer
Dim test As Integer
Dim testf As Integer
Randomize
k = Int(Rnd * 500)
k = k - 250
kk = Int(Rnd * 400)
For colorspin = 1 To kk
cnew = cnew + &H1A357
If cnew > &HFFFFFF Then cnew = cnew - &HFFFFFF
ccc = ccc + &HA4201
If ccc > &HFFFFFF Then ccc = ccc - &HFFFFFF
Next colorspin
kk = kk - 200
For eternity = 1 To 1000
For forever = 1 To 1000
cnew = cnew + &H1A357
If cnew > &HFFFFFF Then cnew = cnew - &HFFFFFF
ccc = ccc + &HA4201
If ccc > &HFFFFFF Then ccc = ccc - &HFFFFFF
testf = 1800
For Iranian = -420 To 420 Step 5
test = test + 1
If test > testf + testf Then test = 0
ha = ha + haf
If ha > 218 Then haf = -1
If ha < -218 Then haf = 1
i = i + ifactor
If i > 420 Then ifactor = -1
If i < -420 Then ifactor = 1
ii = ii + iifactor
If ii > 380 Then iifactor = -1
If ii < -380 Then iifactor = 1
iii = iii + iiifactor
If iii < -600 Then iiifactor = 1
If iii > 600 Then iiifactor = -1
ccc = ccc + &H201
If ccc > &HFFFFFF Then ccc = ccc - &HFFFFFF
DoEvents
sp = Val(txtSpeed.Text)
cnew = cnew + &H10002
If cnew > &HFFFFFF Then cnew = cnew - &HFFFFFF
c = &HFFFFFF - ccc
frmAni.Line (320 - iii - k, 240 - ha + kk + ii)-(320 - k + ii, 240 - i + kk), cnew
frmAni.Line (320 + iii + k, 240 - ha + kk + ii)-(320 + k - ii, 240 - i + kk), cnew
frmAni.Line (320 - iii - k, 250 - ha + kk + ii)-(320 - k + ii, 230 - i + kk), vbBlack
frmAni.Line (320 + iii + k, 250 - ha + kk + ii)-(320 + k - ii, 230 - i + kk), vbBlack
frmAni.Line (320 + iii - k, 240 - ha - kk + ii)-(320 - k + ii, 240 - i + kk), cnew
frmAni.Line (320 - iii + k, 240 - ha - kk + ii)-(320 + k - ii, 240 - i + kk), cnew
frmAni.Line (320 + iii - k, 250 - ha - kk + ii)-(320 - k + ii, 230 - i + kk), vbBlack
frmAni.Line (320 - iii + k, 250 - ha - kk + ii)-(320 + k - ii, 230 - i + kk), vbBlack
frmAni.Line (320 + iii - k, 240 - ha - kk + ii)-(320 + k + ii, 240 + i + kk), cnew
frmAni.Line (320 - iii + k, 240 - ha - kk + ii)-(320 - k - ii, 240 + i + kk), cnew
frmAni.Line (320 + iii - k, 250 - ha - kk + ii)-(320 + k + ii, 230 + i + kk), vbBlack
frmAni.Line (320 - iii + k, 250 - ha - kk + ii)-(320 - k - ii, 230 + i + kk), vbBlack
frmAni.Line (320 - iii - k, 240 - ha + kk + ii)-(320 + k + ii, 240 + i + kk), cnew
frmAni.Line (320 + iii + k, 240 - ha + kk + ii)-(320 - k - ii, 240 + i + kk), cnew
frmAni.Line (320 - iii - k, 250 - ha + kk + ii)-(320 + k + ii, 230 + i + kk), vbBlack
frmAni.Line (320 + iii + k, 250 - ha + kk + ii)-(320 - k - ii, 230 + i + kk), vbBlack
frmAni.Line (320 - kk + ha + i, 240 - i - k)-(320 - k + ii, 240 - iii + kk), ccc
frmAni.Line (320 + kk - ha - i, 240 - i - k)-(320 + k - ii, 240 - iii + kk), ccc
frmAni.Line (320 - kk + ha - i, 240 + i - k)-(320 - k + ii, 240 - iii + kk), ccc
frmAni.Line (320 + kk - ha + i, 240 + i - k)-(320 + k - ii, 240 - iii + kk), ccc
frmAni.Line (320 - kk + ha - i, 240 + i - k)-(320 + k + ii, 240 + iii + kk), ccc
frmAni.Line (320 + kk - ha + i, 240 + i - k)-(320 - k - ii, 240 + iii + kk), ccc
frmAni.Line (320 - kk + ha + i, 240 - i - k)-(320 + k + ii, 240 + iii + kk), ccc
frmAni.Line (320 + kk - ha - i, 240 - i - k)-(320 - k - ii, 240 + iii + kk), ccc
frmAni.Line (320 - kk + ha + i, 250 - i - k)-(320 - k + ii, 230 - iii + kk), c
frmAni.Line (320 + kk - ha - i, 250 - i - k)-(320 + k - ii, 230 - iii + kk), c
frmAni.Line (320 - kk + ha - i, 250 + i - k)-(320 - k + ii, 230 - iii + kk), c
frmAni.Line (320 + kk - ha + i, 250 + i - k)-(320 + k - ii, 230 - iii + kk), c
frmAni.Line (320 - kk + ha - i, 250 + i - k)-(320 + k + ii, 230 + iii + kk), c
frmAni.Line (320 + kk - ha + i, 250 + i - k)-(320 - k - ii, 230 + iii + kk), c
frmAni.Line (320 - kk + ha + i, 250 - i - k)-(320 + k + ii, 230 + iii + kk), c
frmAni.Line (320 + kk - ha - i, 250 - i - k)-(320 - k - ii, 230 + iii + kk), c
For speed = 1 To (640 - i)
For slow = 1 To sp
Next slow
Next speed
Next Iranian
Next forever
Next eternity
End Sub