Math 2270

advertisement
Math 2270
Computer Project 1
Problem 1:
(a) Find the matrices that corresponds to the composition of the following transformations (show your work):
1. A1 = rotation of 45◦ counterclockwise followed by a scaling by
√
2. A2 = rotation of 135◦ counterclockwise followed by a scaling by
2
.
3
√
2
.
3
3. A3 = rotation of 90◦ counterclockwise followed by a reflection about the horizontal
√
axis followed by a rotation of 45◦ counterclockwise followed by a scaling by 32 .
4. A4 = A rotation of 90◦ counterclockwise
followed by a rotation of 45◦ counter√
clockwise followed by a scaling by 32
(b) Use the affine transformations Ti (~x) = Ai~x + ~bi , where
1 1 1
~b1 = 31 , ~b2 = 1 , ~b3 = 32 , ~b4 = 12
3
3
3
3
in the provided code to make a fractal.
Problem 2:
Repeat the construction of the Sierpinski triangle, but use a regular octagon instead
of a triangle. This will require eight transformations, but the matrix will be the same
for each and will be a scaling by a certain factor. However, you will have to discover
the right ~b’s for the affine transformations.
Problem 3:
Pick your own affine transformations and come up with something that looks cool.
Use at least two affine transformations.
1
Download