Neon23
Stairs-2a sunflow
// Stairs up - with handrails.
// Its a long way to fall... safer this way :-)
//set seed 4 // single door
//set seed 13 // nice
set maxdepth 100
{ x 3.5 z -0.6 s 6 6 0.2 color #0F0 } box // start walking here :-)
stairsup
// Rules
rule stairsup { // climb three steps
stair
{ z 1 x -1 } stair
{ z 2 x -2 } stair
{ z 3 x -3 } stairsup
}
rule stairsup { // add corner - turn left
stair
{ z 1 x -1 } topstair
{ z 1 x -1 } corner_L
{ rz 90 y 3 z 2 x -2 h 10 } stairsup
}
rule stairsup w 0.1 { // add corner - turn left + door
stair
{ x -3 z 3 } door
{ z 1 x -1 } topstair
{ z 1 x -1 } corner_L_door
{ rz 90 y 3 z 2 x -2 h 10 } stairsup
}
rule stairsup { // add corner - turn right
stair
{ z 1 x -1 } topstair
{ z 1 x -1 } corner_R
{ rz -90 y -3 z 2 x -2 h 10} stairsup
}
rule stairsup w 0.1 { // add corner - turn right + door
stair
{ x -3 z 3 } door
{ z 1 x -1 } topstair
{ z 1 x -1 } corner_R_door
{ rz -90 y -3 z 2 x -2 h 10} stairsup
}
rule stairsup w 0.15 { // add corner - turn right and left
stair
corner_landing
{ rz -90 y 2 z 1 x -2 y -4 h 10 sat 0.9 } stairsup
{ rz 90 y 2 z 1 x -2 h 10 sat 0.9 } stairsup
}
rule stairsup w 0.2 { // terminating door
stair
{ z 1 x -1 } topstair
{ z 1 x -1 } landing
{ z 3 x -3 } door
}
// Stair
rule stair {
{ s 1 3 0.2 z 2 } box //step color #FF0
{ s 0.1 3 1 x 4.5 z -0.2 } box //riser
{ x 0.45 y -1.55 z 0.8 s 0.1 0.1 3 color #FF0 } box // left stanchion
{ x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FF0 } box // right stanchion
{ x -0.034 y -1.55 z 2.77 ry -45 s 0.1 0.1 1.414 color #FF0 } box // left handrail
{ x -0.034 y 1.55 z 2.77 ry -45 s 0.1 0.1 1.414 color #FF0 } box // left handrail
}
rule topstair {
{ s 1 3 0.2 z 2 } box //step color #FF0
{ s 0.1 3 1 x 4.5 z -0.2 } box //riser
{ x 0.45 y -1.55 z 0.8 s 0.1 0.1 3 color #0FF } box // left stanchion
{ x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #0FF } box // right stanchion
{ x 0.018 y -1.55 z 2.718 ry -45 s 0.1 0.1 1.28 color #0FF } box // left handrail
{ x 0.018 y 1.55 z 2.718 ry -45 s 0.1 0.1 1.28 color #0FF } box // right handrail
}
// Corner
rule landing { // top of the stairs
{ x -2 z 0.4 s 3 3 0.2 } box
// stanchions
{ x -1 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // left stanchion
{ x -0.479 y -1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #0F0 } box // left handrail
{ x -1 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // right stanchion
{ x -0.479 y 1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #0F0 } box // right handrail
}
// Corner
rule corner_L {
{ x -2 z 0.4 s 3 3 0.2 color #F44} box
{ x -1 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #F44 } box // first stanchion
{ x -4 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #F44 } box // corner stanchion
{ x -2.45 y 0 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 s 0.1 0.1 3 color #F44 } box // first handrail
{ x -4.004 y -1.55 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 rx 90 s 0.1 0.1 3 color #F44 } box // second handrail
// need fixup here for little 45 add-on
{ x -0.479 y 1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #F44 } box // right handrail
}
rule corner_L_door {
{ x -2 z 0.4 s 3 3 0.2 color #F77 } box
{ x -1 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #F77 } box // first stanchion
{ x -4 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #F77 } box // corner stanchion
{ x -2.45 y 0 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 s 0.1 0.1 3 color #F77 } box // first handrail
// need fixup here for little 45 add-on
{ x -0.479 y 1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #F77 } box // right handrail
}
rule corner_R {
{ x -2 z 0.4 s 3 3 0.2 color #FFF} box
{ x -1 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // first stanchion
{ x -4 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // corner stanchion
{ x -2.45 y -3.1 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 s 0.1 0.1 3 color #FFF } box // first handrail
{ x -4.004 y -1.55 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 rx 90 s 0.1 0.1 3 color #FFF } box // second handrail
// need fixup here for little 45 add-on
{ x -0.479 y -1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #0F0 } box // right handrail
}
rule corner_R_door {
{ x -2 z 0.4 s 3 3 0.2 color #FFF} box
{ x -1 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // first stanchion
{ x -4 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // corner stanchion
{ x -2.45 y -3.1 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 s 0.1 0.1 3 color #FFF } box // first handrail
// need fixup here for little 45 add-on
{ x -0.479 y -1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #0F0 } box // right handrail
}
rule corner_landing { // stairs up on both sides
{ x -2 z 0.4 s 3 3 0.2 color #FFF} box
{ x -4.004 y -1.55 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 rx 90 s 0.1 0.1 3 color #FFF } box // handrail
}
rule door { // right opening
{ s 0.2 3 7 x -8 z 0.286 color #DFF } box
{ s 0.2 0.2 0.2 x -7 y -5 z 12 color #F00 } box
}
rule door w 0.2 { // left opening
{ s 0.2 3 7 x -8 z 0.286 color #FFD } box
{ s 0.2 0.2 0.2 x -7 y 5 z 12 color #F00 } box
}
Stairs-2a sunflow
// Stairs up - with handrails.
// Its a long way to fall... safer this way :-)
//set seed 4 // single door
//set seed 13 // nice
set maxdepth 100
{ x 3.5 z -0.6 s 6 6 0.2 color #0F0 } box // start walking here :-)
stairsup
// Rules
rule stairsup { // climb three steps
stair
{ z 1 x -1 } stair
{ z 2 x -2 } stair
{ z 3 x -3 } stairsup
}
rule stairsup { // add corner - turn left
stair
{ z 1 x -1 } topstair
{ z 1 x -1 } corner_L
{ rz 90 y 3 z 2 x -2 h 10 } stairsup
}
rule stairsup w 0.1 { // add corner - turn left + door
stair
{ x -3 z 3 } door
{ z 1 x -1 } topstair
{ z 1 x -1 } corner_L_door
{ rz 90 y 3 z 2 x -2 h 10 } stairsup
}
rule stairsup { // add corner - turn right
stair
{ z 1 x -1 } topstair
{ z 1 x -1 } corner_R
{ rz -90 y -3 z 2 x -2 h 10} stairsup
}
rule stairsup w 0.1 { // add corner - turn right + door
stair
{ x -3 z 3 } door
{ z 1 x -1 } topstair
{ z 1 x -1 } corner_R_door
{ rz -90 y -3 z 2 x -2 h 10} stairsup
}
rule stairsup w 0.15 { // add corner - turn right and left
stair
corner_landing
{ rz -90 y 2 z 1 x -2 y -4 h 10 sat 0.9 } stairsup
{ rz 90 y 2 z 1 x -2 h 10 sat 0.9 } stairsup
}
rule stairsup w 0.2 { // terminating door
stair
{ z 1 x -1 } topstair
{ z 1 x -1 } landing
{ z 3 x -3 } door
}
// Stair
rule stair {
{ s 1 3 0.2 z 2 } box //step color #FF0
{ s 0.1 3 1 x 4.5 z -0.2 } box //riser
{ x 0.45 y -1.55 z 0.8 s 0.1 0.1 3 color #FF0 } box // left stanchion
{ x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FF0 } box // right stanchion
{ x -0.034 y -1.55 z 2.77 ry -45 s 0.1 0.1 1.414 color #FF0 } box // left handrail
{ x -0.034 y 1.55 z 2.77 ry -45 s 0.1 0.1 1.414 color #FF0 } box // left handrail
}
rule topstair {
{ s 1 3 0.2 z 2 } box //step color #FF0
{ s 0.1 3 1 x 4.5 z -0.2 } box //riser
{ x 0.45 y -1.55 z 0.8 s 0.1 0.1 3 color #0FF } box // left stanchion
{ x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #0FF } box // right stanchion
{ x 0.018 y -1.55 z 2.718 ry -45 s 0.1 0.1 1.28 color #0FF } box // left handrail
{ x 0.018 y 1.55 z 2.718 ry -45 s 0.1 0.1 1.28 color #0FF } box // right handrail
}
// Corner
rule landing { // top of the stairs
{ x -2 z 0.4 s 3 3 0.2 } box
// stanchions
{ x -1 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // left stanchion
{ x -0.479 y -1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #0F0 } box // left handrail
{ x -1 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // right stanchion
{ x -0.479 y 1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #0F0 } box // right handrail
}
// Corner
rule corner_L {
{ x -2 z 0.4 s 3 3 0.2 color #F44} box
{ x -1 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #F44 } box // first stanchion
{ x -4 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #F44 } box // corner stanchion
{ x -2.45 y 0 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 s 0.1 0.1 3 color #F44 } box // first handrail
{ x -4.004 y -1.55 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 rx 90 s 0.1 0.1 3 color #F44 } box // second handrail
// need fixup here for little 45 add-on
{ x -0.479 y 1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #F44 } box // right handrail
}
rule corner_L_door {
{ x -2 z 0.4 s 3 3 0.2 color #F77 } box
{ x -1 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #F77 } box // first stanchion
{ x -4 y 0 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #F77 } box // corner stanchion
{ x -2.45 y 0 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 s 0.1 0.1 3 color #F77 } box // first handrail
// need fixup here for little 45 add-on
{ x -0.479 y 1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #F77 } box // right handrail
}
rule corner_R {
{ x -2 z 0.4 s 3 3 0.2 color #FFF} box
{ x -1 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // first stanchion
{ x -4 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // corner stanchion
{ x -2.45 y -3.1 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 s 0.1 0.1 3 color #FFF } box // first handrail
{ x -4.004 y -1.55 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 rx 90 s 0.1 0.1 3 color #FFF } box // second handrail
// need fixup here for little 45 add-on
{ x -0.479 y -1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #0F0 } box // right handrail
}
rule corner_R_door {
{ x -2 z 0.4 s 3 3 0.2 color #FFF} box
{ x -1 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // first stanchion
{ x -4 y -3.1 z 1 x 0.45 y 1.55 z 0.8 s 0.1 0.1 3 color #FFF } box // corner stanchion
{ x -2.45 y -3.1 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 s 0.1 0.1 3 color #FFF } box // first handrail
// need fixup here for little 45 add-on
{ x -0.479 y -1.55 z 3.214 ry -45 s 0.1 0.1 0.16 color #0F0 } box // right handrail
}
rule corner_landing { // stairs up on both sides
{ x -2 z 0.4 s 3 3 0.2 color #FFF} box
{ x -4.004 y -1.55 z 2.45 x 0.45 y 1.55 z 0.8 ry 90 rx 90 s 0.1 0.1 3 color #FFF } box // handrail
}
rule door { // right opening
{ s 0.2 3 7 x -8 z 0.286 color #DFF } box
{ s 0.2 0.2 0.2 x -7 y -5 z 12 color #F00 } box
}
rule door w 0.2 { // left opening
{ s 0.2 3 7 x -8 z 0.286 color #FFD } box
{ s 0.2 0.2 0.2 x -7 y 5 z 12 color #F00 } box
}