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: % period P is defined to be 28 days P for x=(hc-r):d:(hc+r-d) % iterate through in x-direction w/ incr. d f for y=(vc-r+d):d:(vc+r) % iterate through in y-direction w. incr. d if (T<=(P/2))&&(T>=0) % T in days is less than or equal to 14 g = hc + (cos(2*pi*T/P))*(sqrt(r^2-((y-vc)^2))); if x <= g % Pt. is in dark region so draw dark square DrawRect(x,y-d,d,d, 'k'); end else % T in days is greater than 14 h = hc - (cos(2*pi*T/P))*(sqrt(r^2-((y-vc)^2))); if x >= h % Pt. is in dark region so make square dark 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