Jump to content

Image noise: Difference between revisions

→‎{{header|Processing Python mode}}: add sketch 2020-03 by Alexandre Villares
(Rename Perl 6 -> Raku, alphabetize, minor clean-up)
(→‎{{header|Processing Python mode}}: add sketch 2020-03 by Alexandre Villares)
Line 2,359:
text(frameRate, 5,15);
}</lang>
 
=={{header|Processing Python mode}}==
<lang python>black = color(0)
white = color(255)
 
def setup():
size(320, 240)
# frameRate(30) # 60 by default
 
 
def draw():
loadPixels()
for i in range(len(pixels)):
if random(1) < 0.5:
pixels[i] = black
else:
pixels[i] = white
 
updatePixels()
fill(0, 128)
rect(0, 0, 60, 20)
fill(255)
text(frameRate, 5, 15)</lang>
 
=={{header|PureBasic}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.