User Tools

Site Tools


tracy444a:sierpinsky_carpet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tracy444a:sierpinsky_carpet [2010/10/06 19:26]
tracyam0 created
tracy444a:sierpinsky_carpet [2010/10/06 21:34] (current)
tracyam0
Line 1: Line 1:
 ====== Sierpinsky Carpet ====== ====== Sierpinsky Carpet ======
  
-According to Mandelbrot, "A fractal is a shape made of parts similar to the whole in some way". By, this definition, my creation is sort of a fractal. It is created by layering smaller and smaller rectangles. The colors and patterning of the rectangles creates some interesting patterns in the result. However, the individual flower pattern of each rectangle is lost in the final product. It only serves to add interesting coloring patterns. The Sierpinski Carpet which inspired my designed is actually the reverse of my project. Rather than adding rectangles, the Sierpinski Carpet is designed by taking them away. More specifically,​ the Sierpinski carpet is created by taking a square, dividing it into nine equal squares and removing the center. Then each remaing square is treated the same way, so that smaller squares are continually being removed. The remnant of the original square remaining after this process has been repeated an infinite number of times is the Sierpinski carpet. Sierpinski created his carpet in 1916.+According to Mandelbrot, "A fractal is a shape made of parts similar to the whole in some way." ​By, this definition, my creation is sort of a fractal. It is created by layering smaller and smaller rectangles. The colors and patterning of the rectangles creates some interesting patterns in the result. However, the individual flower pattern of each rectangle is lost in the final product. It only serves to add interesting coloring patterns. The Sierpinski Carpet which inspired my designed is actually the reverse of my project. Rather than adding rectangles, the Sierpinski Carpet is designed by taking them away. More specifically,​ the Sierpinski carpet is created by taking a square, dividing it into nine equal squares and removing the center. Then each remaing square is treated the same way, so that smaller squares are continually being removed. The remnant of the original square remaining after this process has been repeated an infinite number of times is the Sierpinski carpet. Sierpinski created his carpet in 1916.
  
 Citations Citations
Line 8: Line 8:
  
 Feder, Jens. Fractals. New York: Plenum Press, 1988. Print. Feder, Jens. Fractals. New York: Plenum Press, 1988. Print.
 +
 +----
 +
 +Also of interest, I discovered [[http://​spanky.triumf.ca/​www/​fractint/​fractint.html|Fractint]]. I'm not entirely sure how to work this program, but it made some pretty pictures for me.
 +
 +----
 +
 +Here is my homemade version of a Sierpinski Carpet:
 +
 +
 +
 +<​html>​
 +
 +<a href="​http://​arthur.sewanee.edu/​tracyam0/​CS444/​Sierpinski/"><​img src="​http://​arthur.sewanee.edu/​tracyam0/​CS444/​Sierpinski.png/"​ alt="​Sierpinski!"​ width="​150"​ height="​150"​ /></​a>​
 +<br>
 +
 +
 +&​nbsp&​nbsp&​nbsp&​nbsp&​nbsp&​nbsp<​a href="​http://​arthur.sewanee.edu/​tracyam0/​CS444/​Sierpinski/">​Sierpinski Carpet!</​a>​
 +</​html>​
 +
 +Here is the Processing code to make the Sierpinski Carpet:
 +
 +<code java>
 +
 +float count;
 +float number;
 +float num;
 +float sz;
 +
 +void setup() {
 +  count=0;
 +  number=1;
 +  sz=1;
 +  num=2;
 +  noStroke();
 +
 +  size(500,​500);​
 +  background(0);​
 +}
 +
 +void mousePressed() {
 +  count++;
 +  number=pow(9,​count);​
 +  num=pow(3,​count)*2;​
 +  sz=pow(.33,​count);​
 +  redraw();
 +}
 +
 +void draw() {
 +
 +  rectMode(CENTER);​
 +
 +  ​
 +  int x=3;
 +  int y=3;
 +
 +
 +  for(int i=0; i<​number;​ i++) {
 +
 +    if(x>​num) {
 +      x=3;
 +      y+=6;
 +    }
 +    float r=(x*width)/​num;​
 +    float s=y*height/​num;​
 +    float u=width*sz;
 +    float v=height*sz;​
 +    rect(r,​s,​u,​v);​
 +
 +    x+=6;
 +  }
 +}
 +
 +
 +</​code>​
 +
tracy444a/sierpinsky_carpet.1286411163.txt.gz ยท Last modified: 2010/10/06 19:26 by tracyam0