JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.5.11/p5.min.js"></script>
<script>
new p5(function (p) {
p.setup = function() {
p.createCanvas(500, 500);
p.background(250);// fond en gris clair
p.noFill();
p.ellipseMode(RADIUS);//les paramètres 3 et 4 seront le rayon du cercle
p.stroke('green'); // couleur du cercle
p.strokeWeight(1); // épaisseur du trait
for(let rayon = 10; rayon <= 250; rayon += 5) {
p.ellipse(250, 250, rayon, rayon);
}
}
}, "faisceauA");
</script>
<script>
new p5(function (p) {
p.setup = function() {
p.createCanvas(500, 500);
p.background(250);// fond en gris clair
p.noFill();
p.ellipseMode(RADIUS);//les paramètres 3 et 4 seront le rayon du cercle
p.stroke('orange'); // couleur du cercle
p.strokeWeight(1); // épaisseur du trait
for(let rayon = 10; rayon <= 250; rayon += 5) {
p.ellipse(250, 250, rayon, rayon);
}
}
}, "faisceauB");
</script>
<div id="faisceauA"></div>
<div id="faisceauB"></div>