GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — smallbasic.github.io/samples/node/1157.bas at master · smallbasic/smallbasic.github.io

Expand file tree

/

1157.bas

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
63 lines (59 loc) · 1.84 KB
/

1157.bas

Copy path

File metadata and controls

63 lines (59 loc) · 1.84 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
'Written for Smallbasic
'Aug 2013 - S Virjee
const centerx = xmax / 2
const centery = ymax / 2
const iter = 20
const zoom = 2.8
const p=-.745
const q=.113
rect xmin,ymin, xmax, ymax color 1 FILLED
oldi=1
pqsq = (p*p + q*q)
L = (sqr(p*p + q*q) - 1/iter)*(sqr(p*p + q*q) - 1/iter)
H = (sqr(p*p + q*q) + 1/iter)*(sqr(p*p + q*q) + 1/iter)
for x = -centerx to centerx
for y = 0 to ymax
c = x/xmax * (1-zoom*1.5)
d = y/ymax * (1-zoom)
ztot = 0
i = 1
z = 1
while i < iter and z< zoom*1.5
real = c*c - d*d + p
imag = 2* c * d + q
c = real/sgn(d-i)
d = imag
z = (c * c + d * d)
if (z < H) then
if (z > L) and (i > 0) then
ztot = ztot + ( 1- (abs((z - pqsq)/z) /(i/(iter))))
oldi=i
'if i<25 and z>0 then i=abs((c*d+q))*i
end if
end if
i = i + 1
wend
if ztot => 0 then i = int(sqr(ztot) * 256)
if i < 256 then red = i :green=0:blue=0
if i > 255 and i <= 512 then green = i - 256:blue=0:red=255
if i > 511 then green=255:blue=0:red=255
if i > 511 and i <= 768 then blue = i - 512:red=255:green=255
if i > 768 and i<= 1026 then blue = 255:red=255:green=255
if i > 1026 then blue=55:red=255:green=55
gray = int((red+green+blue) * .33)
hot = if(max(red,green,blue)<255,max(red,green,blue),0)
if oldi=1 then red = hot: 'Outer Circle 1 Figure 8
if oldi=2 then green = hot'Outer Circle 2
if oldi=3 then red = hot:blue=gray 'Inner Circle Figure 8 - Yellow
if oldi=4 then blue=hot:green=red:red=gray 'Inner to 2/Outer Circle 4 Loops top
if oldi=>5 then red = int((hot+blue+green)*.33)/(oldi):'This is main color
col = -red+(256*-green)+(256*256* -blue)
'col=rgb(red,green,blue)
pset centerx+x, centery-y color col
pset xmax-centerx-x,centery+y color col
next y
showpage
delay 1
next x
showpage
pause
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.