10 likes | 130 Views
Sierpinski‘s Car Pet Made by Vu Chiem. The Sierpinski’s Car Pet has a fractal dimension of log(8)/log(3) = 1.8928. It is generated by using a simple recursion formula: Given a square of size s, we divide it into 9 squares of size s/3. We skip the middle square
E N D
Sierpinski‘s Car PetMade by Vu Chiem • The Sierpinski’s Car Pet has a fractal dimension of log(8)/log(3) = 1.8928. • It is generated by using a simple recursion formula: • Given a square of size s, we divide it into 9 squares of size s/3. • We skip the middle square • Repeat until the square size is small enough • My approach is: • -Create a black N x N square (grayscale value of 1) • -Apply the recursion and “skip the middle square” by making it white (grayscale value of 0). • -Repeat the process. • More information: • -Picked N = 3^7. The grid size has 3^7^2 = 4782969 elements. • Any values lower than 3^7 affect the resolution. Any higher values take too long. • -Had to declare the grid as ones(N,N, ‘uint8’) to save memory or Matlab will complain. Prepared for UC Berkeley course EPS 109 “Computer Simulations in Earth and Planetary Science”, fall 2009, Instructor: B. Militzer