package Savage.Buildings.ZenCondominium;

import org.web3d.x3d.jsail.Core.*;
import org.web3d.x3d.jsail.fields.*;
import org.web3d.x3d.jsail.Geometry3D.*;
import org.web3d.x3d.jsail.Grouping.*;
import org.web3d.x3d.jsail.Interpolation.*;
import org.web3d.x3d.jsail.Navigation.*;
import org.web3d.x3d.jsail.PointingDeviceSensor.*;
import org.web3d.x3d.jsail.Shape.*;
import org.web3d.x3d.jsail.Texturing.*;
import org.web3d.x3d.jsail.Time.*;

// Javadoc metadata annotations follow, see below for X3DJSAIL Java source code.
/**
 * <p> Display the playground, with swing, slides and few benches. </p>
 <p> Related links: Catalog page <a href="../../../../Buildings/ZenCondominium/PlayGroundIndex.html" target="_blank">PlayGround</a>,  source <a href="../../../../Buildings/ZenCondominium/PlayGround.java">PlayGround.java</a>, <a href="https://www.web3d.org/x3d/content/examples/X3dResources.html" target="_blank">X3D Resources</a>, <a href="https://www.web3d.org/x3d/content/examples/X3dSceneAuthoringHints.html" target="_blank">X3D Scene Authoring Hints</a>, and <a href="https://www.web3d.org/x3d/content/X3dTooltips.html" target="_blank">X3D Tooltips</a>. </p>
	<table style="color:black; border:0px solid; border-spacing:10px 0px;">
        <caption>Scene Meta Information</caption>
		<tr style="background-color:silver; border-color:silver;">
			<td style="text-align:center; padding:10px 0px;"><i>meta tags</i></td>
			<td style="text-align:left;   padding:10px 0px;">&nbsp; Document Metadata </td>
		</tr>

		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> title </i> </td>
			<td> <a href="../../../../Buildings/ZenCondominium/PlayGround.x3d">PlayGround.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> description </i> </td>
			<td> Display the playground, with swing, slides and few benches. </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> creator </i> </td>
			<td> Ms Ng, Hwee Ping </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> created </i> </td>
			<td> 26 August 2004 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> modified </i> </td>
			<td> 20 October 2019 </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> identifier </i> </td>
			<td> <a href="https://www.web3d.org/x3d/content/examples/Savage/Buildings/ZenCondominium/PlayGround.x3d" target="_blank">https://www.web3d.org/x3d/content/examples/Savage/Buildings/ZenCondominium/PlayGround.x3d</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> generator </i> </td>
			<td> X3D-Edit 3.2, <a href="https://www.web3d.org/x3d/tools/X3D-Edit" target="_blank">https://www.web3d.org/x3d/tools/X3D-Edit</a> </td>
		</tr>
		<tr>
			<td style="text-align:right; vertical-align: text-top;"> <i> license </i> </td>
			<td> <a href="../../../../Buildings/ZenCondominium/../../license.html">../../license.html</a> </td>
		</tr>
		<tr style="background-color:silver; border-color:silver;">
			<td style="text-align:center;" colspan="2">  &nbsp; </td>
		</tr>
	</table>

	<p>
		This program uses the
		<a href="https://www.web3d.org/specifications/java/X3DJSAIL.html" target="_blank">X3D Java Scene Access Interface Library (X3DJSAIL)</a>.
		It has been produced using the 
		<a href="https://www.web3d.org/x3d/stylesheets/X3dToJava.xslt" target="_blank">X3dToJava.xslt</a>
		stylesheet
	       (<a href="https://sourceforge.net/p/x3d/code/HEAD/tree/www.web3d.org/x3d/stylesheets/X3dToJava.xslt" target="_blank">version control</a>)
                which is used to create Java source code from an original <code>.x3d</code> model.
	</p>

	* @author Ms Ng, Hwee Ping
 */

public class PlayGround
{
	/** Default constructor to create this object. */
	public PlayGround ()
	{
	  initialize();
	}

