#
# The Chair in the back row on the left.
#
AttributeBegin

	TransformBegin
		# Move the Chair onto the floor
		Translate 0 -3 0
		# Move the chair to its relative position in the row
		Translate 0.5 0 0
		# Rotate towards the front of the class (to the right)
		Rotate 87 0 1 0
		# Move the chairs legs onto the XZ plane
		Translate 0 1.75 0
		Scale 2 2 2

		# 
		# The metallic frame
		#
		AttributeBegin
			Color [ .5 .5 .5 ]
			Declare "metalKa" "float"
			Declare "metalKs" "float"
			Declare "metalroughness" "float"
			Declare "rustKa" "float"
			Declare "rustKd" "float"
			Declare "rustcolor" "color"
			Declare "txtscale" "float"
			Declare "rusty" "float"
			Declare "rustbump" "float"
			Declare "offset" "float"
			TransformBegin
				Surface "WWRustyShinyMetal" 
					"metalKa" .2315 "metalKs" 3.125 
					"metalroughness" 0.475
					"rustKa" .2315 "rustKd" 0.585 
					"rustcolor" [.9675 .83995 .8015]
					"rusty" .3175 "rustbump" 0.3725 
					"txtscale" 3.6895
					"offset" -0.42
			TransformEnd
			Declare "Km" "float"
			Declare "frequency" "float"
			Declare "power" "float"
			Displacement "LGDented" "power" 2.3 "Km" 1.025 "frequency" 3.325

			# A sort of wrinkled aluminum
			# Displacement "LGDented" "Km" 8.025 "frequency" 0.625

			# Liquid metal appearence - kinda cool
			# Displacement "LGDented" "Km" 18.025 "frequency" 0.125

			ReadArchive "chair03-seat.rib"
		AttributeEnd

		# 
		# The wooden writing area
		#
		AttributeBegin
			Declare "txtscale" "float"
			Declare "ringscale" "float"
			Declare "lightwood" "color"
			Declare "darkwood" "color"
			Declare "grainy" "float"
			Declare "orientation" "float"
			Declare "usez" "float"
			Surface "LGWood" 
				"orientation" 1
				"lightwood" [0.54 0.44 0.30] 
				"darkwood" [0.40 0.30 0.1952] 
				"grainy" .535
				"usez" 1
				"ringscale" 190
				"txtscale" 0.835
			Declare "txtscale" "float"
			Declare "magnitude" "float"
			Declare "offset" "float"
			Displacement "PXDWood" "txtscale" 15 "magnitude" 0.044 "offset" -10
			ReadArchive "chair03-arm.rib"
		AttributeEnd

		#
		# The paper on the desk
		#
		AttributeBegin
			Color [1 1 1]
			Declare "hfreq" "float"
			Declare "vcolor" "color"
			Declare "hcolor" "color"
			Declare "skip" "float"
			Declare "density" "float"
			Surface "MJH3HolePaper" 
				"hfreq" 16 
				"vcolor" .95 0 0 
				"hcolor" 0 0 .385
				"skip" 2
				"density" .03695
			TransformBegin
				Translate 0 -0.003 0.0
				ReadArchive "chair-paper2a.rib"
			TransformEnd
		AttributeEnd
		AttributeBegin
			Color [.8 .8 .8]
			Declare "hfreq" "float"
			Declare "hcolor" "color"
			Declare "skip" "float"
			Declare "density" "float"
			Surface "MJH3HolePaper" 
				"hfreq" 12 
				"hcolor" 0 0 .85
				"skip" 2
				"density" .03695
			TransformBegin
				Translate 0 0.03 0.0
				Translate 0.350302 0.452089 0.472275
				Rotate 90 1 0 0
				Scale .3 .388249 .3
				Translate -0.5 -0.5 0
				ReadArchive "paper-test.rib"
			TransformEnd
		AttributeEnd
	TransformEnd
AttributeEnd
