Math 326, Feb 17 -
Sierpinski's Triangle
We build the model in 2.8, Sierpinski's Triangle. Start by
fixing the corners of an equilateral triangle at (0,0), (1,0) and
(0.5,SQRT(3)/2). Pick any starting point inside the triangle, for
example (0.4, 0.1). This starting point will be point P0.
Now here's the plan. We will compute the midpoint between P0
and each of the corners of the triangle. Pick one of these three
midpoints at random, this will be P1. Now repeat, find
the midpoint between P1 and the corners, and pick P2
at random from those three midpoints. Repeat 2000 times, and
graph these points. What comes out is Sierpinski's
Triangle. Note that hitting F9 recalculates the random numbers.
Additional Questions
- Try the same model using a square instead of a triangle.
Try to guess what the graph will look like.
- Instead of using the midpoint which is a straight average, try
using a weighted average. For example, the x coordinate of the
midpoint is (0.5x1 + 0.5x2); instead use (ax1
+ (1-a)x2) where "a" is a parameter (the "shrink" parameter)
which we can scroll between 0 and 1. What happens to the
graph? Make this change on the square graph as well.
- Try moving around the initial points in the triangle and the
square. For example, replace the (1,1) corner with (2,2) in the
square model. How does the graph change? Try various
corners to twist the graph in different ways. Also try changing
the shrink parameter for different shapes.