Cellular automaton house generator
thingiverse
Human: Made with OpenSCAD /* [Basic Parameters] */ // Structure Height Height = 17; // Number of Layers Layers = 14; // Scaling Factor ScalingFactor = 2.01; /* [Living Conditions] */ // 0 - Dead Cell DeadCell = false; // 1 - Alive Cell AliveCell = true; // 2 - Two Alive Cells TwoAliveCells = false; // 3 - Three Alive Cells ThreeAliveCells = false; // 4 - Four Alive Cells FourAliveCells = false; // 5 - Five Alive Cells FiveAliveCells = false; // 6 - Six Alive Cells SixAliveCells = false; // 7 - Seven Alive Cells SevenAliveCells = false; // 8 - Eight Alive Cells EightAliveCells = false; Size = (Height * 2) + 2; Depth = Height + Layers; Middle = ceil(Size / 2); Points = [for (a = [0 : Size]) [for (b = [0 : Size]) if(b != Middle || a != Middle) 0 else 1 ]]; translate([-Middle - ScalingFactor / 2, -Middle - ScalingFactor / 2, Depth + 1]) suite(it = 1, maxit = Height); module suite() { translate([0, 0, -it * 1]) for (i = [0 : Size]) { for (j = [0 : Size]) { translate([i, j]) if (Points[i][j] == 1) { color([1 / maxit * (it - 1) / Size * i, 0.5 - maxit * (it - 1) / Size * j, 1 - (1 / maxit * (it - 1)) / Size * (i + j) / 2.1, 1]) scale(ScalingFactor) cube(1); } } } if (it <= maxit) { Points2 = [for (a = [0 : Size]) [for (b = [0 : Size]) if(a == 0 || b == 0 || a == Size || b == Size || voisinage(x = a, y = b, p = Points) == (DeadCell ? 0 : 1) || voisinage(x = a, y = b, p = Points) == (AliveCell ? false : true) || voisinage(x = a, y = b, p = Points) == (TwoAliveCells ? 2 : 0) || voisinage(x = a, y = b, p = Points) == (ThreeAliveCells ? 3 : 0) || voisinage(x = a, y = b, p = Points) == (FourAliveCells ? 4 : 0) || voisinage(x = a, y = b, p = Points) == (FiveAliveCells ? 5 : 0) || voisinage(x = a, y = b, p = Points) == (SixAliveCells ? 6 : 0) || voisinage(x = a, y = b, p = Points) == (SevenAliveCells ? 7 : 0) || voisinage(x = a, y = b, p = Points) == (EightAliveCells ? 8 : 0)) 0 else 1 ]]; suite(it = it + 1, maxit = maxit, points = Points2); } } function voisinage(x, y, p) = (p[x - 1][y - 1] + p[x][y - 1] + p[x + 1][y - 1] + p[x - 1][y] + p[x + 1][y] + p[x - 1][y + 1] + p[x][y + 1] + p[x + 1][y + 1]);
With this file you will be able to print Cellular automaton house generator with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Cellular automaton house generator.