#declare Gray1 = color srgb 0.5;
#declare Gray2 = color srgb 0.65;
#declare Gray3 = color srgb 0.7;
#declare Gray4 = color srgb 0.75;
#declare Gray5 = color srgb 0.8;

#declare PigLight = Pig_5colors_Wrinkles( 0.38, Gray1, Gray2, Gray3, Gray4, Gray5 )
#declare PigDark = Pig_5colors_Wrinkles( 0.20, Gray1, Gray2, Gray3, Gray4, Gray5 )

#declare DecalInt = 0.02;
#declare Height = 0.01;

//Square from <0, 0> to <-1, 1>

#macro SingleSquare( PigmentTranslate, GeomTranslate )
	union{
		box{< 0, 0, 0 >,< -1, Height, 1 > pigment{PigDark scale 2} } //Ground slab underneath
		box{< -DecalInt,0,DecalInt>,<-1 + DecalInt, Height*2, 1 - DecalInt > pigment{PigLight scale 2 translate PigmentTranslate} } //Top slab above
		translate GeomTranslate
	}
#end

#macro PlaceSquares( BoolArray, FirstDim )
	PlaceSingleSquare( BoolArray[FirstDim][0], <0, 0, 0> )
	PlaceSingleSquare( BoolArray[FirstDim][1], <1, 0, 0> )
	PlaceSingleSquare( BoolArray[FirstDim][2], <1, 0, -1> )
	PlaceSingleSquare( BoolArray[FirstDim][3], <0, 0, -1> )
#end

#macro PlaceSingleSquare( PlaceSquareBool, TransVect )
	#if( PlaceSquareBool )
		SingleSquare(TransVect, TransVect)
	#end
#end
