Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Hat - Archimedes Spiral
#1
C128 Version Posted On FaceBook Group: Basic Programming Language by Francesco Ferri
Edited for QB64pe by SierraKen

Code: (Select All)

'Hat - Archimedes' Spiral
'C128 Version Posted On FaceBook Group: Basic Programming Language by Francesco Ferri
'Edited For QB64pe by SierraKen

Screen _NewImage(800, 600, 32)
xp = 190: yp = 145
xr = 3.14 * 1.5
xf = xr / xp
zf = xr / yp
For ZI = -yp To yp
    ZT = ZI * xp / yp
    XL = Int(Sqr(Abs(xp * xp - ZT * ZT)) + .5)
    For XI = -XL To XL
        XT = Sqr(XI * XI + ZT * ZT) * xf
        YY = (Sin(XT) + Sin(XT * 3) * .4) * yp
        X1 = Int((XI + ZI + 140) / 2)
        Y1 = Int(YY - ZI + 90)
        PSet (X1 + 300, 270 - Y1 + 100), _RGB32(255, 255, 255)
    Next XI
Next ZI
Reply
#2
Nice. That's pretty cool looking math!

@SierraKen, you said you'd be interested in trying the game I wrote that included your ChatGPT globe code. Check it out here:

The Sentinel

Smile
Reply
#3
Thanks Ape. I replied to your Sentinel post. Smile
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PSET "hat" graphic from old ad in BYTE dcromley 26 6,655 02-06-2024, 10:49 PM
Last Post: CharlieJV
  Spining spiral wheel Dav 4 1,319 09-25-2023, 01:15 AM
Last Post: CharlieJV
  sb Spiral of ChatGPT fixed by kay63 trans and mod b+ bplus 0 593 01-04-2023, 05:19 PM
Last Post: bplus

Forum Jump:


Users browsing this thread: 1 Guest(s)