	/** Create and initialize the X3D model for this object. */
	public final void initialize()
	{
            try { // catch-all
  x3dModel = new X3D().setProfile(X3D.PROFILE_IMMERSIVE).setVersion(X3D.VERSION_3_0)
  .setHead(new head()
    .addMeta(new meta().setName(meta.NAME_TITLE      ).setContent("PlayGround.x3d"))
    .addMeta(new meta().setName(meta.NAME_DESCRIPTION).setContent("Display the playground, with swing, slides and few benches."))
    .addMeta(new meta().setName(meta.NAME_CREATOR    ).setContent("Ms Ng, Hwee Ping"))
    .addMeta(new meta().setName(meta.NAME_CREATED    ).setContent("26 August 2004"))
    .addMeta(new meta().setName(meta.NAME_MODIFIED   ).setContent("20 October 2019"))
    .addMeta(new meta().setName(meta.NAME_IDENTIFIER ).setContent("https://www.web3d.org/x3d/content/examples/Savage/Buildings/ZenCondominium/PlayGround.x3d"))
    .addMeta(new meta().setName(meta.NAME_GENERATOR  ).setContent("X3D-Edit 3.2, https://www.web3d.org/x3d/tools/X3D-Edit"))
    .addMeta(new meta().setName(meta.NAME_LICENSE    ).setContent("../../license.html")))
  .setScene(new Scene()
    .addChild(new NavigationInfo().setAvatarSize(new double[] {2.0,1.6,0.75}))
    .addChild(new Transform("Elevated_Ground").setRotation(1.0,0.0,0.0,1.57).setTranslation(2.5,-1.2,0.0)
      .addChild(new Shape()
        .setGeometry(new Box().setSize(12.0,10.0,0.3))
        .setAppearance(new Appearance()
          .setMaterial(new Material().setDiffuseColor(0.65,0.588,0.373))
          .setTextureTransform(new TextureTransform().setScale(3.0,24.0)))))
    .addChild(new Transform("Bench_1").setRotation(0.0,1.0,0.0,1.57).setScale(0.5,0.5,0.5).setTranslation(-2.5,-1.05,-1.0)
      .addChild(new LOD("Wooden_Bench").setRange(new double[] {50.0,250.0})
        .addChild(new Group("LODHigh2")
          .addChild(new Transform("YCoordinateAdjust2").setTranslation(0.0,0.725,0.0)
            .addChild(new Group("Bench")
              .addChild(new Transform().setRotation(1.0,0.0,0.0,1.57)
                .addChild(new Shape()
                  .setGeometry(new Box().setSize(2.0,0.20,0.05))
                  .setAppearance(new Appearance("WoodColor")
                    .setMaterial(new Material().setDiffuseColor(0.545,0.227,0.227)))))
              .addChild(new Transform().setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,0.0,0.25)
                .addChild(new Shape()
                  .setGeometry(new Box().setSize(2.0,0.20,0.05))
                  .setAppearance(new Appearance().setUSE("WoodColor"))))
              .addChild(new Transform().setRotation(1.0,0.0,0.0,1.57).setTranslation(0.0,0.0,0.5)
                .addChild(new Shape()
                  .setGeometry(new Box().setSize(2.0,0.20,0.05))
                  .setAppearance(new Appearance().setUSE("WoodColor")))))
            .addChild(new Group("UnderBenchBars1")
              .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setTranslation(0.0,0.0,1.2)
                .addChild(new Transform().setTranslation(0.95,-0.045,0.75)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.7,0.15,0.05))
                    .setAppearance(new Appearance().setUSE("WoodColor")))))
              .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setTranslation(0.0,0.0,1.2)
                .addChild(new Transform().setTranslation(0.95,-0.045,-0.75)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.7,0.15,0.05))
                    .setAppearance(new Appearance().setUSE("WoodColor"))))))
            .addChild(new Group("UnderBenchBars2")
              .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setTranslation(0.0,0.0,1.2)
                .addChild(new Transform().setTranslation(0.95,-0.045,0.6)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.7,0.15,0.05))
                    .setAppearance(new Appearance().setUSE("WoodColor")))))
              .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setTranslation(0.0,0.0,1.2)
                .addChild(new Transform().setTranslation(0.95,-0.045,-0.6)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.7,0.15,0.05))
                    .setAppearance(new Appearance().setUSE("WoodColor"))))))
            .addChild(new Group("ChairLegs")
              .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setTranslation(0.0,0.0,1.2)
                .addChild(new Transform().setRotation(0.0,0.0,1.0,1.57).setTranslation(1.2,-0.35,0.67)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.7,0.1,0.1))
                    .setAppearance(new Appearance().setUSE("WoodColor")))))
              .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setTranslation(0.0,0.0,1.2)
                .addChild(new Transform().setRotation(0.0,0.0,1.0,1.57).setTranslation(0.7,-0.35,0.67)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.7,0.1,0.1))
                    .setAppearance(new Appearance().setUSE("WoodColor")))))
              .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setTranslation(0.0,0.0,1.2)
                .addChild(new Transform().setRotation(0.0,0.0,1.0,1.57).setTranslation(1.2,-0.35,-0.67)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.7,0.1,0.1))
                    .setAppearance(new Appearance().setUSE("WoodColor")))))
              .addChild(new Transform().setRotation(0.0,1.0,0.0,1.57).setTranslation(0.0,0.0,1.2)
                .addChild(new Transform().setRotation(0.0,0.0,1.0,1.57).setTranslation(0.7,-0.35,-0.67)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.7,0.1,0.1))
                    .setAppearance(new Appearance().setUSE("WoodColor"))))))))
        .addChild(new Group("LODMed2")
          .addChild(new Transform("YCoordinateAdjustLODMed2").setTranslation(0.0,0.725,0.0)
            .addChild(new Group().setUSE("Bench"))
            .addChild(new Group().setUSE("ChairLegs"))))
        .addChild(new WorldInfo().setInfo(new String[] {"null node"}))))
    .addChild(new Transform("Bench_2").setRotation(0.0,1.0,0.0,1.57).setScale(0.5,0.5,0.5).setTranslation(-2.5,-1.05,0.0)
      .addChild(new LOD().setUSE("Wooden_Bench")))
    .addChild(new Transform("Bench_3").setRotation(0.0,1.0,0.0,1.57).setScale(0.5,0.5,0.5).setTranslation(-2.5,-1.05,2.0)
      .addChild(new LOD().setUSE("Wooden_Bench")))
    .addChild(new Transform("Bench_4").setRotation(0.0,1.0,0.0,1.57).setScale(0.5,0.5,0.5).setTranslation(-2.5,-1.05,3.0)
      .addChild(new LOD().setUSE("Wooden_Bench")))
    .addChild(new Transform("Swing").setTranslation(0.5,-0.3,-3.0)
      .addChild(new Group()
        .addChild(new Transform()
          .addChild(new Group()
            .addChild(new Transform().setCenter(0.0,1.0,0.0).setRotation(1.0,0.0,0.0,0.5).setTranslation(-2.0,0.0,0.0)
              .addChild(new Shape("SWINGVBarGP")
                .setGeometry(new Cylinder().setRadius(0.1))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.0,0.0,0.0).setShininess(0.7))
                  .setTexture(new ImageTexture("WOODTexture1").setUrl(new String[] {"Wood.jpg","https://www.web3d.org/x3d/content/examples/Savage/Buildings/ZenCondominium/Wood.jpg"})))))
            .addChild(new Transform().setCenter(0.0,1.0,0.0).setRotation(1.0,0.0,0.0,-0.5).setTranslation(-2.0,0.0,0.0)
              .addChild(new Shape().setUSE("SWINGVBarGP")))
            .addChild(new Transform().setCenter(0.0,1.0,0.0).setRotation(1.0,0.0,0.0,0.5).setTranslation(2.0,0.0,0.0)
              .addChild(new Shape().setUSE("SWINGVBarGP")))
            .addChild(new Transform().setCenter(0.0,1.0,0.0).setRotation(1.0,0.0,0.0,-0.5).setTranslation(2.0,0.0,0.0)
              .addChild(new Shape().setUSE("SWINGVBarGP")))
            .addChild(new Transform().setRotation(0.0,0.0,1.0,1.57).setTranslation(0.0,1.0,0.0)
              .addChild(new Shape("SWINGCBarSH")
                .setGeometry(new Cylinder().setHeight(4.2).setRadius(0.1))
                .setAppearance(new Appearance()
                  .setMaterial(new Material())
                  .setTexture(new ImageTexture().setUSE("WOODTexture1")))))
            .addChild(new Transform().setTranslation(-1.0,0.85,0.0)
              .addChild(new Group("LOOPGP")
                .addChild(new Transform().setRotation(0.0,0.0,1.0,1.57).setScale(0.03,0.03,0.03)
                  .addChild(new Shape()
                    .setAppearance(new Appearance()
                      .setMaterial(new Material().setDiffuseColor(1.0,1.0,1.0)))
                    .setGeometry(new Extrusion().setBeginCap(false).setConvex(false).setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {1.00,0.00,0.92,-0.38,0.71,-0.71,0.38,-0.92,0.00,-1.00,-0.38,-0.92,-0.71,-0.71,-0.92,-0.38,-1.00,-0.00,-0.92,0.38,-0.71,0.71,-0.38,0.92,0.00,1.00,0.38,0.92,0.71,0.71,0.92,0.38,1.00,0.00})).setEndCap(false).setSpine(new MFVec3f(new double[] {2.00,0.0,0.00,1.85,0.0,0.77,1.41,0.0,1.41,0.77,0.0,1.85,0.00,0.0,2.00,-0.77,0.0,1.85,-1.41,0.0,1.41,-1.85,0.0,0.77,-2.00,0.0,0.00,-1.85,0.0,-0.77,-1.41,0.0,-1.41,-0.77,0.0,-1.85,0.00,0.0,-2.00,0.77,0.0,-1.85,1.41,0.0,-1.41,1.85,0.0,-0.77,2.00,0.0,0.00})))))))
            .addChild(new Transform().setTranslation(-0.5,0.85,0.0)
              .addChild(new Group().setUSE("LOOPGP")))
            .addChild(new Transform().setTranslation(0.5,0.85,0.0)
              .addChild(new Group().setUSE("LOOPGP")))
            .addChild(new Transform().setTranslation(1.0,0.85,0.0)
              .addChild(new Group().setUSE("LOOPGP")))
            .addChild(new TouchSensor("SWINGSensor").setDescription("Swing Sensor"))
            .addChild(new Transform()))
          .addChild(new Transform()
            .addChild(new Group()
              .addChild(new Transform()
                .addChild(new Transform("SWINGSEAT1TX").setCenter(0.0,0.85,0.0).setRotation(1.0,0.0,0.0,0.0001)
                  .addChild(new Group("SWINGSEAT1GP")
                    .addChild(new Group()
                      .addChild(new Transform().setScale(0.5,0.5,0.5).setTranslation(-1.0,0.8,0.0)
                        .addChild(new Group("ROPELeft")
                          .addChild(new Transform().setRotation(1.0,0.0,0.0,1.57).setScale(0.05,0.05,0.05)
                            .addChild(new Shape("SWINRING")
                              .setAppearance(new Appearance("ROPEApp")
                                .setMaterial(new Material().setDiffuseColor(1.0,1.0,1.0)))
                              .setGeometry(new Extrusion().setBeginCap(false).setConvex(false).setCreaseAngle(1.57).setCrossSection(new MFVec2f(new double[] {1.00,0.00,0.92,-0.38,0.71,-0.71,0.38,-0.92,0.00,-1.00,-0.38,-0.92,-0.71,-0.71,-0.92,-0.38,-1.00,-0.00,-0.92,0.38,-0.71,0.71,-0.38,0.92,0.00,1.00,0.38,0.92,0.71,0.71,0.92,0.38,1.00,0.00})).setEndCap(false).setSpine(new MFVec3f(new double[] {2.00,0.0,0.00,1.85,0.0,0.77,1.41,0.0,1.41,0.77,0.0,1.85,0.00,0.0,2.00,-0.77,0.0,1.85,-1.41,0.0,1.41,-1.85,0.0,0.77,-2.00,0.0,0.00,-1.85,0.0,-0.77,-1.41,0.0,-1.41,-0.77,0.0,-1.85,0.00,0.0,-2.00,0.77,0.0,-1.85,1.41,0.0,-1.41,1.85,0.0,-0.77,2.00,0.0,0.00})))))
                          .addChild(new Transform().setScale(0.05,0.05,0.05).setTranslation(0.0,-1.475,0.0)
                            .addChild(new Shape()
                              .setAppearance(new Appearance().setUSE("ROPEApp"))
                              .setGeometry(new Cylinder().setHeight(55)))))
                        .addChild(new Transform().setTranslation(1.0,0.0,0.0)
                          .addChild(new Group().setUSE("ROPELeft")))
                        .addChild(new Transform().setTranslation(0.5,-2.85,0.0)
                          .addChild(new Shape()
                            .setGeometry(new Box().setSize(1.15,0.08,0.3))
                            .setAppearance(new Appearance()
                              .setMaterial(new Material().setDiffuseColor(0.95,0.1,0.1).setEmissiveColor(0.05,0.05,0.05)))))
                        .addChild(new TouchSensor("SWINGSEAT1Sensor").setDescription("Swing Seat Sensor"))
                        .addChild(new TimeSensor("SWINGSEAT1Timer").setCycleInterval(40))
                        .addChild(new OrientationInterpolator("SWINGSEAT1Inter").setKey(new double[] {0.0,0.025,0.075,0.125,0.175,0.225,0.275,0.325,0.375,0.425,0.475,0.525,0.575,0.625,0.675,0.725,0.775,0.825,0.875,0.925,0.975,1.0}).setKeyValue(new MFRotation(new double[] {1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.785,1.0,0.0,0.0,-1.2,1.0,0.0,0.0,1.2,1.0,0.0,0.0,-1.3,1.0,0.0,0.0,1.3,1.0,0.0,0.0,-1.35,1.0,0.0,0.0,1.35,1.0,0.0,0.0,-1.2,1.0,0.0,0.0,1.2,1.0,0.0,0.0,-1.25,1.0,0.0,0.0,0.785,1.0,0.0,0.0,-1.2,1.0,0.0,0.0,1.2,1.0,0.0,0.0,-1.3,1.0,0.0,0.0,1.3,1.0,0.0,0.0,-1.35,1.0,0.0,0.0,1.35,1.0,0.0,0.0,-1.2,1.0,0.0,0.0,1.2,1.0,0.0,0.0,-1.25,1.0,0.0,0.0,0.0}))))))))
              .addChild(new Transform("SWINGSEAT2TX").setCenter(0.0,0.85,0.0)
                .addChild(new Group("SWINGSEAT2GP")
                  .addChild(new Group()
                    .addChild(new Transform().setScale(0.5,0.5,0.5).setTranslation(-1.0,0.8,0.0)
                      .addChild(new Transform().setTranslation(3.0,0.0,0.0)
                        .addChild(new Group("ROPELeft2")
                          .addChild(new Transform().setRotation(1.0,0.0,0.0,1.57).setScale(0.05,0.05,0.05)
                            .addChild(new Shape().setUSE("SWINRING")))
                          .addChild(new Transform().setScale(0.05,0.05,0.05).setTranslation(0.0,-1.37,0.0)
                            .addChild(new Shape()
                              .setAppearance(new Appearance().setUSE("ROPEApp"))
                              .setGeometry(new Cylinder().setHeight(50)))))
                        .addChild(new Transform().setTranslation(1.0,0.0,0.0)
                          .addChild(new Group().setUSE("ROPELeft2")))
                        .addChild(new Transform().setTranslation(0.5,-2.6,0.0)
                          .addChild(new Shape()
                            .setGeometry(new Box().setSize(1.15,0.08,0.3))
                            .setAppearance(new Appearance()
                              .setMaterial(new Material().setDiffuseColor(0.1,0.1,0.95).setEmissiveColor(0.05,0.05,0.1)))))
                        .addChild(new TouchSensor("SWINGSEAT2Sensor").setDescription("Swing Seat 2 Sensor"))
                        .addChild(new TimeSensor("SWINGSEAT2Timer").setCycleInterval(35))
                        .addChild(new OrientationInterpolator("SWINGSEAT2Inter").setKey(new double[] {0.0,0.025,0.075,0.125,0.175,0.225,0.275,0.325,0.375,0.425,0.475,0.525,0.575,0.625,0.675,0.725,0.775,0.825,0.875,0.925,0.975,1.0}).setKeyValue(new MFRotation(new double[] {1.0,0.0,0.0,0.0,1.0,0.0,0.0,0.785,1.0,0.0,0.0,-1.25,1.0,0.0,0.0,1.3,1.0,0.0,0.0,-1.3,1.0,0.0,0.0,1.35,1.0,0.0,0.0,-1.35,1.0,0.0,0.0,1.25,1.0,0.0,0.0,-1.25,1.0,0.0,0.0,1.2,1.0,0.0,0.0,-1.2,1.0,0.0,0.0,0.785,1.0,0.0,0.0,-1.25,1.0,0.0,0.0,1.3,1.0,0.0,0.0,-1.3,1.0,0.0,0.0,1.35,1.0,0.0,0.0,-1.35,1.0,0.0,0.0,1.25,1.0,0.0,0.0,-1.25,1.0,0.0,0.0,1.2,1.0,0.0,0.0,-1.2,1.0,0.0,0.0,0.0}))))))))))
          .addChild(new Transform())
          .addChild(new ROUTE().setFromNode("SWINGSensor").setFromField("touchTime").setToNode("SWINGSEAT1Timer").setToField("set_startTime"))
          .addChild(new ROUTE().setFromNode("SWINGSensor").setFromField("touchTime").setToNode("SWINGSEAT2Timer").setToField("set_startTime"))
          .addChild(new ROUTE().setFromNode("SWINGSEAT1Sensor").setFromField("touchTime").setToNode("SWINGSEAT1Timer").setToField("set_startTime"))
          .addChild(new ROUTE().setFromNode("SWINGSEAT1Timer").setFromField("fraction_changed").setToNode("SWINGSEAT1Inter").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("SWINGSEAT1Inter").setFromField("value_changed").setToNode("SWINGSEAT1TX").setToField("set_rotation"))
          .addChild(new ROUTE().setFromNode("SWINGSEAT2Sensor").setFromField("touchTime").setToNode("SWINGSEAT2Timer").setToField("set_startTime"))
          .addChild(new ROUTE().setFromNode("SWINGSEAT2Timer").setFromField("fraction_changed").setToNode("SWINGSEAT2Inter").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("SWINGSEAT2Inter").setFromField("value_changed").setToNode("SWINGSEAT2TX").setToField("set_rotation")))))
    .addChild(new Transform().setTranslation(1.6,-0.6,2.0)
      .addChild(new Group("SeeSaw")
        .addChild(new Transform("SEESAWTx").setRotation(0.0,0.0,1.0,-0.22)
          .addChild(new Group("SEESAW")
            .addChild(new Transform()
              .addChild(new Shape("Plank1")
                .setGeometry(new Box().setSize(4.0,0.05,0.3))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.9,0.3,0.1)))))
            .addChild(new Transform().setTranslation(1.6,0.1,-0.1)
              .addChild(new Shape("Rod1")
                .setGeometry(new Cylinder().setHeight(0.15).setRadius(0.03))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.7,0.7,0.7)))))
            .addChild(new Transform().setTranslation(-1.6,0.1,0.1)
              .addChild(new Shape().setUSE("Rod1")))
            .addChild(new Transform().setTranslation(-1.6,0.1,-0.1)
              .addChild(new Shape().setUSE("Rod1")))
            .addChild(new Transform().setTranslation(1.6,0.1,0.1)
              .addChild(new Shape().setUSE("Rod1")))
            .addChild(new Transform().setRotation(1.0,0.0,0.0,1.575).setScale(1.2,2.5,1.0).setTranslation(1.6,0.18,0.0)
              .addChild(new Shape().setUSE("Rod1")))
            .addChild(new Transform().setRotation(1.0,0.0,0.0,1.575).setScale(1.2,2.5,1.0).setTranslation(-1.6,0.18,0.0)
              .addChild(new Shape().setUSE("Rod1")))
            .addChild(new TouchSensor("SEESAWSensor").setDescription("See Saw Sensor"))
            .addChild(new TimeSensor("SEESAWTimer").setCycleInterval(10))
            .addChild(new OrientationInterpolator("SEESAWInt").setKey(new double[] {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}).setKeyValue(new MFRotation(new double[] {0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22})))))
        .addChild(new Transform()
          .addChild(new Group("SEESAWBody")
            .addChild(new Transform().setTranslation(0.0,0.0,0.2)
              .addChild(new Group("SidePanel")
                .addChild(new Transform().setRotation(1.0,0.0,0.0,1.575)
                  .addChild(new Shape()
                    .setGeometry(new Cylinder().setHeight(0.05).setRadius(0.2))
                    .setAppearance(new Appearance("PanelApp")
                      .setMaterial(new Material().setDiffuseColor(0.1,0.1,0.9)))))
                .addChild(new Transform().setTranslation(0.0,-0.2,0.0)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.4,0.6,0.05))
                    .setAppearance(new Appearance().setUSE("PanelApp"))))
                .addChild(new Transform().setTranslation(1.6,0.0,0.1)
                  .addChild(new Shape()))))
            .addChild(new Transform().setTranslation(0.0,0.0,-0.2)
              .addChild(new Group().setUSE("SidePanel")))
            .addChild(new Transform("Pivot").setRotation(1.0,0.0,0.0,1.575)
              .addChild(new Shape()
                .setGeometry(new Cylinder().setHeight(0.5).setRadius(0.024))
                .setAppearance(new Appearance().setUSE("PanelApp")))))
          .addChild(new ROUTE().setFromNode("SEESAWSensor").setFromField("touchTime").setToNode("SEESAWTimer").setToField("set_startTime"))
          .addChild(new ROUTE().setFromNode("SEESAWTimer").setFromField("fraction_changed").setToNode("SEESAWInt").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("SEESAWInt").setFromField("value_changed").setToNode("SEESAWTx").setToField("set_rotation")))))
    .addChild(new Transform().setTranslation(1.6,-0.6,0.5)
      .addChild(new Group("SeeSaw1")
        .addChild(new Transform("SEESAWTx1").setRotation(0.0,0.0,1.0,-0.22)
          .addChild(new Group("SEESAW1")
            .addChild(new Transform()
              .addChild(new Shape("Plank")
                .setGeometry(new Box().setSize(4.0,0.05,0.3))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.9,0.3,0.1)))))
            .addChild(new Transform().setTranslation(1.6,0.1,-0.1)
              .addChild(new Shape("ROD")
                .setGeometry(new Cylinder().setHeight(0.15).setRadius(0.03))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(0.7,0.7,0.7)))))
            .addChild(new Transform().setTranslation(-1.6,0.1,0.1)
              .addChild(new Shape().setUSE("ROD")))
            .addChild(new Transform().setTranslation(-1.6,0.1,-0.1)
              .addChild(new Shape().setUSE("ROD")))
            .addChild(new Transform().setTranslation(1.6,0.1,0.1)
              .addChild(new Shape().setUSE("ROD")))
            .addChild(new Transform().setRotation(1.0,0.0,0.0,1.575).setScale(1.2,2.5,1.0).setTranslation(1.6,0.18,0.0)
              .addChild(new Shape().setUSE("ROD")))
            .addChild(new Transform().setRotation(1.0,0.0,0.0,1.575).setScale(1.2,2.5,1.0).setTranslation(-1.6,0.18,0.0)
              .addChild(new Shape().setUSE("ROD")))
            .addChild(new TouchSensor("SEESAWSensor1").setDescription("See Saw Sensor"))
            .addChild(new TimeSensor("SEESAWTimer1").setCycleInterval(10))
            .addChild(new OrientationInterpolator("SEESAWInt1").setKey(new double[] {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}).setKeyValue(new MFRotation(new double[] {0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22})))))
        .addChild(new Transform()
          .addChild(new Group("SEESAWBody1")
            .addChild(new Transform().setTranslation(0.0,0.0,0.2)
              .addChild(new Group("SIDEPanel")
                .addChild(new Transform().setRotation(1.0,0.0,0.0,1.575)
                  .addChild(new Shape()
                    .setGeometry(new Cylinder().setHeight(0.05).setRadius(0.2))
                    .setAppearance(new Appearance("PANELApp")
                      .setMaterial(new Material().setDiffuseColor(0.1,0.1,0.9)))))
                .addChild(new Transform().setTranslation(0.0,-0.2,0.0)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.4,0.6,0.05))
                    .setAppearance(new Appearance().setUSE("PANELApp"))))
                .addChild(new Transform().setTranslation(1.6,0.0,0.1)
                  .addChild(new Shape()))))
            .addChild(new Transform().setTranslation(0.0,0.0,-0.2)
              .addChild(new Group().setUSE("SIDEPanel")))
            .addChild(new Transform("PIVOT").setRotation(1.0,0.0,0.0,1.575)
              .addChild(new Shape()
                .setGeometry(new Cylinder().setHeight(0.5).setRadius(0.024))
                .setAppearance(new Appearance().setUSE("PANELApp")))))
          .addChild(new ROUTE().setFromNode("SEESAWSensor1").setFromField("touchTime").setToNode("SEESAWTimer1").setToField("set_startTime"))
          .addChild(new ROUTE().setFromNode("SEESAWTimer1").setFromField("fraction_changed").setToNode("SEESAWInt1").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("SEESAWInt1").setFromField("value_changed").setToNode("SEESAWTx1").setToField("set_rotation")))))
    .addChild(new Transform().setTranslation(6.0,-0.5,0.0)
      .addChild(new Group("Train1")
        .addChild(new Transform("TrainTx1")
          .addChild(new Group("TRAIN1")
            .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setScale(1.2,1.2,1.2).setTranslation(-0.8,-0.08,-0.22)
              .addChild(new Shape("Panel1")
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(1.0,0.0,0.0)))
                .setGeometry(new Extrusion().setCreaseAngle(0.785).setCrossSection(new MFVec2f(new double[] {0.0,0.4,0.0,0.0,0.2,0.0,0.21,-0.05,0.22,-0.06,0.23,-0.07,0.24,-0.08,0.25,-0.1,0.26,-0.11,0.27,-0.111,0.28,-0.113,0.29,-0.115,0.3,-0.113,0.31,-0.111,0.32,-0.11,0.35,-0.1,0.37,-0.08,0.4,0.0,0.9,0.0,0.91,-0.05,0.92,-0.06,0.93,-0.07,0.94,-0.08,0.95,-0.1,0.96,-0.11,0.97,-0.111,0.98,-0.113,0.99,-0.115,1.0,-0.113,1.01,-0.111,1.02,-0.11,1.05,-0.1,1.07,-0.08,1.09,0.0,1.4,0.0,1.4,0.4,1.1,0.4,1.1,0.5,0.7,0.5,0.7,0.4,0.0,0.4})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.0,0.02})))))
            .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setScale(1.2,1.2,1.2).setTranslation(-0.8,-0.08,0.26)
              .addChild(new Shape().setUSE("Panel1")))
            .addChild(new Transform()
              .addChild(new Shape("Seat1")
                .setGeometry(new Box().setSize(0.6,0.1,0.48))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(1.0,1.0,0.0)))))
            .addChild(new TouchSensor("TrainSensor1").setDescription("Train Sensor"))
            .addChild(new TimeSensor("TrainTimer1").setCycleInterval(10))
            .addChild(new OrientationInterpolator("TrainInt1").setKey(new double[] {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}).setKeyValue(new MFRotation(new double[] {0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,0.0})))))
        .addChild(new Transform()
          .addChild(new Group("TrainP1")
            .addChild(new Transform().setTranslation(0.0,0.0,0.3)
              .addChild(new Group("SIDEPanel1")
                .addChild(new Transform().setRotation(1.0,0.0,0.0,1.575)
                  .addChild(new Shape()
                    .setGeometry(new Cylinder().setHeight(0.05).setRadius(0.2))
                    .setAppearance(new Appearance("PANELApp1")
                      .setMaterial(new Material().setDiffuseColor(0.1,0.1,0.9)))))
                .addChild(new Transform().setTranslation(0.0,-0.2,0.0)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.4,0.6,0.05))
                    .setAppearance(new Appearance().setUSE("PANELApp"))))
                .addChild(new Transform().setTranslation(1.6,0.0,0.1)
                  .addChild(new Shape()))))
            .addChild(new Transform().setTranslation(0.0,0.0,-0.3)
              .addChild(new Group().setUSE("SIDEPanel1")))
            .addChild(new Transform("PIVOT1").setRotation(1.0,0.0,0.0,1.575)
              .addChild(new Shape()
                .setGeometry(new Cylinder().setHeight(0.7).setRadius(0.024))
                .setAppearance(new Appearance().setUSE("PANELApp")))))
          .addChild(new ROUTE().setFromNode("TrainSensor1").setFromField("touchTime").setToNode("TrainTimer1").setToField("set_startTime"))
          .addChild(new ROUTE().setFromNode("TrainTimer1").setFromField("fraction_changed").setToNode("TrainInt1").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("TrainInt1").setFromField("value_changed").setToNode("TrainTx1").setToField("set_rotation")))))
    .addChild(new Transform().setTranslation(6.0,-0.5,2.3)
      .addChild(new Group("Train2")
        .addChild(new Transform("TrainTx2")
          .addChild(new Group("TRAIN2")
            .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setScale(1.2,1.2,1.2).setTranslation(-0.8,-0.08,-0.22)
              .addChild(new Shape("Panel2")
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(1.0,0.0,0.0)))
                .setGeometry(new Extrusion().setCreaseAngle(0.785).setCrossSection(new MFVec2f(new double[] {0.0,0.4,0.0,0.0,0.2,0.0,0.21,-0.05,0.22,-0.06,0.23,-0.07,0.24,-0.08,0.25,-0.1,0.26,-0.11,0.27,-0.111,0.28,-0.113,0.29,-0.115,0.3,-0.113,0.31,-0.111,0.32,-0.11,0.35,-0.1,0.37,-0.08,0.4,0.0,0.9,0.0,0.91,-0.05,0.92,-0.06,0.93,-0.07,0.94,-0.08,0.95,-0.1,0.96,-0.11,0.97,-0.111,0.98,-0.113,0.99,-0.115,1.0,-0.113,1.01,-0.111,1.02,-0.11,1.05,-0.1,1.07,-0.08,1.09,0.0,1.4,0.0,1.4,0.4,1.1,0.4,1.1,0.5,0.7,0.5,0.7,0.4,0.0,0.4})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.0,0.02})))))
            .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setScale(1.2,1.2,1.2).setTranslation(-0.8,-0.08,0.26)
              .addChild(new Shape().setUSE("Panel2")))
            .addChild(new Transform()
              .addChild(new Shape("Seat2")
                .setGeometry(new Box().setSize(0.6,0.1,0.48))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(1.0,1.0,0.0)))))
            .addChild(new TouchSensor("TrainSensor2").setDescription("Train Sensor"))
            .addChild(new TimeSensor("TrainTimer2").setCycleInterval(10))
            .addChild(new OrientationInterpolator("TrainInt2").setKey(new double[] {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}).setKeyValue(new MFRotation(new double[] {0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,0.0})))))
        .addChild(new Transform()
          .addChild(new Group("TrainP2")
            .addChild(new Transform().setTranslation(0.0,0.0,0.3)
              .addChild(new Group("SIDEPanel2")
                .addChild(new Transform().setRotation(1.0,0.0,0.0,1.575)
                  .addChild(new Shape()
                    .setGeometry(new Cylinder().setHeight(0.05).setRadius(0.2))
                    .setAppearance(new Appearance("PANELApp2")
                      .setMaterial(new Material().setDiffuseColor(0.1,0.1,0.9)))))
                .addChild(new Transform().setTranslation(0.0,-0.2,0.0)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.4,0.6,0.05))
                    .setAppearance(new Appearance().setUSE("PANELApp"))))
                .addChild(new Transform().setTranslation(1.6,0.0,0.1)
                  .addChild(new Shape()))))
            .addChild(new Transform().setTranslation(0.0,0.0,-0.3)
              .addChild(new Group().setUSE("SIDEPanel2")))
            .addChild(new Transform("PIVOT2").setRotation(1.0,0.0,0.0,1.575)
              .addChild(new Shape()
                .setGeometry(new Cylinder().setHeight(0.7).setRadius(0.024))
                .setAppearance(new Appearance().setUSE("PANELApp")))))
          .addChild(new ROUTE().setFromNode("TrainSensor2").setFromField("touchTime").setToNode("TrainTimer2").setToField("set_startTime"))
          .addChild(new ROUTE().setFromNode("TrainTimer2").setFromField("fraction_changed").setToNode("TrainInt2").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("TrainInt2").setFromField("value_changed").setToNode("TrainTx2").setToField("set_rotation")))))
    .addChild(new Transform().setTranslation(6.0,-0.5,-2.3)
      .addChild(new Group("Train3")
        .addChild(new Transform("TrainTx3")
          .addChild(new Group("TRAIN3")
            .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setScale(1.2,1.2,1.2).setTranslation(-0.8,-0.08,-0.22)
              .addChild(new Shape("Panel3")
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(1.0,0.0,0.0)))
                .setGeometry(new Extrusion().setCreaseAngle(0.785).setCrossSection(new MFVec2f(new double[] {0.0,0.4,0.0,0.0,0.2,0.0,0.21,-0.05,0.22,-0.06,0.23,-0.07,0.24,-0.08,0.25,-0.1,0.26,-0.11,0.27,-0.111,0.28,-0.113,0.29,-0.115,0.3,-0.113,0.31,-0.111,0.32,-0.11,0.35,-0.1,0.37,-0.08,0.4,0.0,0.9,0.0,0.91,-0.05,0.92,-0.06,0.93,-0.07,0.94,-0.08,0.95,-0.1,0.96,-0.11,0.97,-0.111,0.98,-0.113,0.99,-0.115,1.0,-0.113,1.01,-0.111,1.02,-0.11,1.05,-0.1,1.07,-0.08,1.09,0.0,1.4,0.0,1.4,0.4,1.1,0.4,1.1,0.5,0.7,0.5,0.7,0.4,0.0,0.4})).setSolid(false).setSpine(new MFVec3f(new double[] {0.0,0.0,0.0,0.0,0.0,0.02})))))
            .addChild(new Transform().setRotation(1.0,0.0,0.0,3.14).setScale(1.2,1.2,1.2).setTranslation(-0.8,-0.08,0.26)
              .addChild(new Shape().setUSE("Panel3")))
            .addChild(new Transform()
              .addChild(new Shape("Seat3")
                .setGeometry(new Box().setSize(0.6,0.1,0.48))
                .setAppearance(new Appearance()
                  .setMaterial(new Material().setDiffuseColor(1.0,1.0,0.0)))))
            .addChild(new TouchSensor("TrainSensor3").setDescription("Train Sensor"))
            .addChild(new TimeSensor("TrainTimer3").setCycleInterval(10))
            .addChild(new OrientationInterpolator("TrainInt3").setKey(new double[] {0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0}).setKeyValue(new MFRotation(new double[] {0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,-0.22,0.0,0.0,1.0,0.22,0.0,0.0,1.0,0.0})))))
        .addChild(new Transform()
          .addChild(new Group("TrainP3")
            .addChild(new Transform().setTranslation(0.0,0.0,0.3)
              .addChild(new Group("SIDEPanel3")
                .addChild(new Transform().setRotation(1.0,0.0,0.0,1.575)
                  .addChild(new Shape()
                    .setGeometry(new Cylinder().setHeight(0.05).setRadius(0.2))
                    .setAppearance(new Appearance("PANELApp3")
                      .setMaterial(new Material().setDiffuseColor(0.1,0.1,0.9)))))
                .addChild(new Transform().setTranslation(0.0,-0.2,0.0)
                  .addChild(new Shape()
                    .setGeometry(new Box().setSize(0.4,0.6,0.05))
                    .setAppearance(new Appearance().setUSE("PANELApp"))))
                .addChild(new Transform().setTranslation(1.6,0.0,0.1)
                  .addChild(new Shape()))))
            .addChild(new Transform().setTranslation(0.0,0.0,-0.3)
              .addChild(new Group().setUSE("SIDEPanel3")))
            .addChild(new Transform("PIVOT3").setRotation(1.0,0.0,0.0,1.575)
              .addChild(new Shape()
                .setGeometry(new Cylinder().setHeight(0.7).setRadius(0.024))
                .setAppearance(new Appearance().setUSE("PANELApp")))))
          .addChild(new ROUTE().setFromNode("TrainSensor3").setFromField("touchTime").setToNode("TrainTimer3").setToField("set_startTime"))
          .addChild(new ROUTE().setFromNode("TrainTimer3").setFromField("fraction_changed").setToNode("TrainInt3").setToField("set_fraction"))
          .addChild(new ROUTE().setFromNode("TrainInt3").setFromField("value_changed").setToNode("TrainTx3").setToField("set_rotation")))))
    .addChild(new Viewpoint().setDescription("Playground").setOrientation(-0.811,-0.585,-0.002,0.6085).setPosition(-1.7,4.5,10.3)));
            }
            catch (Exception ex)
            {       
                System.err.println ("*** Further hints on X3DJSAIL errors and exceptions at");
                System.err.println ("*** https://www.web3d.org/specifications/java/X3DJSAIL.html");
                throw (ex);
            }
	}
	// end of initialize() method

	/** The initialized model object, created within initialize() method. */
	private X3D x3dModel;

	/** 
	 * Provide a 
	 * <a href="https://dzone.com/articles/java-copy-shallow-vs-deep-in-which-you-will-swim" target="_blank">shallow copy</a>
	 * of the X3D model.
	 * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html">X3D</a>
	 * @return PlayGround model
	 */
	public X3D getX3dModel()
	{	  
		return x3dModel;
	}
	   
    /** 
     * Default main() method provided for test purposes, uses CommandLine to set global ConfigurationProperties for this object.
     * @param args array of input parameters, provided as arguments
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#handleArguments-java.lang.String:A-">X3D.handleArguments(args)</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/Core/X3D.html#validationReport--">X3D.validationReport()</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CommandLine.html">CommandLine</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/CommandLine.html#USAGE">CommandLine.USAGE</a>
     * @see <a href="https://www.web3d.org/specifications/java/javadoc/org/web3d/x3d/jsail/ConfigurationProperties.html">ConfigurationProperties</a>
     */
    public static void main(String args[])
    {
        System.out.println("Build this X3D model, showing validation diagnostics...");
        X3D thisExampleX3dModel = new PlayGround().getX3dModel();
//      System.out.println("X3D model construction complete.");
	
        // next handle command line arguments
        boolean hasArguments = (args != null) && (args.length > 0);
        boolean validate = true; // default
        boolean argumentsLoadNewModel = false;
        String  fileName = new String();

        if (args != null)
        {
                for (String arg : args)
                {
                        if (arg.toLowerCase().startsWith("-v") || arg.toLowerCase().contains("validate"))
                        {
                                validate = true; // making sure
                        }
                        if (arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_X3D) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_CLASSICVRML) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_X3DB) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_VRML97) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_EXI) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_GZIP) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_ZIP) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_HTML) ||
                                arg.toLowerCase().endsWith(X3D.FILE_EXTENSION_XHTML))
                        {
                                argumentsLoadNewModel = true;
                                fileName = arg;
                        }
                }
        }
        if      (argumentsLoadNewModel)
                System.out.println("WARNING: \"Savage.Buildings.ZenCondominium.PlayGround\" model invocation is attempting to load file \"" + fileName + "\" instead of simply validating itself... file loading ignored.");
        else if (hasArguments) // if no arguments provided, this method produces usage warning
                thisExampleX3dModel.handleArguments(args);
	
        if (validate)
        {
            //  System.out.println("--- TODO fix duplicated outputs ---"); // omit when duplicated outputs problem is solved/refactored
		String validationResults = thisExampleX3dModel.validationReport();
            //  System.out.println("-----------------------------------"); // omit when duplicated outputs problem is solved/refactored
                System.out.print("Savage.Buildings.ZenCondominium.PlayGround self-validation test confirmation: ");
                if (!validationResults.equals("success"))
                    System.out.println();
                System.out.println(validationResults.trim());

                // experimental: test X3DJSAIL output files
                // Buildings/ZenCondominium/PlayGround_JavaExport.* file validation is checked when building X3D Example Archives
                String filenameX3D  = "Buildings/ZenCondominium/PlayGround_JavaExport.x3d"; 
                String filenameX3DV = "Buildings/ZenCondominium/PlayGround_JavaExport.x3dv"; 
                String filenameJSON = "Buildings/ZenCondominium/PlayGround_JavaExport.json";
                thisExampleX3dModel.toFileX3D        (filenameX3D);
                thisExampleX3dModel.toFileClassicVRML(filenameX3DV);
// TODO         thisExampleX3dModel.toFileJSON       (filenameJSON);
        }
    }
}
