pacifico = loadFont("Pacifico-Regular.ttf");
nabla = loadFont("Nabla-Regular-VariableFont_EDPT,EHLT.ttf");
let words = ["Amour", "Lumière", "Beauté", "Silence", "Instant", "Âme", "Coeur", "Nature", "Infini", "Joie", "Fragilité", "Simplicité", "Grâce", "Solitude"];
createCanvas(windowWidth, windowHeight);
for (let j = 0; j < width * 0.0095; j++) {
for (let i = 0; i < 7; i++) {
let h = random(map(j, 0, 5, 20, 50), map(j, 0, 7, 70, 250));
let y = 0.7 * height + 10 + i * (j*3);
cFont = random() < 0.5 ? pacifico : nabla;
let leTextSize = random(map(j, 0, 4, 12, 26))
if (cFont === pacifico) {
text(random(words), x-leTextSize, y+leTextSize);
appleTree(x, y, h / 1.5, h);
drawingContext.setLineDash([3,1,2,4]);
stroke(0, "rgb(253, 245, 191)");
strokeWeight(width/height*15);
rect(0, 0, width, height);
function appleTree(x, y, w, h) {
stroke(254, 249, 215, 90);
line(x, y, x, y - h * 0.5);
strokeWeight(random(0.4,0.8));
for (let i = y0 + h * 0.2; i < y - h * 0.2; i += di) {
let theta = map(i, y0 + h * 0.2, y - h * 0.2, 0, PI);
function branch(x, y, l) {
for (let i = 0; i < 13; i++) {
bezier(x - dl * 0.50 * l, y + dy,
x + dl * 0.50 * l, y + dy);
for (let xPos = 0; xPos < width; xPos += 3) {
for (let yPos = 0; yPos < height; yPos += 5) {
let cloudAngle = noise(xPosOffset, yPosOffset) * TAU * 2 - cos(xPos / yPos) * 6;
let vectorDirection = p5.Vector.fromAngle(cloudAngle);
let noiseValue = noise(xPosOffset, yPosOffset) * random(50, 255);
translate(xPos + cos(yPos / 20) * 20, yPos);
rotate(vectorDirection.heading());
let circleSize = random(5, 25);
strokeWeight(random(1, 3));
stroke(noiseValue * 3, noiseValue * 5, noiseValue / 10 - yPos / 10, 25);
ellipse(0, 0, circleSize, circleSize);
function mousePressed() {
if (key === "s" || key === "S") {
saveCanvas("foret_de_mots", "png");