#VRML V2.0 utf8
# An inlined component of a user-defined prototype wrapper implementation.
# A heavyweight data plotting template that inlines a user created VRML Shape.  
#  This object can be used as a template to extend other future user created shapes 
#  like an indexedFaceSet.  Just inLine the Shape. 

#  A component in a 3D data plotting application 
# Kurt A. Fisher fisherka@csolutions.net  beginner level VRML coder
# 12/2003

#  Used by:  lib_UD_proto.wrl  

#  The user must manually implement object color and translucency in this inlined file. 

# ====================================
# Usage 
#     in UD_proto.wrl 

# Inline { 
#	url  "my_user_defined_object.wrl" 
#} 

# ===========================================
#  Background 

#  version x: Default White background 
# DEF DefaultBack Background {
#	skyColor 		[ 1.0 1.0 1.0,  1.0 1.0 1.0,  1.0 1.0 1.0 ]
#	skyAngle 		[ 1.0, 1.0 ]
#	groundColor 		[ 1.0 1.0 1.0,  1.0 1.0 1.0,  1.0 1.0 1.0 ]
#	groundAngle 		[ 1.0, 1.0 ]
# } # End of default background


# ====================================
# BEGIN INLINED USER-DEFINED OBJECT

# Disable for more than one shape 
#				Shape {				
#				# Set overall appearance for all PointSet coordinates - must be emissive 
#					appearance Appearance {
#						material Material { 
#   Manually set the color of the object
#							diffuseColor 1.0 1.0 1.0   #  IS objColor
#			    				emissiveColor 0.5 0.5 0.5  #  IS objColor
#							shininess 0.08
# Manually set the transparency of the object
# 							transparency 0.0

#						} # end Material 
#					} # end Appearance 


# RENDER THE USER-DEFINED SHAPE OR SHAPE(S)


#============================================
# HII Warp to 16kpc per Henderson 1982

# Transform for world position
Transform {
#	scale 1.0 1.0 1.0 
#	translation	 0, 0, 0 
# 	rotation 1.0 0.0 0.0  1.570796327
	children [ 
	

# =======================================
# Thin and Thick Disks
#  Per Cox2000 Table 23.2 
#     Thin disk is 325 pc thick or 0.1625 pc half thickness
#     Thick disk is 1.3 kpc thick or 0.650 pc half thickness  
#     Build two disks at + and - z half thickness distance 

Transform { 
#   Thin disk + z
#   Scale plates to 2 kpc circle 
#	scale 1.0 1.0 1.0 
	scale 0.1 0.1 0.1
	translation 0.0 0.0 0.1625 
#	rotation 0 0 0 0 0.000


children [ 


DEF ThinDiskPlus     Shape {
      appearance Appearance {
        material Material {
          diffuseColor 0.8 0.8 0.8
	  transparency 0.8
        } # end material
      } # end appearance
      
      geometry Extrusion {
        crossSection [
#          -0.3   0.0,
#           0.3   0.0,
#           0.3   -0.0,
#          -0.3  -0.0,
#          -0.3   0.0
          -0.8   0.0,
           0.8   0.0,
           0.8   -0.0,
          -0.8  -0.0,
          -0.8   0.0
        ] # end crossSection
        spine [
           2 , 0 , 0,
           1.9999999656612493 , -0.0003706143570511567 , 0,
           1.826950195014835 , -.8137892755101016 , 0,
           1.338022498002883 , -1.4865045559426064 , 0,
           .6177520017986632 , -1.9022046325970674 , 0,
           -.20932721960714026 , -1.9890153632215977 , 0,
           -1.000213966668657 , -1.7319272562324755 , 0,
           -1.6181646837413635 , -1.1753905973301868 , 0,
           -1.9563362879444839 , -.4156300379804108 , 0,
           -1.956259235125763 , .41599255400206975 , 0,
           -1.6179468476432293 , 1.175690434681399 , 0,
           -.9998930109423423 , 1.7321125733244525 , 0,
           -.20895863718811958 , 1.9890541189079003 , 0,
           .6181044833656933 , 1.9020901260569198 , 0,
           1.3382979349949997 , 1.4862565852463427 , 0,
           1.827100964641801 , .8134507145519022 , 0,
           2 , 0 , 0,
 
         ] # end spine
     } # end extrusion
    } # end shape


] # end children - Disk 

} # end transform - Disk 


# Thin disk -z
Transform { 
#   Thin disk - z
#   Scale plates to 2 kpc circle 
#	scale 1.0 1.0 1.0 
	scale 0.1 0.1 0.1
	translation 0.0 0.0 -0.1625 
#	rotation 0 0 0 0 0.000
children [ 
USE ThinDiskPlus 
] # end children - Disk 
} # end transform - Disk


# Thick disk z
Transform { 
#   Thick disk + z
#   Scale plates to 2 kpc circle 
#	scale 1.0 1.0 1.0 
	scale 0.1 0.1 0.1
	translation 0.0 0.0 0.650 
#	rotation 0 0 0 0 0.000
children [ 
USE ThinDiskPlus 
] # end children - Disk 
} # end transform - Disk


# Thick disk -z
Transform { 
#   Thick disk + z
#   Scale plates to 2 kpc circle 
#	scale 1.0 1.0 1.0 
	scale 0.1 0.1 0.1
	translation 0.0 0.0 -0.650 
#	rotation 0 0 0 0 0.000
children [ 
USE ThinDiskPlus 
] # end children - Disk 
} # end transform - Disk


] # end Transform Children Main

} # End Transform Main

# END RENDERING OF THE USER-DEFINED SHAPE (S)



