ACCESS  July 2001
Twig example with test procedure
In order to make the twig from yesterday’s notes, as well as more complicated examples, it is nice to
have a test procedure to make sure you have picked your affine maps correctly (and to help you adjust
them later if necessary.) The procedure TESTMAP below, takes an affine function as its input, and the
result is a mapping L picture like the ones in the fractal templates.
> restart:
> with(plots):
Digits:=4:
Warning, the name changecoords has been redefined
> TESTMAP:=proc(f)
#this procedure lets you test individual
#functions in your iterated function system
local S,
#corners of unit square
L,
#corners of letter L
Sq, #unit square
Llet,
#letter L
AS, #transf of square corners
ASq,#transf of square
AL, #transf of L corners
ALlet;
#transf of letter L
S:=[[0,0],[0,1],[1,1] ,[1,0]];
L:=[[.1,.9],[.1,.75],[.2,.75],[.2,.775],[.125,.775],[.125,.9]]:
Sq:=polygonplot(S): #polygonplot connects the dots!
Llet:=polygonplot(L):
AS:=map(f,S):
AL:=map(f,L):
ASq:=polygonplot(AS):
ALlet:=polygonplot(AL):
#finally, display the unit square, the letter L,
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '08
 McAllister
 Math, Linear Algebra, Scaling, Functions and mappings, affine transformation, unit square, Iterated function system

Click to edit the document details