{VERSION 5 0 "IBM INTEL NT" "5.0" } {USTYLETAB {CSTYLE "Maple Input" -1 0 "Courier" 0 1 255 0 0 1 0 1 0 0 1 0 0 0 0 1 }{CSTYLE "" -1 256 "" 0 1 0 128 0 1 0 0 0 0 0 0 0 0 0 0 } {CSTYLE "" -1 257 "" 0 1 0 128 0 1 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 258 "" 0 1 0 128 128 1 0 0 0 0 0 0 0 0 0 0 }{CSTYLE "" -1 259 "" 0 1 128 128 128 1 0 0 0 0 0 0 0 0 0 0 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "Times" 1 12 0 0 0 1 2 2 2 2 2 2 1 1 1 1 }1 1 0 0 0 0 1 0 1 0 2 2 0 1 }{PSTYLE "Heading 1" -1 3 1 {CSTYLE "" -1 -1 "Times" 1 18 0 0 0 1 2 1 2 2 2 2 1 1 1 1 }1 1 0 0 8 4 1 0 1 0 2 2 0 1 }} {SECT 0 {PARA 0 "" 0 "" {TEXT -1 0 "" }{TEXT 257 49 "High School Modul es > Algebra by Gregory A. Moore" }}{PARA 3 "" 0 "" {TEXT -1 4 " " }{TEXT 256 33 "Intervals > Cantor Set [optional]" }}{PARA 0 "" 0 "" {TEXT -1 74 "\nThe first few steps in the iterative process of creatin g the Cantor set.\n" }}{PARA 0 "" 0 "" {TEXT 258 153 "[Directions : Ex ecute the Code Resource section first. Although there will be no outpu t immediately, these definitions are used later in this worksheet.]" } {TEXT -1 0 "" }}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 4 "Code" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 39 "restart: with(plottools): with(plo ts):" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 586 "intfin1 := proc( a , b )\n# description \"plot a finite interval on a number line \";\nlocal r, M, v1, v2, wid, bar, Axesplot, leftpt, rightpt, pt_color ,\n leftend, rightend, LT, RT, textpos;\n \nr := b-a ;\nM := eval f( 1.2 * (b-a) );\nv1 := [a, 0];\nv2 := [b, 0];\nwid := .1 ;\n\nbar := arrow( v1, v2,\n shape = double_arrow, color = green , difference \+ = true,\n width = wid, head_width = 0, head_length = 0):\n\ntextpos := wid ;\nLT := textplot( [a, textpos, a] ):\nRT := textplot( [b, tex tpos, b] ):\nif (M > .08) \n then display( bar, LT, RT );\n els e display( bar);\nfi;\n\nend proc:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 694 "cantorint := proc( a, b, n )\n# plot the nth step in Cantor set\";\nlocal left, right, len, A, Axisplot;\ngloba l count, finished;\n\nfinished := false;\n\nleft := a; right := b; l en := (b-a)/3;\n\n\nif(n = 1) \n then count :=count + 1; \n \+ A||count := intfin1( a, b):\n print( a, b);\n finishe d := true;\n else\n cantorint( a, a + len, n-1); \n \+ cantorint( b - len, b, n-1); \n fi;\n\nif( finished) \n then \n \+ Axisplot := plot( 0, x = a..b , scaling = constrained, \n \+ axes = none, thickness = 2, color = black,\n \+ tickmarks = [1,1] ):\n display( \{Axisplot, seq( A||i, i \+ = 1..(2^(n-1) ))\} );\nfi;\nend proc:\n\n\n\n\n" }}}{PARA 3 "" 0 "" {TEXT -1 0 "" }}}{SECT 0 {PARA 3 "" 0 "" {TEXT -1 5 "Steps" }}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "count := 0:\ncantorint( 0, 1, 1);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "count := 0:\ncantorint( 0 , 1, 2);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "count := 0:\nca ntorint( 0, 1, 3);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "count := 0:\ncantorint( 0, 1, 4);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "count := 0:\ncantorint( 0, 1, 5);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 32 "count := 0:\ncantorint( 0, 1, 6);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{PARA 0 "" 0 "" {TEXT 259 35 "\n \251 2002 Waterloo M aple Inc" }}{PARA 0 "" 0 "" {TEXT -1 0 "" }}}{MARK "0 1" 31 } {VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }