; ono-circle.lsp 11june2009 dmemos ( define ( circle xm ym r ) ( set 'cy r ) ( set 'cx 0 ) ( set 'pd ( div (sub 5 (mul r 4)) 4)) ( cpoint xm ym cx cy ) ( while ( < cx cy ) ( inc cx ) ( if ( < pd 0 ) ( set 'pd ( + pd (* 2 cx ) 1 )) ( begin ( dec cy ) ( set 'pd (+ pd (* 2 ( - cx cy )) 1 )))) ( cpoint xm ym cx cy ) )) ( define ( cpoint xm ym cx cy ) ( point (+ xm cx) (+ ym cy )) ( point (- xm cx) (+ ym cy )) ( point (+ xm cx) (- ym cy )) ( point (- xm cx) (- ym cy )) ( point (+ xm cy) (+ ym cx )) ( point (- xm cy) (+ ym cx )) ( point (+ xm cy) (- ym cx )) ( point (- xm cy) (- ym cx )) )