• Welcome to Dark Bit Factory & Gravity.
 

Short Intro Challenge Sine Dots

Started by Shockwave, June 11, 2006

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Shockwave

Two lines can be saved here, originally this was in 18 lines but I expanded it to 20 to get a speed gain.
This gives some really nice looking sine shade dots with a slight motion blur.

#Include Once "tinyptc.bi"
If( ptc_open( "20 LINE SINE DOTS BY SHOCKWAVE^DBF", 640, 480 ) = 0 ) Then End
dim shared buffer(640*481) as integer , buffer2(640*481) as integer, colours(500) as integer
for a=1 to 500
     colours(a)=rgb(a shr 3,a shr 2,a shr 1)
next
do             
     gadd=gadd+1
     for a=1 to 25000         
         X=(320+(319*sin((a+gadd)/150)))+((39*sin(GADD/180))*sin((a+gadd)/190))
         Y=(240+(139*cos((a-gadd)/145))+((39*sin(GADD/99))*cos((a-gadd)/45)))                           
         buffer2(X+(Y*640)) = buffer2(X+(Y*640))+100
         if buffer2(X+(Y*640)) > 500 then buffer2(X+(Y*640)) = 500
     next
     for a=0 to 640*480
         buffer(a)=colours(buffer2(a))
         buffer2(a) = buffer2(a) * .70         
     next
ptc_update@buffer(0)
loop until inkey$<>""
Shockwave ^ Codigos
Challenge Trophies Won:

Optimus

Challenge Trophies Won:

Tetra

#2
Looks nice, i like the cool colors usedÃ,  :)
Challenge Trophies Won:

Shockwave

Thanks, I wasn't going to post this but I liked the movements (accidental).
Shockwave ^ Codigos
Challenge Trophies Won:

Tetra

Looking at it again, the movement of those lines are really cool, its almost 3dÃ,  ;D
Challenge Trophies Won:

Rbz

Challenge Trophies Won:

Rattrapmax6

Nice, reminds me of one of those electric-lightning lamps....

>> 8) >> *Grabs monitor w/ demo playing* >>  O0 >> "Oops"...
-Rattra (x.t.r.GRAPHICS)

Shockwave

Shockwave ^ Codigos
Challenge Trophies Won:

Clyde

Now thats really clever. I didnt realize, the code posted was different from the attachment, wondered why people had movement and I didnt. Thats smart mate.
Still Putting The IT Into Gravy
If Only I Knew Then What I Know Now.


Challenge Trophies Won:

cirux

Thats really a cool effect, nice work.

Shockwave

Shockwave ^ Codigos
Challenge Trophies Won:

relsoft

Cool!! I like the motion blur effect. :*)
Challenge Trophies Won: