#VRML V2.0 utf8								
# World controller for a 3D data plotting application 
# Kurt A. Fisher fisherka@csolutions.net  beginner level VRML coder 
# 1/2004

#    This object coordinates the display of a 
#    menu controller panel,  3D axes with labels, and the 
#    display of up to 5 data sets.  More than 5 datasets may be 
#    displayed, but only 5 may be toggled to on and off 

#    Usage 
#        After initial display of this world,  use the viewpoint "Control panel" 
#        to change world display characteristics.  Leaving the viewpoint 
#        "Control panel" auto-hides the panel.  

#    Configuration
#        Searching on the term "KEY SETTING" will walk through 
#        the configurable variables in this object 

# To do

#     VRML normally plots with "z" pointing up out of the screen 
#       and the x-y axis plotting on the flat screen. 
#       The positive x-axis is to the right.
#       The positive y-axis is to the top. 
#
#     For display in normal galactic plane (z at top with positive x 
#       pointing out of the screen and towards the galactic center), 
#       A two-fold rotation is used to rotate the axis and world to the 
#       desired normal orientation. 

#       This rotation into normal galactic display is accomplished with 
#       two fold 90 degree rotations - once around the z axis and once around 
#       the x-axis.  Once these rotations are applied, x, y, z in a standard 
#       VRML rotation, if reference from outside the rotated object, are: 
#		Before		x	y	z
#		After		y	z	x

#       Tickmarks are at scaled 0.10 * scaleAxis[0] / scaleData[0] objects
#       E.g. - 0.10 & 6x axis scale up / 2x object scale up = .3 scale 

#  This application was developed for use in triaxial position modeling 
#   of astronomical objects.  Occassional coding references may reflect this bias. 

#  Objects used: 
#	Axes_Ctrl -  Scalable 3D axes with configurable labels and viewpoints
#	Data_Set(s) -  A collection of plot data in another url file, whose 
#		display characteristics can be configured, like a data series in a 
#		spreadsheet 
#	Control_Anchor_Item - One kind of abstracted menu line item used in the control panel 

#   Objects outline
#	Controller (this file)	->Control_Panel -> Views 	
#			-> Axes_Ctrl view 
#			-> Data views (Data_Sets) ->
#				Model ->
#				DataSet (external file) -> Plotting object types (lib directory) 

# =========================================================================
WorldInfo { 
	title 	"3D Data Plotting Application"
	info [	"Developer:  Kurt A. Fisher fisherka@csolutions.net ",
		"Level: beginner VRML coder",
		"No implied warranty for suitably of use.",
		"Version date:  December 2003"
	] 
}

# =========================================================================
# PROTOTYPES 

# =========================================================================
# BEGIN EXTERNAL PROTOTYPE TO RENDER AXES OBJECT  
EXTERNPROTO AXES_CTRL [ 
	exposedField MFString	strTitle			#  display label for world and scale 
	exposedField SFVec3f 	scaleAxis	 		#  the size of the axes; tickmarks are scaled at 0.10 * scaleAxis[0]/scaleData objects 
	exposedField SFColor	axisColor			#  color for the fonts and axes 
	exposedField SFVec3f	scaleViewPoints		#  scale viewpoints around world 
	exposedField SFVec3f	scaleTickMarkSize		#  scale size of sphere tick marks on axes
	exposedField MFString	lblaxisXplus		#  display label for world and scale 
	exposedField MFString	lblaxisXminus		#  display label for world and scale 
	exposedField MFString	lblaxisYplus		#  display label for world and scale 
	exposedField MFString	lblaxisYminus		#  display label for world and scale 
	exposedField MFString	lblaxisZplus		#  display label for world and scale 
	exposedField MFString	lblaxisZminus		#  display label for world and scale 
	exposedField MFString	urlWorldInfo		#  anchor for world information 
	exposedField SFRotation	convertCoordinateSys	#  Rotate the entire axes object to a new coordinate system; usually leave as 0 0 0 0.00
#							#      E.g. convert frame between galactic, equatorial and horizon systems 
] "lib_Axes_ctrl_proto.wrl"  
# end EXTERNPROTO 

EXTERNPROTO AXES_CTRL_POLAR_GR [ 
	exposedField SFVec3f 	scaleAxis	 		#  the size of the axes; tickmarks are scaled at 0.10 * scaleAxis[0]/scaleData objects 
							#        use z-axis vector = 0.0001 for one grid ( 1.0 1.0 1.0 .0001 ) and >0 to split into two grids ( 1 1 1 )
	exposedField SFColor	axisColor			#  color for the fonts and axes 
	exposedField SFVec3f	scaleTickMarkSize		#  scale size of sphere tick marks on axes
	exposedField SFRotation	convertCoordinateSys	#  Rotate the entire axes object to a new coordinate system; usually leave as 0 0 0 0.00
#							#      E.g. convert frame between galactic, equatorial and horizon systems 
] "lib_Axes_ctrl_polar_gr_proto.wrl"  
# end EXTERNPROTO 

EXTERNPROTO AXES_CTRL_POLAR_SP [ 
	exposedField SFVec3f 	scaleAxis	 		#  the size of the axes; tickmarks are scaled at 0.10 * scaleAxis[0]/scaleData objects 
	exposedField SFColor	axisColor			#  color for the fonts and axes 
	exposedField SFRotation	convertCoordinateSys	#  Rotate the entire axes object to a new coordinate system; usually leave as 0 0 0 0.00
#							#      E.g. convert frame between galactic, equatorial and horizon systems 
] "lib_Axes_ctrl_polar_sp_proto.wrl"  
# end EXTERNPROTO 

# =========================================================================
# BEGIN EXTERNAL PROTOTYPE TO RETRIEVE DATASETS 

# DATASET OBJECTS 
EXTERNPROTO DATA_SET [ 
	exposedField MFString	dataName		# data object name 
	exposedField SFInt32	showData		# 0=yes show dataset; 1=do not display dataset
	exposedField SFVec3f	scaleDataObjects 	#  change the scale of the objects in the world 
	exposedField MFString	dataURL		# path and filename of object data file to plot
] "lib_Dataset_view_proto.wrl" 
# end EXTERNPROTO 

# =========================================================================
# BEGIN EXTERNAL PROTOTYPE FOR CONTROL PANEL OBJECTS 

EXTERNPROTO Background_Switcher [ 
	exposedField	SFInt32		ctrlChoiceActionBG	#  sets which control choice will be sent onlclick 	
	eventIn		SFBool		set_booleanBG 	#  switch trigger 
] "lib_Component_ContrlButtons_p.wrl#Background_Switcher_Script" 

EXTERNPROTO CONTROL_ANCHOR_ITEM [ 
	exposedField	SFVec3f 	translate_Ctrl	#  Placement of control in control panel 
	exposedField	SFColor	ctrlColor		#  Color of control 
	exposedField 	MFString	strLabel		#  display text label for control 
	exposedField 	MFString	urlName		#  name for url to execute onClick; default is in new window
#						#  There is no need to specify the url description; same as label name
] "lib_Component_ContrlButtons_p.wrl#CONTROL_ANCHOR_ITEM" 

EXTERNPROTO Control_Button_Sphere_ON_MEM [ 
	exposedField 	SFFloat		ctrlTransparency	#  transparency of control 
	exposedField	SFInt32		ctrlChoiceAction	#  sets which control choice will be sent onlclick 
	eventIn		SFBool		set_boolean	#  on click in signal 
	eventOut	SFInt32		Control_choice 		#  out on click signal 
] "lib_Component_ContrlButtons_p.wrl#Control_Button_Sphere_ON_MEM" 

EXTERNPROTO Control_Button_Sphere_OFF_MEM [ 
	exposedField 	SFFloat		ctrlTransparency	#  transparency of control 
	exposedField	SFInt32		ctrlChoiceAction	#  sets which control choice will be sent onlclick 
	eventIn		SFBool		set_boolean	#  on click in signal 
	eventOut	SFInt32		Control_choice 		#  out on click signal 
] "lib_Component_ContrlButtons_p.wrl#Control_Button_Sphere_OFF_MEM" 

EXTERNPROTO Control_Button_Box_ON_MEM [ 
	exposedField 	SFFloat		ctrlTransparency	#  transparency of control 
	exposedField	SFInt32		ctrlChoiceAction	#  sets which control choice will be sent onlclick 
	eventIn		SFBool		set_boolean	#  on click in signal 
	eventOut	SFInt32		Control_choice 		#  out on click signal 
] "lib_Component_ContrlButtons_p.wrl#Control_Button_Box_ON_MEM" 

EXTERNPROTO Control_Button_Box_OFF_MEM [ 
	exposedField 	SFFloat		ctrlTransparency	#  transparency of control 
	exposedField	SFInt32		ctrlChoiceAction	#  sets which control choice will be sent onlclick 
	eventIn		SFBool		set_boolean	#  on click in signal 
	eventOut	SFInt32		Control_choice 		#  out on click signal 
] "lib_Component_ContrlButtons_p.wrl#Control_Button_Box_OFF_MEM" 

EXTERNPROTO Control_Label_Text_Format [ 
	exposedField 	MFString 	strLabel		#  text to display in label 
] "lib_Component_ContrlButtons_p.wrl#Control_Label_Text_Format" 

EXTERNPROTO Indicator_Clyinder [ 
	exposedField	SFVec3f 	translate_Ctrl		#  Placement of control on control panel 
	exposedField	SFRotation 	rotation_Ctrl	#  Rotation of control on control panel 
	exposedField 	SFFloat		ctrlTransparency	#  transparency of control 
] "lib_Component_ContrlButtons_p.wrl#Indicator_Clyinder"

EXTERNPROTO Control_Button_Cone_ON_NOMEM [ 
	exposedField 	SFFloat		ctrlTransparency	#  transparency of control 
	exposedField	SFInt32		ctrlChoiceAction	#  sets which control choice will be sent onlclick 
	eventIn		SFBool		set_boolean	#  on click in signal 
	eventOut	SFInt32		Control_choice 		#  on click choice out signal 
] "lib_Component_ContrlButtons_p.wrl#Control_Button_Cone_ON_NOMEM" 

EXTERNPROTO Control_Button_Cylinder_ON_NOMEM [ 
	exposedField 	SFFloat		ctrlTransparency	#  transparency of control 
	exposedField	SFInt32		ctrlChoiceAction	#  sets which control choice will be sent onlclick 
	eventIn		SFBool		set_boolean	#  on click in signal 
	eventOut	SFInt32		Control_choice 		#  on click choice out signal 
] "lib_Component_ContrlButtons_p.wrl#Control_Button_Cylinder_ON_NOMEM" 

EXTERNPROTO Control_Filter_Toggle_OFF_NOMEM [ 
	exposedField	SFInt32		ctrlChoiceAction	#  sets which control choice will be sent onlclick 
	eventIn		SFBool		set_boolean	#  on click in signal 
	eventOut	SFInt32			Control_choice 	#  on click choice out signal 
] "lib_Component_ContrlButtons_p.wrl#Control_Filter_Toggle_OFF_NOMEM" 

# =========================================================================
#  SCENE ENVIRONMENT CHARACTERISTICS 
# Initial background
#      Backgrounds are adjusted programatically by component script Background_Switcher.  
#     The default background is implemented here. 
#                   Syntax - Background_Switcher is implemented for CosmoPlayer compability 

#  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

# Navigation
		NavigationInfo {
#			type "EXAMINE"
			speed 1.0
			headlight FALSE
			avatarSize [ 0.005, 0.005, 0.005 ]
	        } # End of Navigation

# Directional lighting 
#	From the plane right to re-enforce the direction of the Galactic Core
#                In normal Galactic orientation ( +x to Galactic Core; +y to Cyngus) 
#                this makes the scene appear to be lighted by the Galacitc Core and 
#                aids in interpreting the orientation of the scene 
#                A reduced z plane angle (lower than 45 deg), enforces this theme

DEF LIGHTING Switch { 
	whichChoice 0
	choice [ 

	#            Description                            result after rotating 
# verison 0: Ahead 
	DirectionalLight { 
	#            'Astronomical' orientation 
	#			y          	z         	x
		direction 		0.0 	0.0	-1.0		#  on the x-plane, x-axis
	            ambientIntensity 0.5
	} # End of Directional lighting 

# verison 1: Morning - Left behind 
	DirectionalLight { 
#            Alternative 'natural light' orientation
#			y          	z         	x
	direction 		1.0	-0.5	-1.0		# above, behind and to the left
	ambientIntensity 0.5
	} # End of Directional lighting 

# verison 2: Evening - Right behind 
	DirectionalLight { 
#            Alternative 'natural light' orientation
#			y          	z         	x
	direction 		-1.0	-0.5	-1.0		# above, behind and to the left
            ambientIntensity 0.5
	} # End of Directional lighting

# version 3: Back 
	DirectionalLight { 
#            Back orientation 
#			y          	z         	x
	direction 		0.0 	0.0	1.0		#  on the x-plane, x-axis
            ambientIntensity 0.5
	} # End of Directional lighting

	] # end choice LIGHTING 
} # end Switch LIGHTING 

# End Scene Environment Characteristics 

# =========================================================================
# VIEWPOINTS 
#  Viewpoints are established by the Axes object 
#       AXES_CTRL "lib_Axes_ctrl_proto.wrl"  

# END SCENE VIEWPOINTS 

# =========================================================================
# BUILD WORLD 

# -------------------------------------------------------------------------------------------------
#  DEFINE THE 3-AXES 
#  Note label and scaling settings 

DEF AXES_GROUP_1 Switch { 
	whichChoice 0
	choice [ 

# version 0 Show display orthogonal axes system 
#  SET AXES AND LABEL ATTRIBUTES 
# Plot axes and labels and viewpoints enlarged scaled sufficiently to encompass all plotted objects 
#       Tickmarks are at scaled 0.10 * scaleAxis[0] / scaleData[0] objects
#       E.g. - 0.10 & 6x axis scale up / 2x object scale up = .3 scale 
# KEY SETTING - ORTHOGONAL AXES CHARACTERISTICS, SCALING AND LABELS 
# KEY SETTING - VIEWPOINT SCALING 
# KEY SETTING - WORLD TITLE BILLBOARD 
# KEY SETTING - WORLD INFO AND HELP PAGE PATH
AXES_CTRL { 
	strTitle			[ "Milky Way 3-D Plot", "Scale is", "1 tick mark =", "200 parsecs","~2kpc FOV" ]	#  display label for world and scale 
	scaleAxis			2.0 2.0 2.0 			#  the size of the axes; tickmarks at scaled 0.10 * scaleAxis[0] / scaleData[0] objects
	axisColor			1.0 0.0 0.0			#  color for the fonts and axes 
	scaleViewPoints		4.0 4.0 4.0			#  scale viewpoints around world 
	scaleTickMarkSize		0.005 0.005 0.005 		#  scale size of sphere tick marks on axes
	lblaxisXplus		[ "+X l=0 b=0","Sgr. Galactic core" ]	#  display label for world and scale 
	lblaxisXminus		[ "-X l=180", "b=0 Ori", "anti-center" ]	#  display label for world and scale 
	lblaxisYplus		[ "+Y l=90", "b=+0 Cyg", "direction of", "galactic rotation" ]	#  display label for world and scale 
	lblaxisYminus		[ "-Y l=270", "b=+0 Vel", "direction of", "galactic", "anti-rotation" ]	#  display label for world and scale 
	lblaxisZplus		[ "+Z l=0 b=+90","NGP ComB" ]	#  display label for world and scale 
	lblaxisZminus		[ "-Z l=0 b=-90","SGP Scl" ]	#  display label for world and scale 
	urlWorldInfo		[ "WorldInfo.htm" ]		#  anchor for world information 
	convertCoordinateSys	0.000 0.000 0.000 0.000	#  Rotate the entire axes object to a new coordinate system; usually leave as 0 0 0 0.00
#							#      E.g. convert frame between galactic, equatorial and horizon systems 
}

# verison 1: Do not show axes 
Group { children [  ] } 

	] # end choice AXES_GROUP_1
} # end Switch AXES_GROUP_1

DEF AXES_GROUP_2 Switch { 
	whichChoice 0
	choice [ 

# version 0 Show display axes in alternate orthogonal system 
# KEY SETTING - ALTERNATIVE ORTHOGONAL AXES CHARACTERISTICS
AXES_CTRL  { 
	strTitle			[ "Equatorial Coordinate System", "Celestial Sphere" ]	#  display label for world and scale 
	scaleAxis			2.0 2.0 2.0 			#  the size of the axes; tickmarks at scaled 0.10 * scaleAxis[0] / scaleData[0] objects
	axisColor			0.0 0.0 1.0			#  color for the fonts and axes 
	scaleViewPoints		4.0 4.0 4.0			#  scale viewpoints around world 
	scaleTickMarkSize		0.005 0.005 0.005 		#  scale size of sphere tick marks on axes
	lblaxisXplus		[ "+X RA=0hr Dec=0", "vernal equinox", "Sun in Psc", "Vir at night zenith", "beg. spring 3/21", "Earth revolves Sun", "this direction -->", "Celestial sphere rotates", "<-- this direction" ]	#  display label for world and scale 
	lblaxisXminus		[ "-X RA=12hr Dec=0", "autumnal equinox", "Sun in Vir",  "Psc at night zenith", "beg. autumn 9/21" ]	#  display label for world and scale 
	lblaxisYplus		[ "+Y RA=6hr Dec=+0", "summer solstice", "Sun in Gem", "Sgr at night zenith", "beg. summer 6/21"  ]	#  display label for world and scale 
	lblaxisYminus		[ "-Y RA=18hr Dec=+0", "winter solstice", "Sun in Sgr", "Gem at night zenith", "beg. winter 12/21" ]	#  display label for world and scale 
	lblaxisZplus		[ "+Z RA=0hr Dec=+90","NCP UMi" ]	#  display label for world and scale 
	lblaxisZminus		[ "-Z RA=0hr Dec=-90","SCP Oct" ]	#  display label for world and scale 
	urlWorldInfo		[ "WorldInfo.htm" ]		#  anchor for world information 
#	convertCoordinateSys	0.000 0.000 0.000 0.000	#  Rotate the entire axes object to a new coordinate system; usually leave as 0 0 0 0.00
#				   			#      E.g. convert frame between galactic, equatorial and horizon systems 
	convertCoordinateSys	0.273 0.821 -0.502 2.302	 	#  Rotate the entire axes object to a new coordinate system; usually leave as 0 0 0 0.00
#   0.273 0.821 -0.502 2.302  is the two-fold rotation from the galactic to the equatorial coordinate systems 
}  

# verison 1: Do not show axes 
Group { children [  ] } 

	] # end choice AXES_GROUP_2
} # end Switch AXES_GROUP_2

DEF AXES_GROUP_3 Switch { 
	whichChoice 0
	choice [ 

# version 0 Show display axes in polar system 
# KEY SETTING - POLAR AXES CHARACTERISTICS
AXES_CTRL_POLAR_GR { 
	scaleAxis			2.0 2.0 0.0001		#  the size of the axes; tickmarks at scaled 0.10 * scaleAxis[0] / scaleData[0] objects
							#        use z-axis vector = 0.0001 for one grid ( 1.0 1.0 1.0 .0001 ) and >0 to split into two grids ( 1 1 1 )
	axisColor			1.0 0.0 0.0			#  color for the fonts and axes 
	convertCoordinateSys	0.000 0.000 0.000 0.000	#  Rotate the entire axes object to a new coordinate system; usually leave as 0 0 0 0.00
#							#      E.g. convert frame between galactic, equatorial and horizon systems 
}  

# verison 1: Do not show axes 
Group { children [  ] } 

	] # end choice AXES_GROUP_3
} # end Switch AXES_GROUP_3

DEF AXES_GROUP_4 Switch { 
	whichChoice 0
	choice [ 

# version 0 Show display axes in alternate polar system 
# KEY SETTING - ALTERNATIVE POLAR AXES CHARACTERISTICS
AXES_CTRL_POLAR_SP { 
	scaleAxis			2.0 2.0 2.0 			#  the size of the axes; tickmarks at scaled 0.10 * scaleAxis[0] / scaleData[0] objects
	axisColor			0.0 0.0 1.0			#  color for the fonts and axes 
	convertCoordinateSys	0.273 0.821 -0.502 2.302	 #  Rotate the entire axes object to a new coordinate system; usually leave as 0 0 0 0.00
#   0.273 0.821 -0.502 2.302  is the two-fold rotation from the galactic to the equatorial coordinate systems 
}  

# verison 1: Do not show axes 
Group { children [  ] } 

	] # end choice AXES_GROUP_4
} # end Switch AXES_GROUP_4


# -------------------------------------------------------------------------------------------------
# SET THE DATA TO BE DISPLAYED 
#  Using PROTOTYPE DATASET 
# 	showData		# 0=yes show dataset; 1=do not display dataset
# 	scaleDataObjects 	#  change the scale of the objects in the world 
# 	dataURL		# path and filename of object data file to plot

#	----------------------------------------------------------------------------------------
DEF DATA_GROUP_1 Switch { 
	whichChoice 0
	choice [ 
# verison 0: Show datagroup  
# KEY SETTING - DATA SET PATH AND SCALING 
DATA_SET { dataName "DataSet 1" showData 0 scaleDataObjects 1.0 1.0 1.0	dataURL "data_DataSet1ClarkOBAssoc.wrl"  }          # note relative path from library 
# verison 1: Do not Show datagroup 
Group { children [  ] } 
	] # end choice DATA_GROUP_1 
} # end Switch DATA_GROUP_1 

#	----------------------------------------------------------------------------------------
DEF DATA_GROUP_2 Switch { 
	whichChoice 0
	choice [ 
# verison 0: Show datagroup  
# KEY SETTING - DATA SET PATH AND SCALING - Substitute Group { children [  ] }  for no data
DATA_SET { dataName "DataSet 2" showData 0 scaleDataObjects 1.0 1.0 1.0	dataURL "data_DataSet2.wrl" } 
# verison 1: Do not Show datagroup 
Group { children [  ] } 
	] # end choice DATA_GROUP_2 
} # end Switch DATA_GROUP_2 

#	----------------------------------------------------------------------------------------
DEF DATA_GROUP_3 Switch { 
	whichChoice 0
	choice [ 
# verison 0: Show datagroup  
# KEY SETTING - DATA SET PATH AND SCALING - Substitute Group { children [  ] }  for no data
DATA_SET { dataName "DataSet 3" showData 0 scaleDataObjects 1.0 1.0 1.0  	dataURL "data_DataSet3.wrl" } 
# verison 1: Do not Show datagroup 
Group { children [  ] } 
	] # end choice DATA_GROUP_3 
} # end Switch DATA_GROUP_3 

#	----------------------------------------------------------------------------------------
DEF DATA_GROUP_4 Switch { 
	whichChoice 0
	choice [ 
# verison 0: Show datagroup  
# KEY SETTING - DATA SET PATH AND SCALING - Substitute Group { children [  ] }  for no data
DATA_SET { dataName "DataSet 4" showData 0 scaleDataObjects 1.0 1.0 1.0 dataURL "data_DataSet4.wrl" }
# verison 1: Do not Show datagroup 
Group { children [  ] } 
	] # end choice DATA_GROUP_4 
} # end Switch DATA_GROUP_4 

#	----------------------------------------------------------------------------------------
DEF DATA_GROUP_5 Switch { 
	whichChoice 0
	choice [ 
# verison 0: Show datagroup  
# KEY SETTING - DATA SET PATH AND SCALING - Substitute Group { children [  ] }  for no data 
DATA_SET { dataName "DataSet 5" showData 0 scaleDataObjects 1.0 1.0 1.0  	dataURL "data_DataSet5.wrl" }
# verison 1: Do not Show datagroup 
Group { children [  ] } 
	] # end choice DATA_GROUP_5 
} # end Switch DATA_GROUP_5 


# =========================================================================
# CONTROLLERS 

