Plasma effect: Difference between revisions
m
→{{header|Sidef}}: added link to output file
m (→{{header|Sidef}}: added link to output file) |
|||
Line 1,314:
method init {
img = %
}
method generate {
for y
var hue = (4 + sin(x/19) + sin(y/9) + sin((x+y)/25) + sin(hypot(x, y)/8))
img.setpixel(x => x, y => y, color => Hash(hsv => [360 * hue / 8, 1, 1]))
Line 1,332:
plasma.generate
plasma.save_as('plasma.png')</lang>
Output image: [https://github.com/trizen/rc/blob/master/img/plasma-effect-sidef.png Plasma effect]
|