Creative Coder/Multimedia Artist/Performative Programmer : Engineering Thru Creative Means and Providing Experiences
The prompt for Genuary 2023 Day 9 is
Plants
Reworking and Remixing a Genuary2022 prompt entry by
Adding more branches to the tree structure from the p5js sketch
Credits/Code Based from : //https://p5js.org/examples/simulate-recursive-tree.html
Tweaked parameters to make it more chaotic & indy
Using Hydra as if the plants are growing in a different realm
Then showing different paths of growth in LiveCodingYoutube
Audio coded in SonicPi
WIth the various coding environments in this piece, I decided to name it
Digitally Fostered Plants
Digitally Grown But now alone For it not only seeks to breathe in the ozone But also the pixels that it sees in the photos For it is organically mentored But digitally fostered
//remix of the original recursive tree tutorial//https://p5js.org/examples/simulate-recursive-tree.html//Used the base of the other code and added some lines to represent a windy and chaotic type of movement in the treelet theta;
functionsetup() {
createCanvas(windowWidth, windowHeight);
}
functiondraw() {
if (second() % 15 > 12)
{
background(second%100);
}
elseif (second() % 15 < 12 && second() % 15 > 9)
{
background(135,206,236)
} else
{
background(58,36,59)
}
frameRate(12); // slow it down that it changes
strokeWeight(4.2)
stroke(100,200,100);
// using the mouseX as an interaction, changed to 140let a = (mouseX / width) * 140;
// Convert it to radians
theta = radians(a);
// Start the tree from the bottom of the screen
translate(width/2,height);
line(0,0,0,-17);
// must match the above code (-17)
translate(0,-17);
// Start the recursive branching! , with branch of 240
branch(260);
translate(0,-10);
branch(100);
push();
translate(-10,0);
branch(150);
branch(300);
pop();
}
functionbranch(h) {
// Each branch will between .66 and .71)
h *= random(0.45,0.85)
if (h > 2) {
push();
rotate(random(theta, theta + 0.5));
if (second() % 6 > 2)
{
stroke(100,200,100) //green ish
line(0, 0, 0, -h); // Branch
translate(0, -h);
}
line(0, 0, 0, -h);
translate(0, -h);
branch(h);
pop();
push();
rotate(random(theta, theta + 0.5));
if (second() % 6 > 4)
{
stroke(212,175,55) //gold ish
line(0, 0, 0, -h); // Draw the branch
translate(0, -h); // Move to the end of the branch
}
line(0, 0, 0, -h);
translate(0, -h);
branch(h);
pop();
}
}