DEF TOGGLE_PANEL Switch { 
	whichChoice 0
	choice [ 

# Panel window displayed version 0: 
# CONTROLLER PANEL 
	
# Transparent panel window
DEF PANELWINDOW Transform {
# KEY SETTING - CONTROL PANEL POSITION OF CONTROLLER PANEL IN WORLD 
#     translation -0.65 0 3.50  
# HARD CODED PROGRAM CHANGE THIS WORLD - MOVE CONTROLLER PANEL UP to 1.5 kpc
# ALSO CHANGE CONTROLLER PANEL VIEWPOINT SETTING HANDLER - BELOW 
      translation -0.65 +1.5 3.50  
	rotation 0 1 0 .78 
	scale 0.2 0.2 0.2 
	children [

# Control panel - thin translucent plane 
		DEF PANELBOX Shape {
			appearance Appearance {
				material Material { 
					ambientIntensity 0
			   		diffuseColor 0.9 0.9 0.9 
					transparency .7
                          			} # end Material 
	                		} # end Appearance 
                			geometry Box { 
# DEVELOPER SETTING - SIZE OF THE CONTROLLER PANEL 
				size 7.0 6.5 0.02   # {size IS panelSize}
			} # end geometry 
		} # End Shape Panel 

# Menubar
		DEF MENUBAR Transform {
#					y	z	x
# DEVELOPER SETTING - POSITION OF THE MENUBAR ON THE PANEL 
			translation 	0 	3.75	0 
			children [	
# Menubar strip 
			DEF MENUBARSTRIP Shape {   
              	  		appearance Appearance {
                          				material Material { 
				    		diffuseColor 0.6 0.6 1.0
						transparency .7
					  } # end Material
	              	  	}    # end Appearance 
		                	geometry Box { size 7.0 1.0 0.02 } # {size IS menuSize}
			} # end Shape menubar strip  

# Menubar text
			DEF MENUBARTEXT Transform {
		                	translation 0 -0.2 0.03 
				scale .8 .8 .8  
	                		children [
			              	Shape {
					appearance Appearance {
						material Material {
							diffuseColor 0.7 0.7 0.7 
						} # end Material
				                            }    # end Appearance 		
					geometry Text {
						string "Show on\of"  # IS headerText
						fontStyle FontStyle {
							justify "MIDDLE"  
							family "SANS"
							style "BOLD"  
							size 1.0 
						} # end FontStyle  
					} # end Geometry 
				} # end Shape Text Menubar Text 
			]  # end children 
		} # end Transform Menubar Text 

		] # end children Menubar
	} # end Transform Menubar 

# Panel objects, passed in
DEF PANEL_CONTROLS Transform {
#			y	z	x
# DEVELOPER SETTING - POSITION OF THE PANEL MENU ITEMS 
	translation 	-3	2.8	.01
	scale 		.6 	.6 	.6
	children [ 

# ---------------------------------------------------------------------------
# FIRST CONTROL MENU ITEM ON PANEL  AN OPTION GROUP - ONCLICK CONTROLLER
# AXES DISPLAY CONTROLLERS 
# Toggles alternative axes displays 
	DEF CONTROL_1 Transform { 
		translation 0 0 0 
		children [ 

# Control item label 
			DEF CONTROL_LABEL Transform { 
#   nudged down to button baseline 
				translation 0.3 -0.35 0.0 
				children [

# KEY SETTING - CONTROLLER PANEL MENU ITEM TEXT		
					DEF Item_label Control_Label_Text_Format { strLabel "Axes" }

				] # end children CONTROL_LABEL text
			} # end Transform CONTROL_LABEL text

		] # end children Transform CONTROL_1
	} # end children Transform CONTROL_1

# Control item button - Orthogonal 
			DEF CONTROL_ICON_0 Transform { 
#   nudged down to button baseline 
				translation 	6.5 	0.0 	0.20
				children [
# Control button 
			DEF Control_Button TouchSensor { } 
			DEF Control_Button_Icon_0 Control_Button_Box_ON_MEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 

		] # end children CONTROL_ICON_0

# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button.isActive TO Control_Button_Icon_0.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Icon_0.Control_choice TO AXES_GROUP_1.set_whichChoice 

		} # end Transform CONTROL_ICON_0


# Control item button - Alternate Orthogonal 
			DEF CONTROL_ICON_1 Transform { 
#   nudged down to button baseline 
				translation 	8.7 	0.0 	0.20
				children [

# Control button 
			DEF Control_Button_1 TouchSensor { } 
			DEF Control_Button_Icon_1 Control_Button_Box_OFF_MEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 

		] # end children CONTROL_ICON_1

# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_1.isActive TO Control_Button_Icon_1.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Icon_1.Control_choice TO AXES_GROUP_2.set_whichChoice 

		} # end Transform CONTROL_ICON_1

# Control item button - Polar 
			DEF CONTROL_ICON_2 Transform { 
#   nudged down to button baseline 
				translation 	7.6 	0.0 	0.20
				children [
# Control button 
			DEF Control_Button_2 TouchSensor { } 
			DEF Control_Button_Icon_2 Control_Button_Sphere_OFF_MEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 

		] # end children CONTROL_ICON_2

# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_2.isActive TO Control_Button_Icon_2.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Icon_2.Control_choice TO AXES_GROUP_3.set_whichChoice 

		} # end Transform CONTROL_ICON_2

# Control item button - Alternate Polar 
			DEF CONTROL_ICON_3 Transform { 
#   nudged down to button baseline 
				translation 	9.8 	0.0 	0.20
				children [

# Control button 
			DEF Control_Button_3 TouchSensor { } 
			DEF Control_Button_Icon_3 Control_Button_Sphere_OFF_MEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 

		] # end children CONTROL_ICON_3

# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_3.isActive TO Control_Button_Icon_3.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Icon_3.Control_choice TO AXES_GROUP_4.set_whichChoice 

		} # end Transform CONTROL_ICON_3

# ---------------------------------------------------------------------------
# SECOND CONTROL MENU ITEM ON PANEL - ANCHOR CONTROLLER
DEF CONTROL_2 CONTROL_ANCHOR_ITEM {  
	translate_Ctrl	0.00 -1.0 0.10 	#  Placement of control in control panel 
	strLabel		["Info"]		#  display text label for control 
	ctrlColor		0.6 0.6 1.0 		#  Color of control 
# KEY SETTING - PATH TO WORL INFO AND HELP PAGE 
 	urlName		["WorldInfo.htm"]	# url to execute in new window onclick 
} # No router script needed for anchor node

# ---------------------------------------------------------------------------
# THIRD CONTROL MENU ITEM ON PANEL - ANCHOR CONTROLLER
DEF CONTROL_3 CONTROL_ANCHOR_ITEM {  
	translate_Ctrl	0.00 -2.0 0.10 	#  Placement of control in control panel 
	strLabel		["Legend"]	#  display text label for control 
	ctrlColor		0.6 0.6 1.0 		#  Color of control 
# KEY SETTING - PATH TO WORLD LEGEND
 	urlName		["Legend.wrl"]	# url to execute in new window onclick 
} # No router script needed for anchor node

# ---------------------------------------------------------------------------
# FOURTH CONTROL MENU ITEM ON PANEL  - ONCLICK CONTROLLER
	DEF CONTROL_4 Transform { 
		translation 0 -3 0.1 
		children [ 
# Control button 
			DEF Control_Button_4 TouchSensor { } 
			DEF Control_Button_Icon_4_0 Control_Button_Sphere_ON_MEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 
			# Filter Script Routers are below for compatiability with CosmoPlayer 2.1 

# Control item label 
			DEF CONTROL_LABEL Transform { 
#   nudged down to button baseline 
				translation 0.3 -0.35 0 
				children [

# KEY SETTING - CONTROLLER PANEL MENU ITEM TEXT		
					DEF Item_label Control_Label_Text_Format { strLabel "OB Assoc w/i 650 pc" }

			] # end children CONTROL_LABEL text
			} # end Transform CONTROL_LABEL text

	] # end children Transform CONTROL_4

# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_4.isActive TO Control_Button_Icon_4_0.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Icon_4_0.Control_choice TO DATA_GROUP_1.set_whichChoice 


	} # end Transform CONTROL_4

# ---------------------------------------------------------------------------
# FIFTH CONTROL MENU ITEM ON PANEL  - ONCLICK CONTROLLER
	DEF CONTROL_5 Transform { 
		translation 0 -4 0.2 
		children [ 
# Control button 
			DEF Control_Button_5 TouchSensor { } 
			DEF Control_Button_Icon_5_0 Control_Button_Sphere_ON_MEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 
			# Filter Script Routers are below for compatiability with CosmoPlayer 2.1 

# Control item label 
			DEF CONTROL_LABEL Transform { 
#   nudged down to button baseline 
				translation 0.3 -0.35 0 
				children [

# KEY SETTING - CONTROLLER PANEL MENU ITEM TEXT		
					DEF Item_label Control_Label_Text_Format { strLabel "Galactic arms" }

			] # end children CONTROL_LABEL text
			} # end Transform CONTROL_LABEL text

		] # end children Transform CONTROL_5

# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_5.isActive TO Control_Button_Icon_5_0.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Icon_5_0.Control_choice TO DATA_GROUP_2.set_whichChoice 

		} # end Transform CONTROL_5

# ---------------------------------------------------------------------------
# SIXTH CONTROL MENU ITEM ON PANEL  - ONCLICK CONTROLLER
	DEF CONTROL_6 Transform { 
		translation 0 -5 0.1 
		children [ 
# Control button 
			DEF Control_Button_6 TouchSensor { } 
			DEF Control_Button_Icon_6_0 Control_Button_Sphere_ON_MEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 
			# Filter Script Routers are below for compatiability with CosmoPlayer 2.1 

# Control item label 
			DEF CONTROL_LABEL Transform { 
#   nudged down to button baseline 
				translation 0.3 -0.35 0 
				children [

# KEY SETTING - CONTROLLER PANEL MENU ITEM TEXT		
					DEF Item_label Control_Label_Text_Format { strLabel "Dark nebula features" }

			] # end children CONTROL_LABEL text
			} # end Transform CONTROL_LABEL text

		] # end children Transform CONTROL_6

# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_6.isActive TO Control_Button_Icon_6_0.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Icon_6_0.Control_choice TO DATA_GROUP_3.set_whichChoice 

		} # end Transform CONTROL_6

# ---------------------------------------------------------------------------
# SEVENTH CONTROL MENU ITEM ON PANEL  - ONCLICK CONTROLLER
	DEF CONTROL_7 Transform { 
		translation 0 -6 0.10 
		children [ 
# Control button 
			DEF Control_Button_7 TouchSensor { } 
			DEF Control_Button_Icon_7_0 Control_Button_Sphere_ON_MEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 
			# Filter Script Routers are below for compatiability with CosmoPlayer 2.1 

# Control item label 
			DEF CONTROL_LABEL Transform { 
#   nudged down to button baseline 
				translation 0.3 -0.35 0 
				children [

# KEY SETTING - CONTROLLER PANEL MENU ITEM TEXT		
					DEF Item_label Control_Label_Text_Format { strLabel "HI features | Stellar disks" }
				
			] # end children CONTROL_LABEL text
			} # end Transform CONTROL_LABEL text

		] # end children Transform CONTROL_7

# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_7.isActive TO Control_Button_Icon_7_0.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Icon_7_0.Control_choice TO DATA_GROUP_4.set_whichChoice 

		} # end Transform CONTROL_7

# ---------------------------------------------------------------------------
# EIGHTH CONTROL MENU ITEM ON PANEL  - ONCLICK CONTROLLER
	DEF CONTROL_8 Transform { 
		translation 0 -7 0.1 
		children [ 
# Control button 
			DEF Control_Button_8 TouchSensor { } 
			DEF Control_Button_Icon_8_0 Control_Button_Sphere_ON_MEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 
			# Filter Script Routers are below for compatiability with CosmoPlayer 2.1 

# Control item label 
			DEF CONTROL_LABEL Transform { 
#   nudged down to button baseline 
				translation 0.3 -0.35 0 
				children [

# KEY SETTING - CONTROLLER PANEL MENU ITEM TEXT		
					DEF Item_label Control_Label_Text_Format { strLabel "MW Galaxy Schematic" }

			] # end children CONTROL_LABEL text
			} # end Transform CONTROL_LABEL text

		] # end children Transform CONTROL_8

# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_8.isActive TO Control_Button_Icon_8_0.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Icon_8_0.Control_choice TO DATA_GROUP_5.set_whichChoice 

		} # end children Transform CONTROL_8

# ---------------------------------------------------------------------------
# NINTH CONTROL MENU ITEM ON PANEL  - OPTION GROUP - LIGHTING CONTROLS 
	DEF CONTROL_9 Transform { 
		translation 0 -8 0 
		children [ 

# Control item label 
			DEF CONTROL_LABEL Transform { 
#   nudged down to button baseline 
				translation 0.3 -0.35 0 
				children [

# KEY SETTING - CONTROLLER PANEL MENU ITEM TEXT		
					DEF Item_label Control_Label_Text_Format { strLabel "Lighting" }

			] # end children CONTROL_LABEL text
			} # end Transform CONTROL_LABEL text


# Option Group indicator 
DEF OPTION_INDICATOR_1 Switch {
	whichChoice 0
	choice [ 

DEF Indicator_Box_0 Indicator_Clyinder { translate_Ctrl 6.5 	0.0 0.00 rotation_Ctrl 1.0 0.0 	0.0 1.547 } # end Transform Indicator_Box_0

DEF Indicator_Box_1 Indicator_Clyinder { translate_Ctrl 7.6 	0.0 0.00 rotation_Ctrl 1.0 0.0 	0.0 1.547 } # end Transform Indicator_Box_1

DEF Indicator_Box_2 Indicator_Clyinder { translate_Ctrl 8.7 	0.0 0.00 rotation_Ctrl 1.0 0.0 	0.0 1.547 } # end Transform Indicator_Box_2

DEF Indicator_Box_3 Indicator_Clyinder { translate_Ctrl 9.8 	0.0 0.00 rotation_Ctrl 1.0 0.0	0.0 1.547 } # end Transform Indicator_Box_3

	] # end choice Switch Option_Indicator_1
} # end Switch Option_Indicator_1


# Implements Ahead Lighting
			DEF CONTROL_ICON_0 Transform { 
#   nudged down to button baseline 
				translation 	6.5 	-0.1 	0.20
				rotation 		1.0 	0.0 	0.0	3.142
			children [

# ctrlChoiceAction sets the output integer sent on the onClick action.  This drives a switch statement.  

# Initial ON for this option group - syntax unique code 
# Control item button 
	DEF Control_Button_9_0 TouchSensor { } 
	DEF Control_Button_Cone_9_0 Control_Button_Cone_ON_NOMEM { ctrlChoiceAction 0 ctrlTransparency 0.7 } 

			] # end children CONTROL_ICON_0
		
# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_9_0.isActive TO Control_Button_Cone_9_0.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Cone_9_0.Control_choice TO LIGHTING.set_whichChoice 
			ROUTE Control_Button_Cone_9_0.Control_choice TO OPTION_INDICATOR_1.set_whichChoice 

		} # end Transform CONTROL_ICON_0

# Implements Evening Lighting
			DEF CONTROL_ICON_1 Transform { 
#   nudged down to button baseline 
				translation 	7.6 	-0.1 	0.20
				rotation 		1.0 	0.0 	0.0	-2.375
				children [

# Control item button 
	DEF Control_Button_9_1 TouchSensor { } 
	DEF Control_Button_Cone_9_1 Control_Button_Cone_ON_NOMEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 

			] # end children CONTROL_ICON_1
		
# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_9_1.isActive TO Control_Button_Cone_9_1.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Cone_9_1.Control_choice TO LIGHTING.set_whichChoice 
			ROUTE Control_Button_Cone_9_1.Control_choice TO OPTION_INDICATOR_1.set_whichChoice 

		} # end Transform CONTROL_ICON_1

# Implements Morning Lighting
			DEF CONTROL_ICON_2 Transform { 
#   nudged down to button baseline 
				translation 	8.7 	-0.1 	0.20
				rotation 		1.0 	0.0 	0.0	2.357
				children [

# Control item button 
	DEF Control_Button_9_2 TouchSensor { } 
	DEF Control_Button_Cone_9_2 Control_Button_Cone_ON_NOMEM { ctrlChoiceAction 2 ctrlTransparency 0.7 } 

			] # end children CONTROL_ICON_1
		
# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_9_2.isActive TO Control_Button_Cone_9_2.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Cone_9_2.Control_choice TO LIGHTING.set_whichChoice 
			ROUTE Control_Button_Cone_9_2.Control_choice TO OPTION_INDICATOR_1.set_whichChoice 

		} # end Transform CONTROL_ICON_2

# Implements Back Lighting
			DEF CONTROL_ICON_3 Transform { 
#   nudged down to button baseline 
				translation 	9.8 	0.1 	0.20
				rotation 		0.0 	0.0 	0.0	0.0
				children [

# Control item button 
	DEF Control_Button_9_3 TouchSensor { } 
	DEF Control_Button_Cone_9_3 Control_Button_Cone_ON_NOMEM { ctrlChoiceAction 3 ctrlTransparency 0.7 } 

			] # end children CONTROL_ICON_1
		
# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_9_3.isActive TO Control_Button_Cone_9_3.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_Cone_9_3.Control_choice TO LIGHTING.set_whichChoice 
			ROUTE Control_Button_Cone_9_3.Control_choice TO OPTION_INDICATOR_1.set_whichChoice 

		} # end Transform CONTROL_ICON_3

		] # end children Transform CONTROL_9
	} # end children Transform CONTROL_9

# ---------------------------------------------------------------------------
# TENTH CONTROL MENU ITEM ON PANEL  - OPTION GROUP - BACKGROUND LIGHTING 
	DEF CONTROL_10 Transform { 
		translation 0 -9 0 
		children [ 

# Control item label 
			DEF CONTROL_LABEL Transform { 
#   nudged down to button baseline 
				translation 0.3 -0.35 0 
				children [

# KEY SETTING - CONTROLLER PANEL MENU ITEM TEXT		
					DEF Item_label Control_Label_Text_Format { strLabel "Background" }

			] # end children CONTROL_LABEL text
			} # end Transform CONTROL_LABEL text

# Option Group indicator 
DEF OPTION_INDICATOR_2 Switch {
	whichChoice 0
	choice [ 

DEF Indicator_Box_0_A Indicator_Clyinder { translate_Ctrl 6.5 -0.10 0.00 rotation_Ctrl 1.0 0.0 0.0 1.547 } # end Transform Indicator_Box_0_A

DEF Indicator_Box_1_A Indicator_Clyinder { translate_Ctrl 7.6 -0.10 0.00  rotation_Ctrl 1.0 0.0	0.0 1.547 } # end Transform Indicator_Box_1_A

DEF Indicator_Box_2_A Indicator_Clyinder { translate_Ctrl 8.7 -0.10 0.00  rotation_Ctrl 1.0 0.0 0.0 1.547} # end Transform Indicator_Box_2_A

DEF Indicator_Box_3-A Indicator_Clyinder { translate_Ctrl 9.8 -0.10 0.00  rotation_Ctrl 1.0 0.0 0.0 1.547 } # end Transform Indicator_Box_3_A

	] # end choice Switch Option_Indicator_2
} # end Switch Option_Indicator_2


# Implements Background White Lighting
			DEF CONTROL_ICON_0_A Transform { 
#   nudged down to button baseline 
				translation 	6.5 	-0.1 	0.20
		 		rotation 		1.0 	0.0 	0.0	1.547
				children [

# ctrlChoiceAction sets the output integer sent on the onClick action.  This drives a switch statement.  

# Control item button 
	DEF Background_Switcher_10_0 Background_Switcher { ctrlChoiceActionBG 0 } #  Case White 
	DEF Control_Button_10_0 TouchSensor { } 
	DEF Control_Button_Cylinder_10_0 Control_Button_Cylinder_ON_NOMEM { ctrlChoiceAction 0 ctrlTransparency 0.7 } 

			] # end children CONTROL_ICON_0_A
		
# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_10_0.isActive TO Control_Button_Cylinder_10_0.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_10_0.isActive TO Background_Switcher_10_0.set_booleanBG 
			ROUTE Control_Button_Cylinder_10_0.Control_choice TO OPTION_INDICATOR_2.set_whichChoice 

		} # end Transform CONTROL_ICON_0

# Implements Gray Background Lighting
			DEF CONTROL_ICON_1_A Transform { 
#   nudged down to button baseline 
				translation 	7.6 	-0.1 	0.20
		 		rotation 		1.0 	0.0 	0.0	1.547
				children [

# Control item button 
	DEF Background_Switcher_10_1 Background_Switcher { ctrlChoiceActionBG 1 }  #  Case Gray
	DEF Control_Button_10_1 TouchSensor { } 
	DEF Control_Button_Cylinder_10_1 Control_Button_Cylinder_ON_NOMEM { ctrlChoiceAction 1 ctrlTransparency 0.7 } 

			] # end children CONTROL_ICON_1_A
		
# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_10_1.isActive TO Control_Button_Cylinder_10_1.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_10_1.isActive TO Background_Switcher_10_1.set_booleanBG
			ROUTE Control_Button_Cylinder_10_1.Control_choice TO OPTION_INDICATOR_2.set_whichChoice 

		} # end Transform CONTROL_ICON_1

# Implements Black Background Lighting
			DEF CONTROL_ICON_2_A Transform { 
#   nudged down to button baseline 
				translation 	8.7 	-0.1 	0.20
		 		rotation 		1.0 	0.0 	0.0	1.547
				children [

# Control item button 
	DEF Background_Switcher_10_2 Background_Switcher { ctrlChoiceActionBG 2 } # Case Black 
	DEF Control_Button_10_2 TouchSensor { } 
	DEF Control_Button_Cylinder_10_2 Control_Button_Cylinder_ON_NOMEM { ctrlChoiceAction 2 ctrlTransparency 0.7 } 

			] # end children CONTROL_ICON_2_A
		
# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_10_2.isActive TO Control_Button_Cylinder_10_2.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_10_2.isActive TO Background_Switcher_10_2.set_booleanBG 
			ROUTE Control_Button_Cylinder_10_2.Control_choice TO OPTION_INDICATOR_2.set_whichChoice 

		} # end Transform CONTROL_ICON_2

# Implements Red Background Lighting
			DEF CONTROL_ICON_3_A Transform { 
#   nudged down to button baseline 
				translation 	9.8 	-0.1 	0.20
		 		rotation 		1.0 	0.0 	0.0	1.547
				children [

# Control item button 
	DEF Background_Switcher_10_3 Background_Switcher { ctrlChoiceActionBG 3 }  # Case Red
	DEF Control_Button_10_3 TouchSensor { } 
	DEF Control_Button_Cylinder_10_3 Control_Button_Cylinder_ON_NOMEM { ctrlChoiceAction 3 ctrlTransparency 0.7 } 

			] # end children CONTROL_ICON_3_A
		
# Filter script routers are outside end children for Cosmoplayer 2.1 compatability 
			ROUTE Control_Button_10_3.isActive TO Control_Button_Cylinder_10_3.set_boolean 
#  KEY ROUTING STATEMENT TO CONTROL DISPLAY OF THIS OBJECT
			ROUTE Control_Button_10_3.isActive TO Background_Switcher_10_3.set_booleanBG 
			ROUTE Control_Button_Cylinder_10_3.Control_choice TO OPTION_INDICATOR_2.set_whichChoice 

		} # end Transform CONTROL_ICON_3

		] # end children Transform CONTROL_10
	} # end children Transform CONTROL_10

# END OF TENTH CONTROL MENU ITEM ON PANEL  - OPTION GROUP - BACKGROUND LIGHTING 
# ---------------------------------------------------------------------------

	] # end children PANEL_CONTROLS
	} # end Transform PANEL_CONTROLS

] # end children PANELWINDOW
}  # end Transform PANELWINDOW

# NULL CHOICE ON SWITCH - hides window  version 1: 
DEF NULL_CHOICE Group { children [ ] } 

	] # end choice TOGGLE_PANEL 
} # end Switch TOGGLE_PANEL 


