• Welcome to Dark Bit Factory & Gravity.
 

Optical Illusion

Started by Clanky, August 31, 2008

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Clanky

Wow.. been a long time since I've been back.. or for the matter, come in contact with Yab!
Hello peeps!!!
Glad to see the site is still here and full of fantastic code and posts.

Here is, a 5 minute job of an optical illusion which I saw on a website. Is it good? Not sure. It works though lol. Hope you enjoy. Nothing fancy.


open window 640, 512

circles = 8
dim cx(circles), cy(circles), cxr(circles), cyr(circles)
dim cc(circles), cs(circles), ct(circles), ctg(circles)

setup()

sub setup()
size = 220
c = 0
for i = 1 to circles
cx(i) = 320: cy(i) = 256
cs(i) = size: size = size - 25
cc(i) = 1 - c: c = 1 - c
next
ctg(1) = 000
ctg(2) = 025
ctg(3) = 050
ctg(4) = 075
ctg(5) = 100
ctg(6) = 075
ctg(7) = 050
ctg(8) = 025
main()
end sub

sub main()
label loop
setdrawbuf db
db = 1 - db
setdispbuf db
clear window

for i = 1 to circles
ct(i) = ct(i) + 0.05
cxr(i) = cos(ct(i)) * ctg(i)
cyr(i) = sin(ct(i)) * ctg(i)

if cc(i) = 0 setrgb 1, 000, 000, 250
if cc(i) = 1 setrgb 1, 255, 255, 010
fill circle cx(i) + cxr(i), cy(i) + cyr(i), cs(i)
next
goto loop
end sub

He tilts, and his eyes are focused on the ground far below.. Wind? Angels? Men..

Shockwave

It looks superb!

It's like looking down into a wobbling stripy pot in 3D :D

NIce one!
Shockwave ^ Codigos
Challenge Trophies Won:

rain_storm

Cool its like a hypnodisc, what site did you see that on?

Challenge Trophies Won:

Galileo