%%%%%%%%%%%%%%%%%%%%% Word driven tesselation %%%%%%%%%%%%%%%%%%% % % CTESS % Usage: T = DTESS(p,q,r,word,ti,drawIT,T0,e) % % Inputs: p,q,r - real numbers with 1/p +1/q +1/r < 1 % see SCHWARTZ for the interpretation of p,q,r % word - the sequence of reflections to drive the tesellation % ti - title of tesselation % drawIT - draw initial triangle % T0 - optional starting triangle % e - optional erasure parameter, see below % e is a string composed of the following options % 'B' erase at beginning start with new boundary circle % 'b' do not erase at beginning % 'F' clear graphics at end % 'f' do not clear graphics at end % default is 'BF' % % the sequence of reflections given by word are used to tile the disc % with a p-q-r schwartz triangle function T = ctess(p,q,r,word,ti,drawIT,T0,e) % colour plotting options vc1 = 'r'; vc2 = 'y'; vc3 = 'g'; cc = 'y'; icc = 'k'; invisible = get(gcf,'Color'); verttxt = [inttostr(p) inttostr(q) inttostr(r)]; % initializations I = sqrt(-1); if (nargin >= 6) DIT = drawIT; else DIT = 1; end; if (nargin >= 7) T = T0; else T =schwartz(p,q,r); end; if (nargin < 8) e ='BF'; end; erase = [sum(e == 'B') sum(e == 'F')]; if erase(1) boundary(ti,'','w'); end; if DIT plottri(T,'w'); end; %plotvert(T,vc1,vc2,vc3); % remove comment character to plot vertices in colour %plotvrtt(T,verttxt); % remove comment character to plot vertex orders word = word(:); n = length(word); for i = 1:n side = word(i); T2 = trirefl(T, side); if (side >= 'a')&(side <= 'c') plottri(T2,'w'); pause(1); plottri(T2,'r'); %plotvert(T2,vc1,vc2,vc3); % remove comment character to plot vertices in colour %plotvrtt(T2,verttxt); % remove comment character to plot vertex orders end; T = T2; end; if erase(2) clf; end;