08-12-2025, 09:51 PM (This post was last modified: 08-12-2025, 09:53 PM by SierraKen.)
I know most of you have seen these colors before, as I have, but for some reason I haven't used them much myself yet. Today I found some color code from someone's post on FB and tried them out, using globe depth.
Press the Space Bar to make different ones or Esc to quit.
Code: (Select All)
'Bright Circle Colors
Screen _NewImage(800, 600, 32)
Randomize Timer
_Title "Press the Space Bar to make different ones or Esc to quit."
Do
For circles = 1 To 10
x = Rnd * 800: y = Rnd * 600: sz = .1
For s = sz + Rnd * 200 To sz Step -.1
Circle (x, y), s, _RGB32(&H8B, &H5C - s, &HF6)
Next s
x = Rnd * 800: y = Rnd * 600: sz = .1
For s = sz + Rnd * 200 To sz Step -.1
Circle (x, y), s, _RGB32(&HEC, &H48 - s, &H99)
Next s
x = Rnd * 800: y = Rnd * 600: sz = .1
For s = sz + Rnd * 200 To sz Step -.1
Circle (x, y), s, _RGB32(&H10, &HB9 - s, &H81)
Next s
x = Rnd * 800: y = Rnd * 600: sz = .1
For s = sz + Rnd * 200 To sz Step -.1
Circle (x, y), s, _RGB32(&H60, &HA5 - s, &HFA)
Next s
Next circles
Do: a$ = InKey$
If a$ = Chr$(27) Then End
Loop Until a$ = " "
Cls
Loop
Write name of program in 1st line to copy & paste & save filename.bas
Insert program pictures: press print-screen-shot button
Open paint & Paste & Save as PNG
Add picture file to program topic
Russia looks world from future. Big data is peace data.
I never recommend anything & always write only about myself
Sub drawBall (x, y, r, c As _Unsigned Long)
Dim rred As Long, grn As Long, blu As Long, rr As Long, f
rred = _Red32(c): grn = _Green32(c): blu = _Blue32(c)
For rr = r To 0 Step -1
f = .5 * (1 - rr / r) + .5
fcirc x, y, rr, _RGB32(rred * f, grn * f, blu * f)
Next
End Sub
'from Steve Gold standard
Sub fcirc (CX As Long, CY As Long, R As Long, C As _Unsigned Long)
Dim Radius As Long, RadiusError As Long
Dim X As Long, Y As Long
Radius = Abs(R): RadiusError = -Radius: X = Radius: Y = 0
If Radius = 0 Then PSet (CX, CY), C: Exit Sub
Line (CX - X, CY)-(CX + X, CY), C, BF
While X > Y
RadiusError = RadiusError + Y * 2 + 1
If RadiusError >= 0 Then
If X <> Y + 1 Then
Line (CX - Y, CY - X)-(CX + Y, CY - X), C, BF
Line (CX - Y, CY + X)-(CX + Y, CY + X), C, BF
End If
X = X - 1
RadiusError = RadiusError - X * 2
End If
Y = Y + 1
Line (CX - X, CY - Y)-(CX + X, CY - Y), C, BF
Line (CX - X, CY + Y)-(CX + X, CY + Y), C, BF
Wend
End Sub
08-23-2025, 03:33 PM (This post was last modified: 08-23-2025, 04:02 PM by DANILIN.)
Make it 3D
Code: (Select All)
Screen 12 ' krugi.bas DANILIN
c1 = 4: c2 = 1: s = 5: r = 78
d = 2 * r: x = 100 + d
For k = 1 To 10
For i = 1 To d Step s: Cls
For j = r To 22 Step -.3
Circle (x - r + i, 100 + r), j, c1
Next
For j = r To 22 Step -.3
Circle (x + r - i, 100 + r), j, c2
Next: _Display: _Delay .02: Next
Swap c1, c2: Next
Write name of program in 1st line to copy & paste & save filename.bas
Insert program pictures: press print-screen-shot button
Open paint & Paste & Save as PNG
Add picture file to program topic
Russia looks world from future. Big data is peace data.
I never recommend anything & always write only about myself