Question: Plotting Fern , Help

January 21 2011 Sam54 5
Maple
0

Here is my code , could you please tell me where i'm going wrong... isn't plotting anything

Fern :=proc(n);
local pick,n;
n := NULL;
for n from 1 to n do 
pick := rand();
if pick < 0.01 then
x[n+1] := 0;
y[n+1] := 0.16*y[n];

else if pick < 0.01 + 0.85 then
x[n+1] := 0.85*x[n] + 0.04*y[n] + 0;
y[n+1] := -0.04*x[n] + 0.85*y[n] + 1.6;
else if pick < 0.01 + 0.85 + 0.07 then
x[n+1] := 0.2*x[n] - 0.26*y[n] + 0;
y[n+1] := 0.23*x[n] + 0.22*y[n] + 1.6;
else
x[n+1] := -0.15*x[n] + 0.28*y[n] + 0;
y[n+1] := 0.26*x[n] + 0.24*y[n] + 0.44;
end if;
end do:
n := n , [x[n+1],y[n+1];

plot(n(12500), axes=NONE, style=point, symbol=POINT, scaling=constrained, colour=green); 

Please Wait...