This preview shows page 1. Sign up to view the full content.
Unformatted text preview: D d = 0.1; P = 28; P for x=(hc-r):d:(hc+r-d) f %for y=(vc-r+d):d:(vc+r) y=sqrt(r^2-x^2); if (T<=(P/2))&&(T>=0) g = hc + (cos(2*pi*T/P))*(sqrt(r^2-((y-vc)^2))); if x <= g %DrawRect(x,y-d,d,d, 'k'); DrawRect(x,,d,d, 'k'); end else h = hc - (cos(2*pi*T/P))*(sqrt(r^2-((y-vc)^2))); if x >= h DrawRect(x,y-d,d,d, 'k'); end end end end e...
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 University (Engineering School).
- Fall '07