Image noise: Difference between revisions

Content added Content deleted
(add RPL)
Line 3,173:
end /*y*/ /* [↑] build the image. */
return</syntaxhighlight>
 
=={{header|RPL}}==
RPL can only handle 131x64 screens. Despite such a small size, displaying graphics is very slow: FPH (frames Per Hour) would be a more appropriate unit.
====HP 28/48 version====
≪ TICKS (0,0) PMIN (130,64) PMAX
'''DO'''
CLLCD
'''IF''' TICKS OVER - 8192 / B→R '''THEN'''
LAST INV 3 DISP '''END'''
0 130 '''FOR''' x
0 63 '''FOR''' y
'''IF''' RAND 0.5 > '''THEN''' x y R→C PIXEL '''END'''
'''NEXT NEXT'''
'''UNTIL''' 0 '''END'''
≫ '<span style="color:blue">NOISE</span>' STO
HP-28 users shall replace <code>TICKS</code> by a <code>SYSEVAL</code> call, which address value depends on their ROM version.
====HP-48G version====
From the HP-48G model, the graphics system has been completely reviewed, and so the commands:
≪ TICKS
'''DO'''
ERASE
'''IF''' TICKS OVER - 8192 / B→R '''THEN'''
LASTARG INV 1 →GROB PICT RCL {#0h #42h} ROT GOR PICT STO {#0 #0} PVIEW '''END'''
0 130 '''FOR''' x
0 63 '''FOR''' y
'''IF''' RAND 0.5 > '''THEN''' x R→B y R→B 2 →LIST PIXON '''END'''
'''NEXT NEXT'''
{#0 #0} PVIEW
'''UNTIL''' 0 '''END'''
≫ '<span style="color:blue">NOISE</span>' STO
FPS = 0.0095
 
=={{header|Ruby}}==