Skip to content

Commit

Permalink
Nyt MainScript af 15:50
Browse files Browse the repository at this point in the history
Jaah!
  • Loading branch information
JonathanGundorph committed Nov 17, 2016
1 parent 24444dc commit b264564
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions MainScript.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,37 @@

%Sub system menu
if sId == 1
System = 'koch'
System = 'koch';
disp('You have chosen the Koch curve!')
N = input('Please enter amount of iterations: ')
LindenMayerString=LindIter(System,N)
N = input('Please enter amount of iterations: ','s');
N = str2double(N);
N = round(N);
while N < 0 || N >= 15 || isnan(N)
disp('Please choose an integer between 0 and 15!');
N = input('Please enter amount of iterations: ','s');
end
LindenmayerString=LindIter(System,N);
elseif sId == 2
System = 'sierpinski'
disp('You have chosen the Sierpinski triangle!')
N = input('Please enter amount of iterations: ')
LindenMayerString=LindIter(System,N)
disp('You have chosen the Sierpinski triangle!');
N = input('Please enter amount of iterations: ');
while N < 0 || N >= 15
disp('Please choose an integer between 0 and 15!');
N = input('Please enter amount of iterations: ');
end
LindenmayerString=LindIter(System,N);

end

if sId == -1
disp('404 file not found');

end
turtleCommands = turtleGraph(LindenmayerString, System ,N);

case 2
%% Generate plots
turtlePlot(turtleCommannds);
turtlePlot(turtleCommands);

case 3

Expand All @@ -55,4 +67,5 @@
end

end
disp('Success!')
disp('Success!')
clear

0 comments on commit b264564

Please sign in to comment.