Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Beautiful accident! Weird, take a look..
#28
It does though. Check it out. I modified his demo to use the lut and it got a boost of about 300,000 "fps"... :lol:


Code:
SCREEN 19, 32, 2' ,-1 I can't run gfxlib in full screen :(

'mangleberry pie    :D
#DEFINE Pi 3.14 '15926535897932

x! = 150
y! = 150
z! = 150

Dim tSin(360) as Single, tCos(360) as Single

For i = 0 to 360
tSin(i) = SIN(i * (Pi/180))
tCos(i) = COS(i * (Pi/180))
Next

centx = 400
centy = 300
LENS = 256 ' centz

ax = 0
ay = 0
az = 0
T! = TIMER
DO
   press$ = INKEY$  
   cx! = tCos(ax)
   sx! = tSin(ax)
   cy! = tCos(ay)
   sy! = tSin(ay)
   cz! = tCos(az)
   sz! = tSin(az)
  

   ny! = (y! * cx!)-(z! * sx!)
   nz! = (z! * cx!)+(y! * sx!)
   y! = ny!
   z! = nz!
   nz! = (z! * cy!)-(x! * sy!)
   nx! = (x! * cy!)+(z! * sy!)
   x! = nx!
   nx! = (x! * cz!)-(y! * sz!)
   ny! = (y! * cz!)+(x! * sz!)
  
   ax += 1
   If ax > 360 then ax -= 360
  
   ay += 1
   If ay > 360 then ay -= 360
  
   az += 1
   If az > 360 then az -= 360
  
   PSET (centx + nx!, centy - ny!), RGB(z!, z!, z! )
   F += 1
LOOP UNTIL press$ = CHR$(27)
PRINT "Average FPS:"; F / (TIMER - T!)
SLEEP
Reply


Messages In This Thread
A Beautiful accident! Weird, take a look.. - by Anonymous - 03-26-2005, 01:16 PM
you asked for it... XD - by Anonymous - 03-26-2005, 02:17 PM
A Beautiful accident! Weird, take a look.. - by Anonymous - 03-26-2005, 04:00 PM
A Beautiful accident! Weird, take a look.. - by Dr_Davenstein - 03-28-2005, 03:20 AM
A Beautiful accident! Weird, take a look.. - by Anonymous - 03-28-2005, 05:35 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)