| --> |
|---|
A random number r is generated 0 ≤ r ≤ 1
Start with x=0.5 and y= 0.0, and use the linear equations:
if r < A xn = 0.5, yn = 0.27*y;
if r>A and r ≤ B xn = -0.139*x + 0.263*y + 0.57, yn = 0.246*x + 0.224*y - 0.036if r>B and r ≤ C xn = 0.17*x - 0.215*y + 0.408, yn = 0.222*x + 0.176*y + 0.0893
else xn = 0.781*x + 0.034*y + 0.1075, yn = -0.032*x + 0.739*y + 0.27
To see the effects of changing the probabilities for the equations:
Select A with west slider (see equations)
Select B with east slider
Select C with north slider
And press start to see the new fern.