# ===========================================================
# INITIALIZATION SCRIPT AND INITIAL VIEWPOINT 

# KEY SETTINGS - WORLD INITIAL VIEWPOINT 
	# polar x=0 deg, z=5 deg
	DEF INITIAL_VIEWPOINT Viewpoint { 


		description "Initial viewpoint"
#				y          z         x
# Default
#		position 		+0.000 +0.087 +1.000 		position 		+0.000 +0.609 +7.000 
#				y       z        x        rot
# Default	orientation 	0.000 1.000  0.000 0.000

# Special setting scaled to world 
# polar x=0 deg, z=90 deg
#		description "polar x=0 deg, z=90 deg"
#				y          z         x
		position 		+0.000 +5.200 -0.174 
#				y       z        x        rot
		orientation 	1.000 0.000  0.000 -1.571

		jump	TRUE
	} # end of Viewpoint


# ===========================================================
# Initialization setting 
#     - set view - do not display the controller panel on start up 
#    -  set view -  do not display the alternative axes on startup 
DEF get_Initialize Script {
	url [ 
		"javascript:
		 function initialize (  ) {
			 // Do not display control panel 
			Control_choice = 1;

// Syntax - Cosmo compatability - force initial viewpoint 
			//  force initial viewpoint 
			set_boolean_vp_true = true; 
			set_boolean_ctrl_true = true; 
		}"
	] # end url 
	# Output events 
		eventOut SFInt32 Control_choice 
		eventOut SFBool set_boolean_vp_true
		eventOut SFBool set_boolean_ctrl_true 
	}  # end Script
	# Router 
	ROUTE get_Initialize.Control_choice TO TOGGLE_PANEL.set_whichChoice  
