Particle fountain: Difference between revisions
m
syntax highlighting fixup automation
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
|||
Line 18:
{{libheader|SDL}}
{{trans|Raku}}
<
#include <algorithm>
Line 254:
SDL_Quit();
return EXIT_SUCCESS;
}</
=={{header|Julia}}==
{{trans|Raku}}
<
mutable struct ParticleFountain
Line 384:
fountain()
</syntaxhighlight>
=={{header|Perl}}==
<
use strict; # https://rosettacode.org/wiki/Particle_fountain
Line 434:
}
$mw->after(1 => \&step);
}</
=={{header|Phix}}==
Line 441:
{{libheader|Phix/online}}
You can run this online [http://phix.x10.mx/p2js/Particle_fountain.htm here].
<!--<
<span style="color: #000080;font-style:italic;">--
-- demo\rosetta\Particle_fountain.exw
Line 566:
<span style="color: #000000;">main</span><span style="color: #0000FF;">()</span>
<!--</
=={{header|Raku}}==
Has options to vary the direction at which the fountain sprays, the "spread" angle and the color of the emitted particles.
<syntaxhighlight lang="raku" line>
use NativeCall;
use SDL2::Raw;
Line 750:
}
}
</syntaxhighlight>
[https://github.com/thundergnat/rc/blob/master/img/fountain-raku.mp4?raw=true Link to off-site .mp4 video]
Line 758:
{{libheader|DOME}}
{{libheader|Wren-dynamic}}
<
import "graphics" for Canvas, Color
import "math" for Math, Point
Line 896:
""")
var Game = ParticleDisplay.new(3000, 800, 800)</
|