#declare BeigeColor1 = color srgb < 201 / 255, 197 / 255, 179 / 255 >;
#declare BeigeColor2 = color srgb < 190 / 255, 186 / 255, 168 / 255 >;
#declare GrayColor1 = color srgb 220 / 255;

#declare BeigeMixPig = 
pigment{
	wrinkles color_map{
		[ 0 BeigeColor1 ]
		[ 0.25 BeigeColor1 ]
		[ 0.25 BeigeColor2 ]
		[ 0.75 BeigeColor2 ]
		[ 0.75 BeigeColor1 ]
		[ 1 BeigeColor1 ]
	}
	scale 0.025
}

#declare BeigeConcrete = 
texture{
	pigment{
		wrinkles color_map{
			[0.0 color srgb < 0.515625, 0.453125, 0.375 > ] 
			[0.3 color srgb < 0.59375, 0.515625 , 0.4375 > ]
			[0.6 color srgb < 0.640625, 0.5625, 0.484375 > ]
			[1.0 color srgb < 0.515625, 0.453125, 0.375 > ]
		}
		frequency 3 scale 0.1 turbulence 0.5
	} 
	finish{ specular 0.005 roughness 0.05}  
}


#declare WallWidth = 0.275;
#declare PrismWidth = 6;
#declare XAdd = 0.250;

#declare Normal1 = normal{ bumps bump_size 0.45 scale 0.1 }
#declare Normal2 = normal{ wrinkles }
#declare GrayTexture1 = texture{ pigment{ GrayColor1 } normal{ Normal1 } }
#declare BeigeTexture = texture{ pigment{ BeigeMixPig } normal{ Normal2 } }

#macro RemoveImageAttribute()
	#ifdef( ShadowRender )
		#if( ShadowRender = 1 )
			no_image
		#end
	#end
#end

#declare Prism1 =
prism{
	linear_sweep linear_spline
	-PrismWidth / 2, PrismWidth / 2, 7
	< 0, 3 >, < 1, 3 >, < 3, 1 >, < 3, -1 >, < 1, -3 >, < 0, -3 >, < 0, 3 >
	RemoveImageAttribute()
}

#declare Prism2 =
prism{
	linear_sweep linear_spline
	-PrismWidth / 2, PrismWidth / 2, 7
	< 0, 3 >, < 1 + XAdd, 3 >, < 3 + XAdd, 1 >, < 3 + XAdd, -1 >, < 1 + XAdd, -3 >, < 0, -3 >, < 0, 3 >
	RemoveImageAttribute()
}

#declare PlantBlock1 = 
union{
	object{ Prism1 rotate 90 * z texture{ BeigeTexture } }
	object{ Prism2 scale < 1, WallWidth / PrismWidth, 1 > translate WallWidth / 2 * y rotate 90 * z translate (-PrismWidth / 2 + WallWidth ) * x 
		texture{ GrayTexture1 }
	}
	object{ Prism2 scale < 1, WallWidth / PrismWidth, 1 > translate WallWidth / 2 * y rotate 90 * z translate (PrismWidth / 2 ) * x 
		texture{ GrayTexture1 }
	}
	object{ Prism2 scale < 1, WallWidth / PrismWidth, 1 > translate WallWidth / 2 * y rotate 90 * z translate (-PrismWidth / 3 / 2 + WallWidth / 2 ) * x 
		texture{ GrayTexture1 }
	}
	object{ Prism2 scale < 1, WallWidth / PrismWidth, 1 > translate WallWidth / 2 * y rotate 90 * z translate (PrismWidth / 3 / 2 + WallWidth / 2 ) * x 
		texture{ GrayTexture1 }
	}
	box{< -PrismWidth / 2, 0, PrismWidth / 2 >,< PrismWidth / 2, 1 + XAdd, PrismWidth / 2 - WallWidth > 
		texture{ GrayTexture1 }
		RemoveImageAttribute()
	}
	box{< -PrismWidth / 2, 0, -PrismWidth / 2 >,< PrismWidth / 2, 1 + XAdd, -PrismWidth / 2 + WallWidth > 
		texture{ GrayTexture1 }
		RemoveImageAttribute()
	}

	box{< -PrismWidth / 2, 0, -PrismWidth / 2 / 3 >,< PrismWidth / 2, 3 + XAdd, -PrismWidth / 2 / 3 + WallWidth > 
		texture{ GrayTexture1 }
		RemoveImageAttribute()
	}

	box{< -PrismWidth / 2, 0, PrismWidth / 2 / 3 >,< PrismWidth / 2, 3 + XAdd, PrismWidth / 2 / 3 - WallWidth > 
		texture{ GrayTexture1 }
		RemoveImageAttribute()
	}
}

#macro CompletePlantBlock1(NumberString)
	object{ PlantBlock1 }
	#local LocalNumber = text{ ttf "../../../../fonts/arialbd.ttf" NumberString 0.01, 0 scale 1.8 pigment{ color srgb < 45 / 255, 49 / 255, 116 / 255 > } }
	object{ LocalNumber translate -( max_extent( LocalNumber ) + min_extent( LocalNumber ) ) / 2 
		rotate 90 * x
		translate < 0, 3, 0 >
		RemoveImageAttribute()
	}
#end

#macro PlaceCompletePlantBlock(NumberString, FontPath, Transform)
	union{
		object{ PlantBlock1 }
		#local LocalNumber = text{ ttf FontPath NumberString 0.01, 0 scale 1.8 pigment{ color srgb < 45 / 255, 49 / 255, 116 / 255 > } }
		object{ LocalNumber translate -( max_extent( LocalNumber ) + min_extent( LocalNumber ) ) / 2 
			rotate 90 * x
			translate < 0, 3, 0 >
		}
		transform{ Transform }
	}
#end