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.015; j++) {
for (let i = 0; i < 15; i++) {
let h = random(map(j, 0, 5, 35, 80), map(j, 0, 14, 110, 350));
let y = 0.5 * height + 50 + i * (j*3);
cFont = random() < 0.5 ? pacifico : nabla;
let leTextSize = random(map(j, 3, 7, 16, 32))
if (cFont === pacifico) {
stroke(199, 199, 166, 95);
stroke(199, 199, 166, 95);
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(79, 109, 122, 35);
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 = -width * 1.05; xPos < width * 1.05; xPos += 3) {
for (let yPos = 0; yPos < height; yPos += 5) {
let cloudAngle = noise(xPosOffset, yPosOffset) * TAU * 2 - cos(xPos / yPos) * 1;
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(3, 35);
strokeWeight(random(1, 4));
stroke(noiseValue * 1.5, noiseValue * 2, noiseValue / 10 + yPos / 3.5, 77);
ellipse(0, 0, circleSize, circleSize);
function mousePressed() {
if (key === "s" || key === "S") {
saveCanvas("foret_de_mots", "png");