% Bezier_examples.m displays some examples of Bezier curves clf; % clear the figure subplot(3,2,1); S = [[0.3 1]; [-0.4 1.8]; [-1 -0.4]; [0 0]]'; % Control points for S S = [S -S(:,3) -S(:,2) -S(:,1)]; % More points by symmetry Bezier(S,100,1); % Plot Bezier curve for S title('Letter S with 7 control points'); axis([-1 1 -2 2]); subplot(3,2,2); A = [[1 0.1]; [0 1]]; % Matrix for italic shear Bezier(A*S,100,0); % Bezier curve for sheared S title('Italic S'); axis([-1 1 -2 2]); subplot(3,2,3); D = [[0.2 0]; [0 0.2]]; % 1/5 scale matrix Bezier(D*S,100,0); % Bezier curve for sheared S title('S at one-fifth size'); axis([-1 1 -2 2]); subplot(3,2,4); D = [[0.2 0]; [0 0.2]]; % 1/5 scale matrix Bezier(D*A*S,100,0); % Bezier curve for sheared S title('Italic S at one-fifth size'); axis([-1 1 -2 2]); subplot(3,2,5); Post = [[0 0]; [0 1]]'; % post for letter P Loop = [[0 1]; [0.4 1]; [0.2 0.75]; [0.4 0.5]; [0 0.5]]'; % loop for letter P Bezier(Post,10,1); Bezier(Loop,100,1); title('Letter P in two parts, with control points'); axis([-1 1 -2 2]); subplot(3,2,6); Bezier(A*Post,10,1); Bezier(A*Loop,100,1); title('Italic letter P with control points'); axis([-1 1 -2 2]);