raster.art
SEARCH
Create Account
No wallets connected. Please connect a wallet first.
Chaotic Trees V4
chaos_hunter, 2022on fxhash
Platforms
fxhash
Description

Trees are often found on mountains, however these trees were found "in" mountains - Mint #8 and #5 of my "Mt Chaos" happened to look like trees more than mountains. Tweaking the code around those parameters resulted in this new fractal tree generator.

Essential code that generates the trees is just:

// Set constants A,B,Q,F,G,XOFF for(t = 0; t < 8; t+=1/60) { a = b = 1; ITER = 3e4; with(Math) for(let i = 0; i < ITER; i++) { r = 0 | (i < ITER/2? i < ITER*.4 ? 2.5: 3:4) * random(); L=i/ITER x.fillStyle = HSLA(LEAF-(L**(1-F/2))(LEAF-TRUNK), 90, 25,.4) a += B * (r - a + b * sin(a * Q + b) + F + cos(B+A)/4); b += A * (1 - a * b + cos(a * 3.1 + b + G) - cos(B-A)/7); X = a * W * 1.5 - W * 1.7; Y = b * H * 1.35 - H * .4; Y -= sin(.4(X/W+XOFF)) * H X-= W*XOFF x.fillRect(X, Y, 1, 1); } }