FERNwithDtAlgorithm
FERNwithDtAlgorithm
num_iterations = 13;
% Call the main function to generate and plot the Barnsley Fern
barnsley_fern(num_iterations);
function barnsley_fern(num_iterations)
S = [0, 0; 4, 0; 2, 4 * sqrt(3)/2; 0, 0]; % Triangle with vertices (0,0), (4,0), (2, height) and closing the loop
to the first point
figure;
axis equal;
hold on;
axis off;
for i = 1:num_iterations
% Apply transformations deterministically
end
hold off;
end
function new_S = apply_transformations(S, A1, t1, A2, t2, A3, t3, A4, t4)
end