- /
-
To All Pepperoni Lovers
on 21 Oct 2021
- 9
- 114
- 0
- 0
- 280
% Pepperoni generator
% Ratul Das - rd608@cam.ac.uk
f(4,0,0,1,.5,0); % base
f(3.5,0,0,1,.7,0); % cheese
% pepperoni generator
for A=1:3
for r=(1:3/A:20)*pi/10
f(.3,A,r,1,0,0);
end
end
% slicer
c=[1 5 9];
for i=c
for j=c
line([i 5],[j 5],'color','w');
end
end
axis equal off;
function []=f(c,A,r,x,y,z) %radius of circle = c; center at (5,5)
rectangle('Position',[5+A*cos(r)-c 5+A*sin(r)-c 2*c 2*c],'Curvature',[1,1],'FaceColor',[x y z]);
end