My second entry into this challenge, since external images are allowed, here's a rotozoom effect in 20 linesÃ, Ã, 8)
Compile with BlitzPlus *only*
Download executable ~ 345kb (http://www.rbraz.com/temp/Rbraz%20-%20Short%20Intro%20-%202.rar)
Graphics 320,240,32,2
image = LoadImage("Gravity.png")
Dim sinTable#(360),cosTable#(360)
For loop# = 0 To 359
sinTable(loop) = (Sin(loop)*1.5)*(Sin(loop)*1.5)
cosTable(loop) = (Cos(loop)*1.5)*(Sin(loop)*1.5)
Next
While Not KeyHit(1)
LockBuffer BackBuffer()
LockBuffer ImageBuffer(image)
For y = -99 To 100
For x = -159 To 160
WritePixelFast Abs(x+160),Abs(y+120),ReadPixelFast (Abs((x * Costable(angle) - y * Sintable(angle)) + 150) Mod 299,Abs((x * Sintable(angle) + y * Costable(angle)) + 150) Mod 299,ImageBuffer(image))
Next
Next
UnlockBuffer BackBuffer()
UnlockBuffer ImageBuffer(image)
If angle > 359 Then angle = 0 Else angle = angle + 1
Flip
Wend
Sweet :) Really nice work Rbraz.
Nice one Rbraz, glad to see this one make it in 20 linesÃ, ;D
Quite cool, I like it!
Thanks dudes ! ;D