- branch_velocity[0]+=random_factor*random(Random::SMOOTH_COSINE,1,f*splits,0.0f,0.0f);
- branch_velocity[1]+=random_factor*random(Random::SMOOTH_COSINE,2,f*splits,0.0f,0.0f);
-
- if(i%b==0)
- branch(
- i,
- 0,
- 0, // time
- stunt_growth, // stunt growth
- point,branch_velocity
- );
+ branch_velocity[0] += random_factor * random(Random::SMOOTH_COSINE, 1, f*splits, 0.0f, 0.0f);
+ branch_velocity[1] += random_factor * random(Random::SMOOTH_COSINE, 2, f*splits, 0.0f, 0.0f);
+
+ if((((i+1)*sprouts + steps/2) / steps) > branch_count) {
+ branch_count++;
+ branch(i, 0, 0, // time
+ stunt_growth, // stunt growth
+ point, branch_velocity);
+ }