{VERSION 5 0 "SUN SPARC SOLARIS" "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 "2D Math" -1 2 "Times" 0 1 0 0 0 0 0 0 2 0 0 0 0 0 0 1 }{CSTYLE "2D Output" 2 20 "" 0 1 0 0 255 1 0 0 0 0 0 0 0 0 0 1 } {CSTYLE "" -1 256 "" 0 1 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{CSTYLE "" -1 257 "" 1 12 0 0 0 0 0 2 0 0 0 0 0 0 0 1 }{PSTYLE "Normal" -1 0 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }0 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "Maple Output" 0 11 1 {CSTYLE "" -1 -1 "" 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 }3 3 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 256 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }{PSTYLE "" 0 257 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 } {PSTYLE "" 0 258 1 {CSTYLE "" -1 -1 "" 1 14 0 0 0 0 0 1 0 0 0 0 0 0 0 1 }3 0 0 -1 -1 -1 0 0 0 0 0 0 -1 0 }} {SECT 0 {EXCHG {PARA 256 "" 0 "" {TEXT -1 69 "Fractals using iterated \+ function systems,\nwith affine transformations" }}{PARA 257 "" 0 "" {TEXT -1 6 "ACCESS" }}{PARA 258 "" 0 "" {TEXT -1 10 "July 2001\n" } {TEXT 256 0 "" }{TEXT 257 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 37 "restart:#fractals use a lot of memory" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 161 "Digits:=4:\n #number of significant digits - thi s will\n #make computations go faster without sacrificing\n #visual \+ accuracy - because IFS's are self correcting." }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 54 "with(plots):\n #we want to be able to see our f ractals" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 208 "The next procedure wi ll take a point P=[x,y]) in the plane and let us compute its image und er an affine transformation. We use the same letters for the transfor mation parameters as we did in the class notes:" }}}{EXCHG {PARA 11 " " 1 "" {XPPMATH 20 "6#/-%(AFFINE1G6#-%'matrixG6#7$7#%\"xG7#%\"yG,&*&-F (6#7$7$%\"aG%\"bG7$%\"cG%\"dG\"\"\"F'F:F:-F(6#7$7#%\"eG7#%\"fGF:" }}} {EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "AFFINE1:=proc(X,a,b,c,d,e,f) \nRETURN(evalf([a*X[1]+b*X[2]+e,\n c*X[1]+d*X[2]+f]));\nen d:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 " " 0 "" {TEXT -1 79 "You should check that these are the transformation s for the Sierpinski triangle" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 102 "f1:=P->AFFINE1(P,.5,0,0,.5,.25,.5);\nf2:=P->AFFINE1(P,.5,0,0,.5 ,.5,0);\nf3:=P->AFFINE1(P,.5,0,0,.5,0,0);" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#f1Gf*6#%\"PG6\"6$%)operatorG%&arrowGF(-%(AFFINE1G6)9 $$\"\"&!\"\"\"\"!F3F0$\"#D!\"#F0F(F(F(" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#f2Gf*6#%\"PG6\"6$%)operatorG%&arrowGF(-%(AFFINE1G6)9$$\"\"&! \"\"\"\"!F3F0F0F3F(F(F(" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%#f3Gf*6#% \"PG6\"6$%)operatorG%&arrowGF(-%(AFFINE1G6)9$$\"\"&!\"\"\"\"!F3F0F3F3F (F(F(" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 47 "S:=\{[0,0]\}:#init ial set consisting of one point" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 105 "3^9; #good to keep point numbers below 100,000,\n #becau se Maple is not the most efficient calculator" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"&$o>" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 91 "fo r i from 1 to 9 do\nS1:=map(f1,S);\nS2:=map(f2,S);\nS3:=map(f3,S);\nS: =`union`(S1,S2,S3);\nod:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 79 "pointplot(S,symbol=point,scaling=constrained,\n title=`Sierpinski \+ Triangle`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 33 "restart:\nDigits:=4:\nwith(plots): \+ " }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 97 "AFFINE1:=proc(X,a,b,c,d ,e,f)\nRETURN(evalf([a*X[1]+b*X[2]+e,\n c*X[1]+d*X[2]+f])) ;\nend:" }}}{EXCHG {PARA 0 "" 0 "" {TEXT -1 262 "The next procedure le t's you use different parameters in specifying your affine map. You c an scale the x-direction by r, and rotate it by alpha, then scale the \+ y-direction by s and rotate it by beta. Finally translate by e and f \+ as before: This is the result:" }}}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#-%(AFFINE2G6#/-%'matrixG6#7$7#%\"xG7#%\"yG,&*&-F(6#7$7$*&%\"rG\" \"\"-%$cosG6#%&alphaGF7,$*&%\"sGF7-%$sinG6#%%betaGF7!\"\"7$*&F6F7-F@F: F7*&F>F7-F9FAF7F7F'F7F7-F(6#7$7#%\"eG7#%\"fGF7" }}}{EXCHG {PARA 0 "> \+ " 0 "" {MPLTEXT 1 0 125 "AFFINE2:=proc(X,r,alpha,s,beta,e,f)\nRETURN(A FFINE1(X,r*cos(alpha),-s*sin(beta),\n r*sin(alpha),s*cos(beta) ,e,f));\nend:" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 167 "g1:=P->AF FINE2(P,1/3,0,1/3,0,0,0):\ng2:=P->AFFINE2(P,1/3,Pi/3,1/3,Pi/3,1/3,0): \ng3:=P->AFFINE2(P,1/3,-Pi/3,1/3,-Pi/3,1/2,sqrt(3)/6):\ng4:=P->AFFINE2 (P,1/3,0,1/3,0,2/3,0):" }}}{EXCHG {PARA 11 "" 1 "" {XPPMATH 20 "6#<#7$ \"\"!F%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 4 "4^6;" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#\"%'4%" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 11 "S:=\{[0,0]\};" }}{PARA 11 "" 1 "" {XPPMATH 20 "6#>%\"SG<#7$\"\"! F'" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 110 "for i from 1 to 6 do \nS1:=map(g1,S);\nS2:=map(g2,S);\nS3:=map(g3,S);\nS4:=map(g4,S);\nS:=` union`(S1,S2,S3,S4);\nod:\n" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 70 "pointplot(S,symbol=p oint,scaling=constrained,\ntitle=`Koch Snowflake`);" }}}{EXCHG {PARA 0 "> " 0 "" {MPLTEXT 1 0 0 "" }}}}{MARK "24 0 0" 0 }{VIEWOPTS 1 1 0 1 1 1803 1 1 1 1 }{PAGENUMBERS 0 1 2 33 1 1 }