• Welcome to Dark Bit Factory & Gravity.
 

Short Intro Challenge Keftales.

Started by Shockwave, June 11, 2006

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Shockwave

I had a line to spare so I added windowed mode so I could display the credits in the title bar :p

This effect is using the classic Keftales formula, I've added some attractive copper stlye colours, animated the colours, moved them around and done a real time zoom on it too.

Hope you like it :)


#DEFINE PTC_WIN
#Include Once "tinyptc.bi"
If( ptc_open( "DBF ZOOMING AND MOVING KEFTALES BY SHOCKWAVE^DBF *IN 20 LINES* ESC EXIT", 640, 480 ) = 0 ) Then End
dim shared buffer(640*480) as integer
dim shared as double zf
dim shared as integer mvx,mvy,gadd,gadd2,x,y
do             
    gadd=gadd+3
    gadd2=gadd2+20
    zf=.011+(.01*sin(gadd/191))
    mvx=499*sin(gadd/153)
    mvy=499*cos(gadd/131)
    for y=0 to 479       
    for x=0 to 640
        pwr=120+119*sin((((x+mvx)*(y+mvy))+gadd2) * zf)         
        buffer(x+(y*640))=rgb(pwr,pwr*y shr 9, pwr * y *culp)
    next
    next
ptc_update@buffer(0)
loop until inkey$<>""
Shockwave ^ Codigos
Challenge Trophies Won:

Tetra

 8) Nice going :) you managed to cram a lot of stuff into that one, particularly like the range of colors on the screen
Challenge Trophies Won:

Shockwave

It's really cool what can be done in 20 lines :)
Shockwave ^ Codigos
Challenge Trophies Won:

Rbz

Challenge Trophies Won:

Optimus

Heh,. keftales ;)
I like very much the colors.
Challenge Trophies Won:

Shockwave

Shockwave ^ Codigos
Challenge Trophies Won:

benny!

Quote from: Shockwave on June 11, 2006
...

...
        buffer(x+(y*640))=rgb(pwr,pwr*y shr 9, pwr * y *culp)
...


Sorry for bringing this topic up, but I currently try to fork code to add some more examples to TinyC5. Since I do not know Freebasic, what is the meaning of the culp multiplier ?
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

neriakX

unbelievable ... 20 lines. it's looking very nice! k++ for the source :)
cheers,
neriakX


Challenge Trophies Won:

Shockwave

Sorry Benny, it's old code!
That variable doesn't seem to do anything.. I've just forgotten to take it out :)
Shockwave ^ Codigos
Challenge Trophies Won:

combatking0

Quote from: Shockwave on October 29, 2011
That variable doesn't seem to do anything.. I've just forgotten to take it out :)

I do that all the time - often I'll build something on top of an older program, which itself was recycled, and before I know it I've got lines from a program I made 5 years ago lurking in new code :o
You are our 9001st visitor.
Challenge Trophies Won:

benny!

Quote from: Shockwave on October 29, 2011
Sorry Benny, it's old code!
That variable doesn't seem to do anything.. I've just forgotten to take it out :)

Alright, no worries. I just wanted to convert the code to javascript and don't wanted to make a mistake. Hope you don't mind if I use that code (credits are of course give to you).
[ mycroBLOG - POUET :: whatever keeps us longing - for another breath of air - is getting rare ]

Challenge Trophies Won:

Raizor

What is a keftale anyway? I googled and just found an old Kefren's demo :)
raizor

Challenge Trophies Won:

relsoft

Quote from: Raizor on October 29, 2011
What is a keftale anyway? I googled and just found an old Kefren's demo :)

This.
Challenge Trophies Won: