Skip to content

Instantly share code, notes, and snippets.

@fesh0r
Created February 23, 2021 20:09
Show Gist options
  • Save fesh0r/220e4ae052062f6bd59b1a601874e620 to your computer and use it in GitHub Desktop.
Save fesh0r/220e4ae052062f6bd59b1a601874e620 to your computer and use it in GitHub Desktop.
MODE8:OFF:PROCdc:tc%=TRUE
FORU=0TO639
x=U/256-1.25
FORV=0TO511
y=V/256-1
X=0:Y=X:Z=-2
s=y/9:B=9:R=1:G=2
80 d=FNd(X,Y,Z)
IFd<.04GOTO130
IFp>99GOTO160
X=X+x*d:Y=Y+y*d:Z=Z+d
GOTO80
130 s=(.03+FNd(X,Y+.02,Z-.02)-d)*3/(2+Z)^2
IFr<1.2R=8:G=6:B=4
IFY<-.8B=2:G=8+1/(p*p):R=G/2:IFp<1s=s/4
160 IFtc%PROCc(s*R,s*G,s*B)ELSEGCOL0,-(RND(1)<s*R)-(RND(1)<s*G)*2-(RND(1)<s*B)*4
PLOT69,U*2,V*2
NEXT,
REPEATUNTIL0
DEFFNd(s,t,q)p=s*s+q*q:r=SQR(p+t*t*4):a=r-1
b=t*30
h=t+1
IFh<a a=h:b=p*10
=a+.1*SINb
DEFPROCc(r,g,b)
IFr<0r=0ELSEIFr>1r=1
IFg<0g=0ELSEIFg>1g=1
IFb<0b=0ELSEIFb>1b=1
COLOUR15,r*255,g*255,b*255:GCOL0,15
ENDPROC
DEFPROCdc
FORc%=1TO7
COLOURc%,(c%AND1)*255,(c%AND2)DIV2*255,(c%AND4)DIV4*255
NEXT
ENDPROC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment