This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: % quadrant 1 % N_cut = 4*N1cut; N % The area of the circle is approximately the total number of uncut tiles + % the number of cut tiles * fraction each cut tile is of a whole tile % circleArea = N_uncut + (f*N_cut); c % Pi approximation is circle area divided by the radius-squared % piApprox = (circleArea / (r^2)); p disp(sprintf('Via tiling, pi is approximately %5.7f.',piApprox)); d %%%%%%%%%%% Observations %%%%%%%%%%% % % For lower radius values (e.g. r = 2), higher f fractions seem to yield % better approximations for pi. For higher radius values (e.g. r = 50), % lower f fractions seems to yield better values. For mid range r values % (e.g. r = 10), the best fraction is around f = 0.6....
View Full Document
This note was uploaded on 09/12/2009 for the course CS 100 taught by Professor Fan/vanloan during the Fall '07 term at Cornell.
- Fall '07