Posts: 2,177
Threads: 222
Joined: Apr 2022
Reputation:
103
Shoot first and shoot people who ask questions, later.
Posts: 2,696
Threads: 327
Joined: Apr 2022
Reputation:
217
You have to remember, I don't have birthdays anymore. Tomorrow is just the 3rd anniversary of my 17th birthday!
Posts: 301
Threads: 16
Joined: Apr 2022
Reputation:
51
happiest of birthdays to team Steve
Code: (Select All)
dim x(11,49),y(11,49)
dim n(11),a(11),v(11),d(11)
m=11
n(0)=49
a(0)=0.19999999999999962
v(0)=50
d(0)=0
x(0,0)=572:y(0,0)=165
x(0,1)=559:y(0,1)=153
x(0,2)=532:y(0,2)=137
x(0,3)=505:y(0,3)=123
x(0,4)=474:y(0,4)=115
x(0,5)=441:y(0,5)=108
x(0,6)=406:y(0,6)=104
x(0,7)=373:y(0,7)=103
x(0,8)=341:y(0,8)=103
x(0,9)=316:y(0,9)=108
x(0,10)=284:y(0,10)=117
x(0,11)=249:y(0,11)=129
x(0,12)=219:y(0,12)=146
x(0,13)=188:y(0,13)=161
x(0,14)=166:y(0,14)=175
x(0,15)=139:y(0,15)=190
x(0,16)=118:y(0,16)=206
x(0,17)=95:y(0,17)=226
x(0,18)=65:y(0,18)=249
x(0,19)=38:y(0,19)=277
x(0,20)=18:y(0,20)=328
x(0,21)=21:y(0,21)=369
x(0,22)=38:y(0,22)=414
x(0,23)=67:y(0,23)=429
x(0,24)=98:y(0,24)=446
x(0,25)=142:y(0,25)=459
x(0,26)=173:y(0,26)=453
x(0,27)=221:y(0,27)=448
x(0,28)=262:y(0,28)=436
x(0,29)=288:y(0,29)=429
x(0,30)=318:y(0,30)=411
x(0,31)=350:y(0,31)=387
x(0,32)=376:y(0,32)=373
x(0,33)=401:y(0,33)=360
x(0,34)=424:y(0,34)=343
x(0,35)=445:y(0,35)=332
x(0,36)=473:y(0,36)=312
x(0,37)=504:y(0,37)=291
x(0,38)=529:y(0,38)=272
x(0,39)=556:y(0,39)=248
x(0,40)=582:y(0,40)=229
x(0,41)=608:y(0,41)=205
x(0,42)=636:y(0,42)=180
x(0,43)=657:y(0,43)=162
x(0,44)=678:y(0,44)=137
x(0,45)=702:y(0,45)=111
x(0,46)=732:y(0,46)=76
x(0,47)=737:y(0,47)=41
x(0,48)=696:y(0,48)=60
n(1)=14
a(1)=0.19999999999999984
v(1)=110
d(1)=-0.2
x(1,0)=716:y(1,0)=79
x(1,1)=742:y(1,1)=18
x(1,2)=650:y(1,2)=81
x(1,3)=629:y(1,3)=96
x(1,4)=614:y(1,4)=111
x(1,5)=596:y(1,5)=128
x(1,6)=581:y(1,6)=151
x(1,7)=567:y(1,7)=178
x(1,8)=556:y(1,8)=200
x(1,9)=546:y(1,9)=230
x(1,10)=577:y(1,10)=258
x(1,11)=587:y(1,11)=289
x(1,12)=573:y(1,12)=319
x(1,13)=562:y(1,13)=347
n(2)=35
a(2)=6.199999999999998
v(2)=60
d(2)=-0.3
x(2,0)=570:y(2,0)=251
x(2,1)=594:y(2,1)=365
x(2,2)=542:y(2,2)=387
x(2,3)=512:y(2,3)=402
x(2,4)=520:y(2,4)=420
x(2,5)=501:y(2,5)=437
x(2,6)=468:y(2,6)=459
x(2,7)=458:y(2,7)=463
x(2,8)=426:y(2,8)=484
x(2,9)=387:y(2,9)=495
x(2,10)=351:y(2,10)=507
x(2,11)=321:y(2,11)=510
x(2,12)=290:y(2,12)=512
x(2,13)=234:y(2,13)=521
x(2,14)=186:y(2,14)=521
x(2,15)=140:y(2,15)=511
x(2,16)=107:y(2,16)=480
x(2,17)=132:y(2,17)=421
x(2,18)=151:y(2,18)=385
x(2,19)=176:y(2,19)=355
x(2,20)=203:y(2,20)=335
x(2,21)=219:y(2,21)=308
x(2,22)=244:y(2,22)=286
x(2,23)=272:y(2,23)=270
x(2,24)=303:y(2,24)=254
x(2,25)=331:y(2,25)=243
x(2,26)=360:y(2,26)=234
x(2,27)=391:y(2,27)=229
x(2,28)=422:y(2,28)=226
x(2,29)=469:y(2,29)=213
x(2,30)=505:y(2,30)=222
x(2,31)=538:y(2,31)=235
x(2,32)=546:y(2,32)=262
x(2,33)=546:y(2,33)=302
x(2,34)=500:y(2,34)=352
n(3)=28
a(3)=4.399999999999999
v(3)=85
d(3)=-0.3
x(3,0)=526:y(3,0)=261
x(3,1)=548:y(3,1)=299
x(3,2)=524:y(3,2)=338
x(3,3)=500:y(3,3)=365
x(3,4)=477:y(3,4)=380
x(3,5)=453:y(3,5)=403
x(3,6)=422:y(3,6)=420
x(3,7)=394:y(3,7)=431
x(3,8)=359:y(3,8)=446
x(3,9)=318:y(3,9)=474
x(3,10)=252:y(3,10)=489
x(3,11)=203:y(3,11)=479
x(3,12)=175:y(3,12)=441
x(3,13)=221:y(3,13)=405
x(3,14)=244:y(3,14)=383
x(3,15)=258:y(3,15)=356
x(3,16)=283:y(3,16)=321
x(3,17)=314:y(3,17)=301
x(3,18)=346:y(3,18)=280
x(3,19)=379:y(3,19)=268
x(3,20)=421:y(3,20)=257
x(3,21)=474:y(3,21)=250
x(3,22)=576:y(3,22)=237
x(3,23)=514:y(3,23)=329
x(3,24)=464:y(3,24)=339
x(3,25)=444:y(3,25)=334
x(3,26)=463:y(3,26)=300
x(3,27)=488:y(3,27)=301
n(4)=21
a(4)=2.8999999999999995
v(4)=5
d(4)=0.49999999999999994
x(4,0)=238:y(4,0)=584
x(4,1)=274:y(4,1)=580
x(4,2)=303:y(4,2)=573
x(4,3)=333:y(4,3)=566
x(4,4)=364:y(4,4)=556
x(4,5)=397:y(4,5)=546
x(4,6)=427:y(4,6)=534
x(4,7)=455:y(4,7)=522
x(4,8)=485:y(4,8)=503
x(4,9)=511:y(4,9)=484
x(4,10)=534:y(4,10)=464
x(4,11)=554:y(4,11)=441
x(4,12)=572:y(4,12)=416
x(4,13)=590:y(4,13)=390
x(4,14)=610:y(4,14)=365
x(4,15)=627:y(4,15)=338
x(4,16)=649:y(4,16)=313
x(4,17)=667:y(4,17)=287
x(4,18)=685:y(4,18)=262
x(4,19)=701:y(4,19)=236
x(4,20)=716:y(4,20)=210
n(5)=16
a(5)=1.3999999999999997
v(5)=85
d(5)=-0.3
x(5,0)=638:y(5,0)=329
x(5,1)=618:y(5,1)=356
x(5,2)=597:y(5,2)=378
x(5,3)=577:y(5,3)=401
x(5,4)=557:y(5,4)=429
x(5,5)=537:y(5,5)=452
x(5,6)=521:y(5,6)=478
x(5,7)=495:y(5,7)=512
x(5,8)=540:y(5,8)=510
x(5,9)=561:y(5,9)=494
x(5,10)=582:y(5,10)=478
x(5,11)=603:y(5,11)=458
x(5,12)=625:y(5,12)=445
x(5,13)=649:y(5,13)=432
x(5,14)=671:y(5,14)=385
x(5,15)=628:y(5,15)=408
n(6)=15
a(6)=1.9999999999999998
v(6)=50
d(6)=-0.2
x(6,0)=640:y(6,0)=424
x(6,1)=669:y(6,1)=386
x(6,2)=622:y(6,2)=400
x(6,3)=597:y(6,3)=415
x(6,4)=555:y(6,4)=445
x(6,5)=532:y(6,5)=493
x(6,6)=553:y(6,6)=527
x(6,7)=615:y(6,7)=514
x(6,8)=660:y(6,8)=471
x(6,9)=654:y(6,9)=438
x(6,10)=680:y(6,10)=424
x(6,11)=676:y(6,11)=406
x(6,12)=683:y(6,12)=388
x(6,13)=722:y(6,13)=397
x(6,14)=691:y(6,14)=422
n(7)=12
a(7)=2.8999999999999995
v(7)=60
d(7)=-0.25
x(7,0)=695:y(7,0)=402
x(7,1)=725:y(7,1)=415
x(7,2)=647:y(7,2)=449
x(7,3)=625:y(7,3)=486
x(7,4)=575:y(7,4)=550
x(7,5)=663:y(7,5)=520
x(7,6)=690:y(7,6)=488
x(7,7)=716:y(7,7)=458
x(7,8)=731:y(7,8)=435
x(7,9)=752:y(7,9)=413
x(7,10)=766:y(7,10)=386
x(7,11)=742:y(7,11)=408
n(8)=23
a(8)=1.6999999999999997
v(8)=60
d(8)=0.09999999999999999
x(8,0)=748:y(8,0)=402
x(8,1)=736:y(8,1)=415
x(8,2)=741:y(8,2)=411
x(8,3)=748:y(8,3)=421
x(8,4)=605:y(8,4)=618
x(8,5)=770:y(8,5)=446
x(8,6)=794:y(8,6)=426
x(8,7)=817:y(8,7)=419
x(8,8)=819:y(8,8)=404
x(8,9)=821:y(8,9)=382
x(8,10)=806:y(8,10)=376
x(8,11)=778:y(8,11)=386
x(8,12)=763:y(8,12)=409
x(8,13)=743:y(8,13)=441
x(8,14)=686:y(8,14)=481
x(8,15)=628:y(8,15)=520
x(8,16)=722:y(8,16)=506
x(8,17)=755:y(8,17)=501
x(8,18)=802:y(8,18)=492
x(8,19)=848:y(8,19)=472
x(8,20)=890:y(8,20)=444
x(8,21)=932:y(8,21)=408
x(8,22)=986:y(8,22)=296
n(9)=0
a(9)=2.8999999999999995
v(9)=60
d(9)=-0.25
n(10)=7
a(10)=0.7999999999999996
v(10)=5
d(10)=-0.5499999999999999
x(10,0)=588:y(10,0)=356
x(10,1)=619:y(10,1)=353
x(10,2)=649:y(10,2)=350
x(10,3)=683:y(10,3)=338
x(10,4)=711:y(10,4)=321
x(10,5)=736:y(10,5)=302
x(10,6)=757:y(10,6)=277
sw = 1024
sh = 600
screen _newimage(sw, sh, 32)
_title "Go Team"
line (0,0)-(sw,sh),_rgb(0,0,0),bf
for h=0 to 1
for k=0 to m
for t=0 to 1 step 0.001
bx = 0
by = 0
for i=0 to n(k)-1
bin = 1
for j=1 to i
bin = bin*(n(k) - j)/j
next
p = ((1 - t)^(n(k) - 1 - i))*(t^i)
bx = bx + bin*p*x(k,i)
by = by + bin*p*y(k,i)
next
r = (1.4 - 0.35*h)*a(k)*exp(0 - v(k)*(t - 0.5 - d(k))*(t - 0.5 - d(k)))
if r < 1 then r = 1
'#gr "place ";bx;" ";by
'#gr "circlefilled ";r
'finer mod (radius makes 2 pixel, size allows single pixel)
if r < 0.1 then r = 0.1
c = 235 - (h)*(35 + h*3) + (t<0.5)*(t)*210 + (t>0.5)*(1-t)*210
c2 = 235 - (h)*(35 + h*3) - (t<0.5)*(t)*190 - (t>0.5)*(1-t)*190
'circlef bx, by, r, _rgb(c2,c,0)
circle (bx, by), r, _rgb(c2,c,0)
next
next
next
sleep
system
sub circlef(x as long, y as long, r as long, c as long)
dim as long x0, y0, e
x0 = r
y0 = 0
e = -r
do while y0 < x0
if e <=0 then
y0 = y0 + 1
line (x - x0, y + y0)-(x + x0, y + y0), c, bf
line (x - x0, y - y0)-(x + x0, y - y0), c, bf
e = e + 2*y0
else
line (x - y0, y - x0)-(x + y0, y - x0), c, bf
line (x - y0, y + x0)-(x + y0, y + x0), c, bf
x0 = x0 - 1
e = e - 2*x0
end if
loop
line (x - r, y)-(x + r, y), c, bf
end sub
Posts: 2,177
Threads: 222
Joined: Apr 2022
Reputation:
103
Steve, Steve, did you post a reply? Sorry, I went blind from viewing your birthday cake.
Shoot first and shoot people who ask questions, later.
Posts: 1,272
Threads: 119
Joined: Apr 2022
Reputation:
100
Happy birthday!
New to QB64pe? Visit the QB64 tutorial to get started.
QB64 Tutorial
Posts: 207
Threads: 13
Joined: Apr 2022
Reputation:
52
Congratulations Steve, and best wishes for the future.
Posts: 383
Threads: 56
Joined: Apr 2022
Reputation:
13
Wine women and song all day long. Happy Birthday Steve
Posts: 372
Threads: 23
Joined: May 2022
Reputation:
56
09-25-2024, 09:37 AM
(This post was last modified: 09-25-2024, 09:37 AM by a740g.)
Happy birthday Steve!
Posts: 248
Threads: 44
Joined: May 2022
Reputation:
28
Happy birthday to you too, Steve!
Posts: 730
Threads: 120
Joined: Apr 2022
Reputation:
106
09-25-2024, 11:40 AM
(This post was last modified: 09-25-2024, 12:00 PM by Dav.)
Happy birthday, Steve! Have a good one.
- Dav
Code: (Select All)
Randomize Timer
Screen _NewImage(800, 600, 32)
For x = 1 To _Width Step 20
For y = 1 To _Height Step 20
Line (x, y)-Step(20, 20), _RGBA(Rnd * 255, Rnd * 255, Rnd * 255, 155), BF
Next
Next
Play "MBO2L4G8G8AG>C<B2G8G8AG>DC2<G8G8>GEC<BA2>P8F8F8ECDC2"
m$ = "HAPPY"
x = 200
For l = 1 To Len(m$)
size = 64 + Int(Rnd * 50)
letter& = _NewImage(size, size, 32)
_Dest letter&
clr& = _RGB(100 + Rnd * 155, 100 + Rnd * 155, 100 + Rnd * 155)
PPRINT Int(size / 2), 1, size, clr&, 0, Mid$(m$, l, 1)
_Dest 0
UnExplodeImage x, 100, letter&
PPRINT x + (size / 2) + 4, 104, size, _RGB(255, 255, 255), 0, Mid$(m$, l, 1)
PPRINT x + (size / 2), 100, size, clr&, 0, Mid$(m$, l, 1)
_FreeImage letter&
x = x + size
Next
m$ = "BIRTHDAY"
x = 50
For l = 1 To Len(m$)
size = 64 + Int(Rnd * 50)
letter& = _NewImage(size, size, 32)
_Dest letter&
clr& = _RGB(100 + Rnd * 155, 100 + Rnd * 155, 100 + Rnd * 155)
PPRINT Int(size / 2), 1, size, clr&, 0, Mid$(m$, l, 1)
_Dest 0
UnExplodeImage x, 250, letter&
PPRINT x + (size / 2) + 4, 254, size, _RGB(255, 255, 255), 0, Mid$(m$, l, 1)
PPRINT x + (size / 2), 250, size, clr&, 0, Mid$(m$, l, 1)
_FreeImage letter&
x = x + size
Next
m$ = "STEVE!"
x = 100
For l = 1 To Len(m$)
size = 64 + Int(Rnd * 64)
letter& = _NewImage(size, size, 32)
_Dest letter&
clr& = _RGB(100 + Rnd * 155, 100 + Rnd * 155, 100 + Rnd * 155)
PPRINT Int(size / 2), 1, size, clr&, 0, Mid$(m$, l, 1)
_Dest 0
UnExplodeImage x, 400, letter&
PPRINT x + (size / 2) + 4, 404, size, _RGB(255, 255, 255), 0, Mid$(m$, l, 1)
PPRINT x + (size / 2), 400, size, clr&, 0, Mid$(m$, l, 1)
_FreeImage letter&
x = x + size
Next
_Delay 1
back& = _CopyImage(_Display)
ExplodeScreen back&
_FreeImage back&
End
Sub UnExplodeImage (x, y, image&)
back& = _CopyImage(_Display)
pixels& = _Width(image&) * _Height(image&)
ReDim PixX(pixels&), PixY(pixels&)
ReDim PixXDir(pixels&), PixYDir(pixels&)
ReDim PixClr&(pixels&)
_Source image&
pix& = 0
For x2 = 0 To _Width(image&) - 1
For y2 = 0 To _Height(image&) - 1
PixClr&(pix&) = Point(x2, y2)
PixX(pix&) = x + x2
PixY(pix&) = y + y2
Do
PixXDir(pix&) = Rnd * 8 - Rnd * 8
PixYDir(pix&) = Rnd * 8 - Rnd * 8
If PixXDir(pix&) <> 0 And PixYDir(pix&) <> 0 Then Exit Do
Loop
pix& = pix& + 1
Next
Next
_Source 0
alloff& = 0
loopcont = 0
Do
For pix& = 0 To pixels& - 1
PixX(pix&) = PixX(pix&) + PixXDir(pix&)
PixY(pix&) = PixY(pix&) + PixYDir(pix&)
If PixY(pix&) < 0 Or PixY(pix&) > _Height Then
If PixX(pix&) < 0 Or PixX(pix&) > _Width Then
alloff& = alloff& + 1
End If
End If
Next
If alloff& > pixels& - 1 Then Exit Do
loopcount = loopcount + 1
Loop
For a = 0 To loopcount
_PutImage (0, 0), back&
For pix& = pixels& - 1 To 0 Step -1
PixX(pix&) = PixX(pix&) - PixXDir(pix&)
PixY(pix&) = PixY(pix&) - PixYDir(pix&)
Line (PixX(pix&), PixY(pix&))-Step(3, 3), PixClr&(pix&), BF
Next
_Limit 120
_Display
Next
End Sub
Sub ExplodeScreen (img&)
pixels& = _Width(img&) * _Height(img&)
Dim PixX(pixels&), PixY(pixels&)
Dim PixXDir(pixels&), PixYDir(pixels&)
Dim PixClr&(pixels&), PixGro(pixels&)
_Source img&
pix& = 0
For x2 = 0 To _Width(img&) - 1
For y2 = 0 To _Height(img&) - 1
PixClr&(pix&) = Point(x2, y2)
PixX(pix&) = x + x2
PixY(pix&) = y + y2
Do
PixXDir(pix&) = Rnd * 8 - Rnd * 8
PixYDir(pix&) = Rnd * 8 - Rnd * 8
If PixXDir(pix&) <> 0 And PixYDir(pix&) <> 0 Then Exit Do
Loop
If Int(Rnd * 200) = 2 Then
PixGro(pix&) = 2
Else
PixGro(pix&) = 1
End If
pix& = pix& + 1
Next
Next
_Source 0
For alpha = 0 To 225 Step .8
For pix& = 0 To pixels& - 1 Step 8
PixX(pix&) = PixX(pix&) + PixXDir(pix&)
PixY(pix&) = PixY(pix&) + PixYDir(pix&)
If PixX(pix&) > 0 And PixX(pix&) < _Width Then
If PixY(pix&) > 0 And PixY(pix&) < _Height Then
Line (PixX(pix&), PixY(pix&))-Step(PixGro(pix&), PixGro(pix&)), PixClr&(pix&), BF
End If
End If
If PixGro(pix&) > 1 Then
PixGro(pix&) = PixGro(pix&) + .05
If PixGro(pix&) > 10 Then PixGro(pix&) = 10
End If
Next
Line (0, 0)-(_Width, _Height), _RGBA(0, 0, 0, alpha), BF
_Limit 30
_Display
Next
End Sub
Sub PPRINT (x, y, size, clr&, trans&, text$)
orig& = _Dest
bit = 32: If _PixelSize(0) = 1 Then bit = 256
For t = 0 To Len(text$) - 1
pprintimg& = _NewImage(16, 16, bit)
_Dest pprintimg&
Cls , trans&: Color clr&
Print Mid$(text$, t + 1, 1);
_ClearColor _RGB(0, 0, 0), pprintimg&
_Dest orig&
x1 = x + (t * size): x2 = x1 + size
y1 = y: y2 = y + size
_PutImage (x1 - (size / 2), y1)-(x2, y2 + (size / 3)), pprintimg&
_FreeImage pprintimg&
Next
End Sub
|