//File of a reed definition

#declare BrightGreenCol = srgb < 235 / 255, 242 / 255, 6 / 255 >;
#declare MediumGreenCol = srgb < 185 / 255, 203 / 255, 5 / 255>;
#declare BrownReed = srgb < 140 / 255, 72 / 255, 7 / 255 >;
#declare AppendiceCol = srgb < 228 / 255, 159 / 255, 81 / 255 >;

#declare ReedNormal = normal{ bozo bump_size 3 scale 0.01}
#declare AppendiceNormal = normal{ bozo bump_size 8.0 scale 0.01}

#declare StalkTexture = texture{ pigment{ bozo color_map{ [0.0 BrightGreenCol][0.3 BrightGreenCol][0.5 MediumGreenCol][0.8 MediumGreenCol ][1.0 BrightGreenCol] 
														}
										  scale 4
										} 
						}
#declare ReedTexture = texture{ pigment{ BrownReed } normal{ ReedNormal } finish{ specular 0.01 roughness 0.1 } }
#declare AppendiceTexture = texture{ pigment{ AppendiceCol } normal{ AppendiceNormal } finish{ specular 0.01 roughness 0.1 } }

#declare ReedRadius = 2.75;//Old value: '2'
#declare ReedLength = 10;
#declare StalkLength = 60;

#declare StalkObj = cylinder{ 0, <0, StalkLength, 0>, ReedRadius / 3 }

#declare BrownObj = merge{ 
							sphere{0, ReedRadius } 
							cylinder{ 0, <0, ReedLength, 0>, ReedRadius } 
							sphere{<0, ReedLength, 0> , ReedRadius}
						texture{ ReedTexture }
					}

#declare AppendiceObj = merge{
							cylinder{ <0, ReedLength, 0>, <0, ReedLength*1.4, 0>  ReedRadius / 2.5}
							cone{ < 0, ReedLength*1.4, 0 >, ReedRadius / 2.5, < 0, ReedLength * 1.8,0>, 0 }
							texture{ AppendiceTexture }
						}
						
#declare CompleteReed	= union{
								object{ StalkObj texture{ StalkTexture } }
								object{ BrownObj translate StalkLength * y }
								object{ AppendiceObj translate StalkLength * y }
								scale 0.015
						  }
						  
