%%%%%%%%%%%%%%%%%%%%% Word driven quadilateral tesselation %%%%%%%%%%%%%%%%%%% % % QTESS % Usage: QTESS(r,s,t,u,h,word,ti,drawIQ,Q0) % % Inputs: r,s,t,u,h same inputs as qmtess % Q0 - optional initial quadrilateral % word - the sequence of reflections to drive the tesellation % ti - title of tesselation % drawIQ - draw initial quadrilateral % % the sequence of reflections given by word are used to tile % the disc with the reflections of Q0 function Q = qtess(r,s,t,u,h,word,ti,drawIQ,Q0) % initializations I = sqrt(-1); if (nargin >= 8) DIQ = drawIQ; else DIQ = 1; end; if (nargin >= 9) Q = Q0; else Q = qschwartz1(r,s,t,u,h); end; boundary(ti,'','w'); if DIQ plotpoly(Q,'w'); end; word = word(:); n = length(word); for i = 1:n side = word(i); Q2 = polyrefl(Q, side); if (side >= 'a') plotpoly(Q2,'w'); end; Q = Q2; end;