# KEY SETTINGS - DISABLE DISPLAY OF AXES ON STARTUP 
# Turn alternative axes off 
	ROUTE get_Initialize.Control_choice TO AXES_GROUP_2.set_whichChoice 

#  Special - turn on polar grid axes
#	ROUTE get_Initialize.Control_choice TO AXES_GROUP_3.set_whichChoice  
	ROUTE get_Initialize.set_boolean_ctrl_true TO Control_Button_Icon_2.set_boolean 

	ROUTE get_Initialize.Control_choice TO AXES_GROUP_4.set_whichChoice  
	ROUTE get_Initialize.set_boolean_vp_true TO INITIAL_VIEWPOINT.set_bind
# KEY SETTINGS - DISABLE DISPLAY OF DATASETS ON STARTUP 
	#  Second dataset 
#	ROUTE get_Initialize.set_boolean_ctrl_true TO Control_Button_Icon_5_0.set_boolean 
#	ROUTE Control_Button_Icon_5_0.Control_choice TO DATA_GROUP_2.set_whichChoice
	#  Third dataset 
	ROUTE get_Initialize.set_boolean_ctrl_true TO Control_Button_Icon_6_0.set_boolean 
	ROUTE Control_Button_Icon_6_0.Control_choice TO DATA_GROUP_3.set_whichChoice
	#  Fourth dataset 8
	ROUTE get_Initialize.set_boolean_ctrl_true TO Control_Button_Icon_7_0.set_boolean 
	ROUTE Control_Button_Icon_7_0.Control_choice TO DATA_GROUP_4.set_whichChoice
	#  Fifth dataset 
	ROUTE get_Initialize.set_boolean_ctrl_true TO Control_Button_Icon_8_0.set_boolean 
	ROUTE Control_Button_Icon_8_0.Control_choice TO DATA_GROUP_5.set_whichChoice

	# End initialization routers 


# ===========================================================
# CONTROL PANEL VIEWPOINT AND HANDLER


# KEY SETTINGS - CONTROL PANEL VIEWPOINT 
	# polar x=0 deg, z=0 deg at z=16
	DEF CONTROLPANEL_VIEWPOINT Viewpoint { 
		description "Control panel"
#				y          z         x
# Default
#		position 		+0.700 +0.200 +16.750 
# Special set for this World - 1.5 kpc above plane
		position 		+0.700 +1.500 +6.750 
#				y       z        x        rot
# Default
		orientation 	0.000 0.700  0.000 0.000
		jump	TRUE
	} # end of Viewpoint

# Control panel viewpoint is active handler
#	- shows controller panel when camera is at 
#         controller panel viewpoint 
		# Special reverse On/Off toggle switch without memory
	DEF Control_Origin_Filter Control_Filter_Toggle_OFF_NOMEM { ctrlChoiceAction 0 } 
	ROUTE CONTROLPANEL_VIEWPOINT.isBound TO Control_Origin_Filter.set_boolean 
	ROUTE Control_Origin_Filter.Control_choice TO TOGGLE_PANEL.set_whichChoice  

# END CONTROLLERS 
# =========================================================================

