Sierpinski Matterhorn II

This variation of the Sierpinski triangle provides a simplified example of how ideas from fractal geometry can be used to render terrain in video games and CGI-enhanced movies. The construction differs from that of the Sierpinski triangle in that, at each step, instead of the midpoint of each side, a random point in a specified neighborhood of the midpoint is selected. In this applet the radius of the neighborhood can be set at anywhere from 10% to 20% of the corresponding side. The larger the radius, the more jagged the mountain. In actual applications many more complicating factors go into producing realistic terrain, but the basic principle is the same. The peak of the mountain can be moved to a different position before generation. Press the Create button to generate the "Matterhorn." Pressing the Reset button will revert back to your triangle. The slider beside it switches between iterations, varying from the input (a triangle) to the seventh iteration. The final construction has 3,280 triangles, so it may take a moment to generate.