Plasma effect: Difference between revisions

Content added Content deleted
(→‎{{header|Julia}}: larger png)
Line 1,123: Line 1,123:


function plasma(wid, hei)
function plasma(wid, hei)
for x in 1:wid, y in 1:hei
for x in -wid:wid, y in -hei:hei
sethue(parse(Colorant, HSV(180 + 45sin(x/19) + 45sin(y/9) +
sethue(parse(Colorant, HSV(180 + 45sin(x/19) + 45sin(y/9) +
45sin((x+y)/25) + 45sin(sqrt(x^2 + y^2)/8), 1, 1)))
45sin((x+y)/25) + 45sin(sqrt(x^2 + y^2)/8), 1, 1)))