{VERSION 2 3 "APPLE_PPC_MAC" "2.3" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 }{CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 } {CSTYLE "" -1 257 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 13 "A Smiley Face" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}{PARA 0 "" 0 "" {TEXT -1 120 "The cell below draws a smiley face using the tools and, most importantly, the etique tte discussed in the worksheets -- " }{TEXT 256 27 "Colors.mws, Objec ts.mws,ws " }{TEXT -1 4 "and " }{TEXT 257 13 "Etiquette.mws" }{TEXT -1 157 ". You may want to use this smiley face in the rest of this ch apter or to work with one that you design. Evaluate the next cell now to see this smiley face." }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 840 "\nwith(plots):\nwith(plottools):\n \noutline := seq(evalf([2 * cos(2 * Pi * k/40), 2.5 * sin(2 * Pi * k/4 0)]),\n k = 0..40):\n\nallpoints := [outline, [0,0], [- 0.5,1], [0.5,1], [-1.0, -0.7],\n [-0.5, -1.2 ], [0.5, -1.2], [1.0, -0.7]]:\n\nface := \n curve([seq(allpoints[k],k =1..41)], thickness = 3,\n color=COLOR(RGB, 0.4, 0.4, 0.4)):\n \nnose := disk(allpoints[42], 0.12, color=COLOR(RGB, 0.0, 0.0, 0.0 )):\nlefteye := disk(allpoints[43], 0.12, color=COLOR(RGB, 0.0, 0.0, \+ 1.0)):\nrighteye := disk(allpoints[44], 0.12, color=COLOR(RGB, 0.0, 0. 0, 1.0)):\n\nmouth :=curve([allpoints[45], allpoints[46], allpoints [47],\n allpoints[48]], thickness = 4,\n \+ color=COLOR(RGB, 1.0, 0.0, 0.0)):\n\ndisplay(face, nose, lefteye, righteye, mouth, \n axes=none, scaling=constrained);" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "1 0 0" 13 } {VIEWOPTS 1 1 0 1 1 1803 }