Strange visual effect
Posted: Wed Mar 24, 2010 10:16 pm
When I tried to come up with a nice-looking noise, I stumbled upon this strange effect:
I know I have seen it before, does anyone know what it's called?
I have no idea why it happens, or why it's interlaced. If you got any other small visual effect you want to share, feel free.

Code: Select all
#w = 800
#h = 600
CreateImage(0, #w, #h, 24)
Procedure Noise(x, y)
Static salt = 'salt'
salt = salt ! x & y
ProcedureReturn salt
EndProcedure
Procedure UpdateImage()
StartDrawing(ImageOutput(0))
For x = 0 To #w-1
For y = 0 To #H-1
Plot(x, y, Noise(x, y))
Next
Next
StopDrawing()
EndProcedure
OpenWindow(0, 0, 0, #w, #h, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget)
UpdateImage()
ImageGadget(0, 0, 0, 0, 0, ImageID(0))
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
Break
EndSelect
ForEverI have no idea why it happens, or why it's interlaced. If you got any other small visual effect you want to share, feel free.