Question: Sierpenski ??

Question says: Start with the square [0,1] x [0,1] and remove the middle square [1/3,2/3] x [1/3,2/3]. Divide the part of the original square that remains into 8 congruent squares each have side of length 1/3:

[0,1/3] x [0,1/3];   [0,1/3] x [1/3,2/3];   [0,1/3] x [2/3,1];    [1/3,2/3] x [2/3,1];   [2/3,1] x [2/3,1];    [2/3,1] x [1/3,2/3];   [2/3,1] x [0,1/3];  [1/3,2/3] x [0,1/3]

from each of these smaller squares remove the middle square. then the remainding part of each of the smaller squares can be divided into 8 congruent squares each having side of length 1/9. Remove the middle square from each of these smaller squares.

To do this problem, first write two preliminary procedures: middlesquare and newsquares.

the middlesquare procedure has as input two points, the lower left corner and upper right corner of a square which has horizontal and vertical sides, and produces as output a list of the four vertices of the middle square.

the newsquares procedure accfepts a s input four points: A,B,C,D where A and B a re the lower left corner and the upper right corner of a square and C and D are the lower left corner and upper right corner of the middle square. the output of newsquares is a list of lists of vertices of the eight squares remaining when the middle square is removed from the first inp;ut square.

Next write the maid procedure named Sierpinski:=proc(N), where the parameter is the number of stages of removing middle squares that are to be completed. the output will be a display of the initial square and all the middle squares removed. the sierpinski procedure should make a call to the middlesquare to produce the new set of middle squares to be removed and then call newsquares to create the next set of squares whose middles will be removed in the next stage.

Please Help Me!!!! I am So Lost right now... I would appreciate any kind of help that can be given. Thank You.

Please Wait...