%%%%%%%%%%%%%%%%%%%%% Word driven tesselation %%%%%%%%%%%%%%%%%%% % % PTESS % Usage: PTESS(P0,word,ti,drawIP) % % Inputs: P0 initial polygon % word - the sequence of reflections to drive the tesellation % ti - title of tesselation % drawIP - draw initial polygon % % the sequence of reflections given by word are used to tile % the disc with the reflections of P0 function T = ptess(P0,word,ti,drawIP) % initializations I = sqrt(-1); P = P0; if (nargin >= 4) DIP = drawIP; else DIP = 1; end; boundary(ti,'','w'); if DIP plotpoly(P,'w'); end; word = word(:); n = length(word); for i = 1:n side = word(i); P2 = polyrefl(P, side); if (side >= 'a') plotpoly(P2,'w'); end; P = P2; end;