You might have a look at HtDP, Section 21: http://htdp.org/2003-09-26/Book/curriculum-Z-H-27.html#node_chap_21 David