Neon23
city-3d2
// Inital position
set background #000
{ x -6 y -6 z -0.5 s 1 1 0.1 z 0.5 color #00AAFF }
mat
// Ground plane
//{ x -0 y -0 z -0.5 s 20 20 0.01 color #000 } box
// make 6x6 blocks
rule mat {
12 * { x 1 hue 10 } 12 * { y 1 hue 10 } split
}
// do a z -0.5 to center cube around zero before doing scale
// - then translate back with z 0.5 at end of operation
// this way all bases line up.
// X-split
rule split w 5 maxdepth 3 > square {
{ z -0.5 s 1/3 1 1.3 x -1 hue 5 z 0.5 } split
{ z -0.5 s 2/3 1 0.7 x 1/4 hue 30 z 0.5 } split
}
// Y-split
rule split w 5 maxdepth 3 > square {
{ z -0.5 s 1 1/3 0.8 y -1 hue 10 z 0.5 } split
{ z -0.5 s 1 2/3 1.2 y 1/4 hue 20 z 0.5 } split
}
// No split
//rule split w 0.2 { square }
rule square {
{ z -0.5 s 0.95 0.95 0.8 z 0.8 } box
onTopBox
}
// 20% height boxes
rule onTopBox { // 50/50 H/W
{ s 0.5 0.5 0.2 z 3 h 25 } box
}
rule onTopBox { // 50/50 H/W + shifted
{ x 0.1 y 0.1 s 0.5 0.5 0.2 z 3 h 25 } box
}
rule onTopBox { // 30/50 H/W - shifted
{ x -0.1 y -0.1 s 0.3 0.5 0.2 z 3 h 25 } box
}
rule onTopBox { // 20/10 H/W + shifted
{ x 0.1 y 0.1 s 0.2 0.1 0.2 z 3 h 25 } box
}
// 50% on top boxes
rule onTopBox { // 10/10 H/W + shifted
{ x 0.1 y 0.1 s 0.1 0.1 0.5 z 1.5 h 25 } box
}
rule onTopBox w 2 { // 50/50 H/W
{ s 0.5 0.5 0.5 z 1.5 h 25 } box
onTopBox2
}
// boxes on top of boxes
// 20 % height
rule onTopBox2 { // 30/30 H/W + shifted
{ x 0.05 y 0.05 s 0.3 0.3 0.2 z 5.5 h 25 } box
}
rule onTopBox2 { // 30/30 H/W - shifted
{ x -0.05 y -0.05 s 0.3 0.3 0.2 z 5.5 h 25 } box
}
// 80% height
rule onTopBox2 { // 10/10 H/W + shifted
{ x 0.05 y 0.05 s 0.1 0.1 0.8 z 1.7 h 25 } box
}
rule onTopBox2 { // 10/10 H/W - shifted
{ x -0.05 y -0.05 s 0.1 0.1 0.8 z 1.7 h 25 } box
}
city-3d2
// Inital position
set background #000
{ x -6 y -6 z -0.5 s 1 1 0.1 z 0.5 color #00AAFF }
mat
// Ground plane
//{ x -0 y -0 z -0.5 s 20 20 0.01 color #000 } box
// make 6x6 blocks
rule mat {
12 * { x 1 hue 10 } 12 * { y 1 hue 10 } split
}
// do a z -0.5 to center cube around zero before doing scale
// - then translate back with z 0.5 at end of operation
// this way all bases line up.
// X-split
rule split w 5 maxdepth 3 > square {
{ z -0.5 s 1/3 1 1.3 x -1 hue 5 z 0.5 } split
{ z -0.5 s 2/3 1 0.7 x 1/4 hue 30 z 0.5 } split
}
// Y-split
rule split w 5 maxdepth 3 > square {
{ z -0.5 s 1 1/3 0.8 y -1 hue 10 z 0.5 } split
{ z -0.5 s 1 2/3 1.2 y 1/4 hue 20 z 0.5 } split
}
// No split
//rule split w 0.2 { square }
rule square {
{ z -0.5 s 0.95 0.95 0.8 z 0.8 } box
onTopBox
}
// 20% height boxes
rule onTopBox { // 50/50 H/W
{ s 0.5 0.5 0.2 z 3 h 25 } box
}
rule onTopBox { // 50/50 H/W + shifted
{ x 0.1 y 0.1 s 0.5 0.5 0.2 z 3 h 25 } box
}
rule onTopBox { // 30/50 H/W - shifted
{ x -0.1 y -0.1 s 0.3 0.5 0.2 z 3 h 25 } box
}
rule onTopBox { // 20/10 H/W + shifted
{ x 0.1 y 0.1 s 0.2 0.1 0.2 z 3 h 25 } box
}
// 50% on top boxes
rule onTopBox { // 10/10 H/W + shifted
{ x 0.1 y 0.1 s 0.1 0.1 0.5 z 1.5 h 25 } box
}
rule onTopBox w 2 { // 50/50 H/W
{ s 0.5 0.5 0.5 z 1.5 h 25 } box
onTopBox2
}
// boxes on top of boxes
// 20 % height
rule onTopBox2 { // 30/30 H/W + shifted
{ x 0.05 y 0.05 s 0.3 0.3 0.2 z 5.5 h 25 } box
}
rule onTopBox2 { // 30/30 H/W - shifted
{ x -0.05 y -0.05 s 0.3 0.3 0.2 z 5.5 h 25 } box
}
// 80% height
rule onTopBox2 { // 10/10 H/W + shifted
{ x 0.05 y 0.05 s 0.1 0.1 0.8 z 1.7 h 25 } box
}
rule onTopBox2 { // 10/10 H/W - shifted
{ x -0.05 y -0.05 s 0.1 0.1 0.8 z 1.7 h 25 } box
}