{
  "information": {
    "Title": "ejss_model_SHM01 Pendulum and SHM Comparison",
    "Author": [
      "weelookang@gmail.com",
      "Fu-Kwun Hwang",
      "Francisco Esquembre",
      "Wolfgang Christian",
      "F\u00e9lix J. Garc\u00eda"
    ],
    "AuthorLogo": [
      "./1authorlookangphoto5050.png",
      "./01authorfu-kwun.hwang.png",
      "./01authorPacoEsquembre2011.png",
      "./01authorwc_icon.png",
      "./01authorFelix_J_Garcia_Clemente.png"
    ],
    "Password": "",
    "Keywords": "pendulum, simple harmonic motion, small-angle approximation, damping, period",
    "Abstract": "http://weelookang.blogspot.sg/2014/02/ejss-pendulum-model.html",
    "Copyright": "creative commons attribution",
    "Level": "A Level ",
    "Language": "english",
    "Logo": [
      "./images/thumb.png"
    ],
    "RunAlways": "true",
    "ModelTab": "",
    "ModelTabTitle": "",
    "ModelName": "",
    "FixedNavigationBar": "false",
    "CSSFile": "",
    "DetectedFiles": [
      "./01authorFelix_J_Garcia_Clemente.png",
      "./01authorPacoEsquembre2011.png",
      "./01authorfu-kwun.hwang.png",
      "./01authorwc_icon.png",
      "./1authorlookangphoto5050.png",
      "./SHM01.xhtml",
      "./images/SHM001lookang.gif",
      "./images/image3.png",
      "./images/image4.gif",
      "./images/thumb.png"
    ],
    "AuxiliaryFiles": [
      "./images/",
      "./lib/"
    ],
    "HTMLHead": "<script async=\"true\" src=\"https://www.googletagmanager.com/gtag/js?id=UA-3326007-19\"></script>\n<script>\n  window.dataLayer = window.dataLayer || [];\n  function gtag(){dataLayer.push(arguments);}\n  gtag('js', new Date());\n  gtag('config', 'UA-3326007-19');\n</script>\n<script data-ad-client=\"ca-pub-0121577198857509\" async=\"true\" src=\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\"></script>\n<script src=\"./lib/xapiwrapper.min.js\"></script>\n<script src=\"./lib/xAPI.js\"></script>",
    "SaveInXMLFormat": "false",
    "IncludeSource": "true",
    "IncludeLibrary": "true",
    "UglifyJS": "false",
    "PreviewFullModel": "false",
    "UseInterpreter": "true",
    "UseDeltaForODE": "false"
  },
  "description": {
    "pages": [
      {
        "Name": "SHM01",
        "Active": "true",
        "Internal": "false",
        "Type": "DESCRIPTION_EDITOR",
        "Locale": "_default_",
        "Title": "SHM01",
        "External": "true",
        "Code": "./SHM01.xhtml"
      }
    ]
  },
  "model": {
    "variables": {
      "pages": [
        {
          "Name": "Var Table",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "print",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "fontb",
              "Value": "\"normal bold 2vw \"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "font",
              "Value": "\"normal normal 2vw \"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "xmin",
              "Value": "-1.2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "xmax",
              "Value": "1.2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ymin",
              "Value": "-1.2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ymax",
              "Value": "1.2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "rangex",
              "Value": "xmax-xmin",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "rangey",
              "Value": "ymax-ymin",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "sizex",
              "Value": "rangex/20",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "sizey",
              "Value": "rangey/20",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "selected",
              "Value": "\"Show SHM\"",
              "Type": "String",
              "Dimension": "[1]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "text",
              "Value": "\"Blue: pendulum; green: SHM model.\\nGuide: small angles \u224810\u00b0; error varies.\\nMark 1: cycle at 1\u00b0\u201310\u00b0.\\nReset; try >10\u00b0 for mark 2, SHM on, b=0.\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "pi",
              "Value": "Math.PI",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "y1",
              "Value": "sizey*5/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ysize",
              "Value": "0.2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "g",
              "Value": "9.81",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vvst",
              "Value": "",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "avst",
              "Value": "",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "polarcooridnates",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "polarshow",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "maxR",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ns",
              "Value": "16",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "nr",
              "Value": "ns",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "dxSpoke",
              "Value": "0",
              "Type": "double",
              "Dimension": "[ns]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "dySpoke",
              "Value": "0",
              "Type": "double",
              "Dimension": "[ns]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "radii",
              "Value": "0",
              "Type": "double",
              "Dimension": "[nr]",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "pendulum",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "theta",
              "Value": "10*pi/180",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "thetas",
              "Value": "theta",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "thetadegrees",
              "Value": "10",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "omega",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "omegas",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "alpha",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "alphas",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "L",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "xs",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ys",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vxs",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vys",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "shm",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "simplespring",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "m",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "k",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "l",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "x",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "y",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ye",
              "Value": "-g*m/k",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vx",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vy",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "v",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "t",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "tcst",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "X",
              "Value": "x-l",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "T",
              "Value": "2*pi*Math.sqrt(L/g)",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "dt",
              "Value": "0.01",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "w",
              "Value": "2*pi/T",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "a",
              "Value": "-w^2*x",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "f",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "advancedspring",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "b",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "amplitude",
              "Value": "0.5",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "frequency",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "potentialEnergy",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "kineticEnergy",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "totalEnergy",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "afrequency",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "Hertz",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "max",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "xmaxs",
              "Value": "3",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vmaxs",
              "Value": "2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "amaxs",
              "Value": "2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "Emaxs",
              "Value": "2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "period",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "n1",
              "Value": "0",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "nc",
              "Value": "0",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "numberofswing",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "omegastored",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "T1",
              "Value": "0",
              "Type": "double",
              "Dimension": "[100]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ts",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "layout",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "Width",
              "Value": "(_isEPub)?\"400\":\"100%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "display width",
              "Domain": "public"
            },
            {
              "Name": "Height",
              "Value": "(_isEPub)?\"500\":\"100%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "Width1",
              "Value": "\"100%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "Height1",
              "Value": "\"100%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "Height2",
              "Value": "\"100%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "Height3",
              "Value": "\"10%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "iOS",
              "Value": "/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "http://stackoverflow.com/questions/9038625/detect-if-device-is-ios",
              "Domain": "public"
            },
            {
              "Name": "iPad",
              "Value": "/iPad/.test(navigator.userAgent) && !window.MSStream",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "http://stackoverflow.com/questions/9038625/detect-if-device-is-ios",
              "Domain": "public"
            },
            {
              "Name": "iPhone",
              "Value": "/iPhone|iPod/.test(navigator.userAgent) && !window.MSStream",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "http://stackoverflow.com/questions/9038625/detect-if-device-is-ios",
              "Domain": "public"
            },
            {
              "Name": "isAndroid",
              "Value": "checkAndroid()",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "accelerometer",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "g0",
              "Value": "9.8",
              "Type": "double",
              "Dimension": "",
              "Comment": "acceleration of gravity near Earth",
              "Domain": "public"
            },
            {
              "Name": "phi",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "tilt angle",
              "Domain": "public"
            },
            {
              "Name": "accX",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "accY",
              "Value": "-g",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "accZ",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "msg",
              "Value": "\"message\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "accelPresent",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "flag if accelerometer present",
              "Domain": "public"
            },
            {
              "Name": "accelRunning",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        }
      ]
    },
    "initialization": {
      "pages": [
        {
          "Name": "PolarCoordinates",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "var theta=0; \nvar dtheta=2*Math.PI/ns;\nfor(var i=0; i<ns; i++){\n  dxSpoke[i]=2*maxR*Math.sin(theta);\n  dySpoke[i]=2*maxR*Math.cos(theta);\n  theta+=dtheta;\n}\n\nvar dr=0.5;\nvar r=dr;\nfor(var i=0; i<nr; i++){\n  radii[i]=2*r;\n  r+=dr;\n}\n\n"
        },
        {
          "Name": "svg",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "var container = document.createElement('div');\nvar svggradient = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"><defs>'+\n  '  <radialGradient id=\"mygrandientglint\" cx=\"50%\" cy=\"50%\" r=\"90%\" fx=\"90%\" fy=\"10%\">'+\n  '    <stop offset=\"0%\" style=\"stop-color:rgb(255,255,255); stop-opacity:0.5\" />'+\n  '    <stop offset=\"100%\" style=\"stop-color:rgb(0,0,0);stop-opacity:0.5\" />'+\n  '  </radialGradient>'+\n  '</defs></svg>';\ncontainer.innerHTML = svggradient;\ndocument.body.appendChild(container);\n//\"url(#mygrandientglint)\""
        },
        {
          "Name": "axes",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "//INITIALVALUESMANUALLY assumming know where to put the values\n_view.plottingPanel.getAxisX().setPosition([0,1]);\n//_view.plottingPanel.getTitleX().setPosition([0.5,0.1]);\n_view.plottingPanel.getAxisY().setPosition([0.5,0]);\n//_view.plottingPanel.getTitleY().setPosition([0.5,0.05]);\n\n"
        },
        {
          "Name": "plot",
          "Active": "false",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "/*\n_view.plottingPanel.getAxisX().setPosition([0,1]);\n_view.plottingPanel.getTitleX().setPosition([0.5,0.1]);\n_view.plottingPanel.getAxisY().setPosition([0.5,0]);\n_view.plottingPanel.getTitleY().setPosition([0.5,0.05]);\n*/\nvar getRealWorldYMin = _view.plottingPanel.getRealWorldYMin();\nvar getRealWorldYMax = _view.plottingPanel.getRealWorldYMax();\n\n_view.plottingPanel.getAxisX().setAbsoluteY(+getRealWorldYMin);\n_view.plottingPanel.getTitleX().setAbsolutePosition([0.,-getRealWorldYMin]);\n//alert(_view.plottingPanel.getMessageDecoration(\"TL\").getPosition());\n//_view.plottingPanel.getMessageDecoration(\"TL\").setPosition([-1,-0.05]);\n//_view._update();\n//alert(_view.plottingPanel.getMessageDecoration(\"TL\").getPosition());\n//var xxx = _view.plottingPanel.getRealWorldCoordinates[0];\n//_view.plottingPanel.getMessageDecoration(\"TL\").setPosition([_view._format(xxx,\"0.0\"),-0.05]);\n//_view._update();"
        },
        {
          "Name": "radial",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "var container = document.createElement('div');\nvar svggradient = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"><defs>'+\n  '  <radialGradient id=\"mygrandient\" cx=\"50%\" cy=\"50%\" r=\"80%\" fx=\"30%\" fy=\"30%\">'+\n  '    <stop offset=\"0%\" style=\"stop-color:rgb(0,255,255); stop-opacity:1\" />'+\n  '    <stop offset=\"100%\" style=\"stop-color:rgb(0,0,255);stop-opacity:1\" />'+\n  '  </radialGradient>'+\n  '</defs></svg>';\ncontainer.innerHTML = svggradient;\ndocument.body.appendChild(container);\nvar container = document.createElement('div');\nvar svggradient = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"><defs>'+\n  '  <radialGradient id=\"mygrandient1\" cx=\"50%\" cy=\"50%\" r=\"80%\" fx=\"30%\" fy=\"30%\">'+\n  '    <stop offset=\"0%\" style=\"stop-color:rgb(0,0,0); stop-opacity:0.5\" />'+\n  '    <stop offset=\"100%\" style=\"stop-color:rgb(255,255,255);stop-opacity:1\" />'+\n  '  </radialGradient>'+\n  '</defs></svg>';\ncontainer.innerHTML = svggradient;\ndocument.body.appendChild(container);\n//\"url(#mygrandient1)\"\n\nvar container = document.createElement('div');\nvar svggradient = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"><defs>'+\n  '  <radialGradient id=\"mygrandient2\" cx=\"50%\" cy=\"50%\" r=\"70%\" fx=\"90%\" fy=\"50%\">'+\n  '    <stop offset=\"0%\" style=\"stop-color:rgb(0,255,0); stop-opacity:1\" />'+\n  '    <stop offset=\"100%\" style=\"stop-color:rgb(255,255,255);stop-opacity:1\" />'+\n  '  </radialGradient>'+\n  '</defs></svg>';\ncontainer.innerHTML = svggradient;\ndocument.body.appendChild(container);\n//\"url(#mygrandient2)\"\n// messing with radial gradient 3\nvar container = document.createElement('div');\nvar svggradient = '<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\"><defs>'+\n  '  <radialGradient id=\"mygrandient3\" cx=\"50%\" cy=\"50%\" r=\"50%\" fx=\"50%\" fy=\"10%\">'+\n  '    <stop offset=\"0%\" style=\"stop-color:rgb(255,0,0); stop-opacity:1\" />'+\n  '    <stop offset=\"100%\" style=\"stop-color:rgb(0,0,255);stop-opacity:1\" />'+\n  '  </radialGradient>'+\n  '</defs></svg>';\ncontainer.innerHTML = svggradient;\ndocument.body.appendChild(container);\n//\"url(#mygrandient3)\"\n"
        },
        {
          "Name": "undefined",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": ""
        },
        {
          "Name": "MathJax",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "//MathJax.Hub.Queue([\"Typeset\",MathJax.Hub]);"
        },
        {
          "Name": "accelerometer",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "accelPresent=accelerometer.isPresent();  // for accelerometer; may give false positive\nif (accelPresent) {\n  startAccelerometer();\n  //b=0.5;\n}else{\n  stopAccelerometer();\n//b=0;\n}\n\n//resetTime ();"
        },
        {
          "Name": "Message",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "// copy this into the initialization\n// make the font bigger\n\n//_view.plottingPanel.getMessageDecoration(\"TL\").getFont().setFontSize(\"2vw\");\n_view.plottingPanel.getMessageDecoration(\"TR\").getFont().setFontSize(\"2vw\");\n_view.plottingPanel.getMessageDecoration(\"BL\").getFont().setFontSize(\"1vw\");\n_view.plottingPanel.getMessageDecoration(\"BR\").getFont().setFontSize(\"1vw\");"
        }
      ]
    },
    "evolution": {
      "information": {
        "FPS": "20",
        "SPD": "5",
        "RealTimeVariable": "",
        "Autoplay": "false"
      },
      "pages": [
        {
          "Name": "acceleromoter",
          "Active": "true",
          "Internal": "false",
          "Type": "EVOLUTION_EDITOR",
          "Comment": "",
          "Code": "readAccelerometer ();"
        },
        {
          "Name": "Evol Page",
          "Active": "true",
          "Internal": "false",
          "Type": "ODE_EDITOR",
          "Comment": "",
          "IndependentVariable": "t",
          "Increment": "dt",
          "Equations": [
            {
              "state": "theta",
              "rate": "omega"
            },
            {
              "state": "omega",
              "rate": "alpha"
            },
            {
              "state": "thetas",
              "rate": "omegas"
            },
            {
              "state": "omegas",
              "rate": "-(g/L)*(thetas)"
            }
          ],
          "Method": "RungeKutta",
          "AbsoluteTolerance": "0.00001",
          "PreliminaryCode": {
            "Code": "//-(g/L)*Math.sin(theta) old code replace by alpha\nvar alpha=0;\nif(accelRunning){ // use sensor and proper acceleration\n  alpha=-(g/L)*Math.sin(theta+phi)-b*L*omega; \n}else{  // use slider and ignore sensor\n // var ax=-0.1*k*(xPivot-xCursor); // scaled acceleration of pivot\n//  alpha = -ax*Math.cos(theta)/L-g0*Math.sin(theta)/L-b*L*omega;\n   alpha = -g0*Math.sin(theta)/L-b*L*omega;\n}",
            "Comment": "Code to be executed before rate equations are evaluated"
          },
          "EventMaximumStep": "",
          "Events": {
            "pages": [
              {
                "Type": "EVENT_EDITOR",
                "Name": "Event",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "if (accelRunning==false){\nreturn numberofswing-1;\n}\n",
                "Action": "t = t-dt;\n_pause();\ntext= \"paused\";\n",
                "Comment": ""
              }
            ]
          },
          "ZenoEffect": {
            "Code": "",
            "Comment": "",
            "StopAfterEffect": "true"
          },
          "AccelerationIndependentOfVelocity": "false",
          "ForceSynchronization": "false",
          "UseBestInterpolation": "false",
          "EstimateFirstStep": "false",
          "MemoryLength": "",
          "InternalStep": "",
          "MaximumStep": "",
          "MaximumNumberOfSteps": "10000",
          "RelativeTolerance": "",
          "DelayList": "",
          "DelayMaximum": "",
          "DelayAddDiscont": "",
          "DelayInitialCondition": {
            "Code": "",
            "Comment": ""
          },
          "DirectIncidenceMatrix": "",
          "Discontinuities": {
            "pages": []
          },
          "ErrorHandling": {
            "pages": []
          }
        },
        {
          "Name": "acceleromotermaxtime",
          "Active": "true",
          "Internal": "false",
          "Type": "EVOLUTION_EDITOR",
          "Comment": "",
          "Code": "if(t>15*60){  // pause after 15 minutes to save battery\n  _pause();\n  stopAccelerometer();\n  msg=\"Saving battery. Reselect Sensor and press run to continue.\";\n  t=0;\n}"
        }
      ]
    },
    "fixed_relations": {
      "pages": [
        {
          "Name": "FixRel Page",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "x= L*Math.sin(theta);\ny = -L*Math.cos(theta);\nvx = omega*L*Math.cos(theta);\nvy = omega*L*Math.sin(theta);\nv = Math.sqrt(vx*vx+vy*vy);\nalpha=-(g/L)*Math.sin(theta);\n\n\n\n// convert deg\nthetadegrees = theta*180/pi;\n\n\nxs= L*Math.sin(thetas);\nys = -L*Math.cos(thetas);\nvxs = omega*L*Math.cos(thetas);\nvys = omega*L*Math.sin(thetas);\n//vs = Math.sqrt(vx*vx+vy*vy);\nalphas=-(g/L)*thetas;\n\n\n//xmin = -L;\n//xmax = L;\n//ymin = -L*1.2;\n//ymax = 0;\n\n//T= 2*pi*Math.sqrt(m/k);\n"
        },
        {
          "Name": "period",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "T = 2*pi*Math.sqrt(L/g);\n\nnumberofswing = Math.floor(n1/2);\nif (numberofswing>=20) _pause(); // to prevent error in T1[100] array\n\nif(omega*omegastored<0){\n  n1++;\n \n  if(n1%2===0){\n    T1[nc]=t-ts;\n    ts= t;\n  }\n// else T1[nc]=t*2.;// first half period\n\n}\nomegastored = omega; // to store value of omega\nif (window.PendulumAnalytics) window.PendulumAnalytics.observe(numberofswing, t);"
        },
        {
          "Name": "polar",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "if (polarshow==false) {\n  _view.plottingPanel.setProperty(\"TitleX\",\"x\");\n  _view.plottingPanel.setProperty(\"TitleY\",\"y\");\n  _view.plottingPanel.setProperty(\"GridXShow\",true);\n// _view.drawingPanel3D.setProperty(\"DecorationType\",\"NONE\");\n }\n if (polarshow==true) {\n  _view.plottingPanel.setProperty(\"TitleX\",\" \");\n  _view.plottingPanel.setProperty(\"TitleY\",\" \");\n  _view.plottingPanel.setProperty(\"GridXShow\",false);\n// _view.drawingPanel3D.setProperty(\"DecorationType\",\"NONE\");\n }\n"
        },
        {
          "Name": "axes",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "if (_model.isPlaying()===true) { //NEED this for conflict with initialize page values\n//var getRealWorldYMin = _view.plottingPanel.getRealWorldYMin();\n//var getRealWorldYMax = _view.plottingPanel.getRealWorldYMax();\n\n\n//_view.plottingPanel.getAxisX().setAbsoluteY(getRealWorldYMax);\n\n//_view.plottingPanel.getAxisX().setAbsoluteY(_view.mass.getY());\n//_view.plottingPanel.getAxisY().setAbsoluteX(_view.mass.getX());\n\n  _view.plottingPanel.getAxisX().setAbsoluteY(_view.plottingPanel.getGrid().getFixedTickY());\n  _view.plottingPanel.getAxisY().setAbsoluteX(_view.plottingPanel.getGrid().getFixedTickX());\n//_view.plottingPanel.getTitleX().setPosition([0,_view.plottingPanel.getGrid().getFixedTickY()*0.9]);\n\n\n//_view.plottingPanel.getTitleY().setAbsoluteX(_view.plottingPanel.getGrid().getFixedTickX());\n\n\n//_view.plottingPanel.getTitleX().setPosition([0.95,0.95]);\n//_view.plottingPanelxvst.getAxisX().setPosition([0,-_view.plottingPanelxvst.getRealWorldYMin()/(_view.plottingPanelxvst.getRealWorldYMax()-_view.plottingPanelxvst.getRealWorldYMin())]);\n//_view.plottingPanelxvst.getTitleX().setPosition([0.95,-_view.plottingPanelxvst.getRealWorldYMin()/(_view.plottingPanelxvst.getRealWorldYMax()-_view.plottingPanelxvst.getRealWorldYMin())]);\n\n\n}\n"
        }
      ]
    },
    "custom": {
      "pages": [
        {
          "Name": "Lib Page",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "\nfunction externalForce (time) {\nreturn amplitude * Math.sin(2*pi*Hertz *time);\n}\n/*\n\npublic double externalForce (double time) {\nreturn amplitude * Math.sin(frequency*time);\n}\n*/\n//https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode\n// does not work for iOS \n/*jslint browser:true */\nfunction toggleFullScreen() {\n  if (!document.fullscreenElement &&    // alternative standard method\n      !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) {  // current working methods\n    if (document.documentElement.requestFullscreen) {\n      document.documentElement.requestFullscreen();\n    } else if (document.documentElement.msRequestFullscreen) {\n      document.documentElement.msRequestFullscreen();\n    } else if (document.documentElement.mozRequestFullScreen) {\n      document.documentElement.mozRequestFullScreen();\n    } else if (document.documentElement.webkitRequestFullscreen) {\n      document.documentElement.webkitRequestFullscreen();\n    }\n  } else {\n    if (document.exitFullscreen) {\n      document.exitFullscreen();\n    } else if (document.msExitFullscreen) {\n      document.msExitFullscreen();\n    } else if (document.mozCancelFullScreen) {\n      document.mozCancelFullScreen();\n    } else if (document.webkitExitFullscreen) {\n      document.webkitExitFullscreen();\n    }\n  }\n}\n// Semantic learning evidence for the pendulum/SHM comparison. This records\n// committed controls and completed cycles, never animation frames or identities.\nwindow.PendulumAnalytics = (function () {\n  var history = [];\n  var maxHistory = 80;\n  var sequence = 0;\n  var completedOscillations = 0;\n  var smallAngleMark = false;\n  var beyondSmallAngleMark = false;\n  var trial = null;\n  var pendingParameter = null;\n  var pendingTimer = null;\n\n  function numberOr(value, fallback) {\n    var result = Number(value);\n    return isFinite(result) ? result : fallback;\n  }\n  function round(value, places) {\n    var factor = Math.pow(10, places);\n    return Math.round(numberOr(value, 0) * factor) / factor;\n  }\n  function score() {\n    return (smallAngleMark ? 1 : 0) + (beyondSmallAngleMark ? 1 : 0);\n  }\n  function learnerFeedback() {\n    if (score() === 2) return \"Both marks earned. Compare how the two paths differ as the release angle increases.\";\n    if (smallAngleMark) return \"1/2 marks. The small-angle cycle is recorded; reset, try above 10\u00b0, keep SHM visible and damping at zero, then complete one cycle.\";\n    if (beyondSmallAngleMark) return \"1/2 marks. The larger-angle cycle is recorded; reset, use 1\u00b0\u201310\u00b0, keep SHM visible and damping at zero, then complete one cycle.\";\n    return \"Complete one cycle at 1\u00b0\u201310\u00b0 and one above 10\u00b0. Keep the SHM curve visible and damping at zero for both comparisons.\";\n  }\n  function updateVisiblePrompt(message) {\n    try {\n      if (message) text = message;\n      else if (score() === 2) text = \"2/2 marks earned. Compare the paths: the large-angle pendulum departs from the SHM model.\";\n      else if (smallAngleMark) text = \"1/2 marks: small-angle cycle complete. Reset; try \u03b8>10\u00b0 for mark 2. Keep SHM visible and b=0.\";\n      else if (beyondSmallAngleMark) text = \"1/2 marks: large-angle cycle complete. Reset; try \u03b8=1\u00b0\u201310\u00b0 for mark 2. Keep SHM visible and b=0.\";\n      else text = \"Blue: pendulum; green: SHM model.\\nGuide: small angles \u224810\u00b0; error varies.\\nMark 1: cycle at 1\u00b0\u201310\u00b0.\\nReset; try >10\u00b0 for mark 2, SHM on, b=0.\";\n    } catch (e) {}\n  }\n  function currentSnapshot() {\n    return {\n      angleDeg: round(numberOr(theta, 0) * 180 / Math.PI, 1),\n      damping: round(numberOr(b, 0), 2),\n      shmVisible: shm === true,\n      lengthM: round(numberOr(L, 0), 2),\n      completedCycles: Math.floor(numberOr(numberofswing, 0))\n    };\n  }\n  function makePayload(reason) {\n    var smallFeedback = smallAngleMark ? \"Earned after one completed cycle at 1\u00b0\u201310\u00b0 with the SHM curve visible and damping zero.\" : \"Not yet earned: complete one cycle at 1\u00b0\u201310\u00b0 with the SHM curve visible and damping zero.\";\n    var largeFeedback = beyondSmallAngleMark ? \"Earned after one completed cycle above 10\u00b0 with the SHM curve visible and damping zero.\" : \"Not yet earned: complete one cycle above 10\u00b0 with the SHM curve visible and damping zero.\";\n    return {\n      schemaVersion: \"1.0.0\",\n      activity: \"pendulum-shm-comparison\",\n      reason: reason,\n      score: score(),\n      max: 2,\n      success: score() === 2,\n      progress: score() / 2,\n      feedback: learnerFeedback(),\n      summary: {\n        interactions: sequence,\n        completedOscillations: completedOscillations,\n        smallAngleMark: smallAngleMark,\n        beyondSmallAngleMark: beyondSmallAngleMark\n      },\n      quiz: { items: [\n        { id: \"small-angle-cycle\", prompt: \"Complete one full cycle at a release angle from 1\u00b0 to 10\u00b0.\", achieved: smallAngleMark, score: smallAngleMark ? 1 : 0, max: 1, feedback: smallFeedback },\n        { id: \"beyond-small-angle-cycle\", prompt: \"Complete one full cycle above a 10\u00b0 release angle.\", achieved: beyondSmallAngleMark, score: beyondSmallAngleMark ? 1 : 0, max: 1, feedback: largeFeedback }\n      ] },\n      history: history.slice(0)\n    };\n  }\n  function store(reason) {\n    try {\n      if (typeof window.storeState === \"function\") window.storeState(makePayload(reason));\n    } catch (e) {}\n  }\n  function record(action, target, value, reason) {\n    var entry = {\n      sequence: ++sequence,\n      modelTimeSec: round(numberOr(t, 0), 2),\n      action: action,\n      target: target,\n      value: value,\n      stateAfter: currentSnapshot()\n    };\n    if (trial) {\n      entry.trial = {\n        releaseAngleDeg: trial.releaseAngleDeg,\n        damping: trial.damping,\n        shmVisible: trial.shmVisible,\n        completedCycles: trial.completedCycles || 0\n      };\n    }\n    history.push(entry);\n    if (history.length > maxHistory) history.shift();\n    store(reason || action);\n  }\n  function currentParameterValue(target) {\n    if (target === \"release_angle\") return round(Math.abs(numberOr(theta, 0) * 180 / Math.PI), 1);\n    if (target === \"damping\") return round(numberOr(b, 0), 2);\n    return null;\n  }\n  function flushParameter() {\n    if (!pendingParameter) return;\n    if (pendingTimer !== null) window.clearTimeout(pendingTimer);\n    pendingTimer = null;\n    var target = pendingParameter;\n    pendingParameter = null;\n    record(\"parameter_changed\", target, currentParameterValue(target), \"parameter_changed\");\n  }\n  function parameter(target) {\n    if (pendingParameter && pendingParameter !== target) flushParameter();\n    trial = null;\n    pendingParameter = target;\n    if (pendingTimer !== null) window.clearTimeout(pendingTimer);\n    pendingTimer = window.setTimeout(flushParameter, 400);\n  }\n  function menu(option) {\n    if (option === \"\" || option === \"Custom angle\") return;\n    flushParameter();\n    if (option === \"Show SHM\" || option === \"Hide SHM\" || option.indexOf(\"\u03b8=\") === 0 || option.indexOf(\"L=\") === 0 || option.indexOf(\"Damping=\") === 0) trial = null;\n    record(\"menu_choice\", \"simulation_menu\", String(option), \"menu_choice\");\n  }\n  function toggle(target, enabled) {\n    flushParameter();\n    if (target === \"shm\") trial = null;\n    record(target === \"shm\" ? \"comparison_visibility_changed\" : \"view_changed\", target, enabled ? \"on\" : \"off\", \"view_changed\");\n  }\n  function play() {\n    flushParameter();\n    if (trial && trial.paused) {\n      trial.paused = false;\n      record(\"motion_resumed\", \"play_button\", \"resume current trial\", \"motion_resumed\");\n      return;\n    }\n    trial = {\n      startCycle: Math.floor(numberOr(numberofswing, 0)),\n      releaseAngleDeg: round(Math.abs(numberOr(theta, 0) * 180 / Math.PI), 1),\n      damping: round(numberOr(b, 0), 2),\n      shmVisible: shm === true,\n      lengthM: round(numberOr(L, 0), 2),\n      completedCycles: 0,\n      paused: false,\n      evaluated: false\n    };\n    record(\"motion_started\", \"play_button\", \"start a pendulum trial\", \"motion_started\");\n  }\n  function pause() {\n    flushParameter();\n    if (trial) trial.paused = true;\n    record(\"motion_paused\", \"play_button\", \"pause current trial\", \"motion_paused\");\n  }\n  function step() {\n    flushParameter();\n    record(\"model_step\", \"step_button\", \"advance one model step\", \"model_step\");\n  }\n  function reset() {\n    flushParameter();\n    record(\"model_reset\", \"reset_button\", \"reset motion; retain earned marks\", \"model_reset\");\n    trial = null;\n  }\n  function cycleResult() {\n    if (!trial.shmVisible) return { target: \"comparison_trial\", message: \"No mark: show the green SHM model before comparing the paths.\" };\n    if (Math.abs(trial.damping) > 0.001) return { target: \"comparison_trial\", message: \"No mark: set damping b=0 so the pendulum and SHM paths can be compared fairly.\" };\n    if (trial.releaseAngleDeg < 1) return { target: \"comparison_trial\", message: \"No mark: choose a non-zero release angle so a full swing can be observed.\" };\n    if (trial.releaseAngleDeg <= 10) {\n      if (smallAngleMark) return { target: \"small_angle_cycle\", message: \"The small-angle mark is already earned; reset and try above 10\u00b0 for the other mark.\" };\n      smallAngleMark = true;\n      return { target: \"small_angle_cycle\", earned: true, message: \"1/2 marks: small-angle cycle complete. Reset; try \u03b8>10\u00b0 for mark 2. Keep SHM visible and b=0.\" };\n    }\n    if (beyondSmallAngleMark) return { target: \"beyond_small_angle_cycle\", message: \"The larger-angle mark is already earned; reset and try 1\u00b0\u201310\u00b0 for the other mark.\" };\n    beyondSmallAngleMark = true;\n    return { target: \"beyond_small_angle_cycle\", earned: true, message: \"1/2 marks: large-angle cycle complete. Reset; try \u03b8=1\u00b0\u201310\u00b0 for mark 2. Keep SHM visible and b=0.\" };\n  }\n  function observe(cycleCount, modelTime) {\n    if (!trial || trial.paused || trial.evaluated) return;\n    var cycles = Math.floor(numberOr(cycleCount, trial.startCycle) - trial.startCycle);\n    if (cycles < 1) return;\n    trial.completedCycles = cycles;\n    trial.evaluated = true;\n    completedOscillations += cycles;\n    var result = cycleResult();\n    updateVisiblePrompt(result.message);\n    record(result.earned ? \"criterion_earned\" : \"full_cycle_completed\", result.target, result.earned ? \"one complete oscillation\" : result.message, result.earned ? \"criterion_earned\" : \"cycle_completed_no_mark\");\n  }\n  return {\n    parameter: parameter,\n    menu: menu,\n    toggle: toggle,\n    play: play,\n    pause: pause,\n    step: step,\n    reset: reset,\n    refreshPrompt: function () { updateVisiblePrompt(); },\n    observe: observe\n  };\n})();"
        },
        {
          "Name": "newposition",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function newPosition () {\n  //lentgh is constant\n  if ( L<0.5 ) {\n  L=0.5;\n}\n  theta=Math.atan2(x,-y);\n  thetas=theta;\n\nx= L*Math.sin(theta);\ny = -L*Math.cos(theta);\n\n//  x1=x;\n  omega=0.0;\n  vx=0.0;\n  vy=0.0;\n  t=0.0;\n  if (window.PendulumAnalytics) window.PendulumAnalytics.parameter('release_angle');\n\n\n // scale=g*(y+L)/2+2;\n  //_view.resetTraces();\n}"
        },
        {
          "Name": "android",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "//code reference: http://davidwalsh.name/detect-android\nfunction checkAndroid () {\n  var ua = navigator.userAgent.toLowerCase();\n  return ua.indexOf(\"android\") > -1; //&& ua.indexOf(\"mobile\");\n}"
        },
        {
          "Name": "fullscreen",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "//https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode\n// does not work for iOS \n/*jslint browser:true */\nfunction toggleFullScreen() {\n  if (!document.fullscreenElement &&    // alternative standard method\n      !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) {  // current working methods\n    if (document.documentElement.requestFullscreen) {\n      document.documentElement.requestFullscreen();\n    } else if (document.documentElement.msRequestFullscreen) {\n      document.documentElement.msRequestFullscreen();\n    } else if (document.documentElement.mozRequestFullScreen) {\n      document.documentElement.mozRequestFullScreen();\n    } else if (document.documentElement.webkitRequestFullscreen) {\n      document.documentElement.webkitRequestFullscreen();\n    }\n  } else {\n    if (document.exitFullscreen) { //Standard\n      document.exitFullscreen();\n    } else if (document.msExitFullscreen) { //Internet Explorer 11\n      document.msExitFullscreen();\n    } else if (document.mozCancelFullScreen) { //Gecko (Firefox)\n      document.mozCancelFullScreen();\n    } else if (document.webkitExitFullscreen) { //Safari (WebKit)\n      document.webkitExitFullscreen();\n    }\n  }\n}"
        },
        {
          "Name": "changeOrientation",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// code to be copied to EJSS source code under Custom and used in drawingPanel3D and plottingPanel2D\n// address the problem is height difference is iOS app , epub, and Firefox\n// user need to change only k and kepub\n// copy %changeOrientation()% into the Height Field of drawingPanel3D and plottingPanel2D\nfunction changeOrientation() {\n \nvar k =1 ; // k control height 1 is for full screen, 0.9 shorten etc\nvar kapple =0.95 // control apple app height\nvar kepub =0.95 ;\n// check platform for Apps\ntry { // allow code to run in Student Learning Space \n  var iOSapp =  (typeof parent.device != 'undefined' && parent.device.platform == \"iOS\");\n  var Androidapp = (typeof parent.device != 'undefined' && parent.device.platform == \"Android\");\n} catch(e) {\n  var iOSapp = false;\n  var Androidapp = false;\n}\n// check platform for web browsers\nvar iOS =/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\nvar iPad =/iPad/.test(navigator.userAgent) && !window.MSStream;\nvar iPhone = /iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\nvar Android= /Android|android/i.test(navigator.userAgent);\n\n//navigator\nvar Firefox = navigator.userAgent.indexOf(\"Firefox\") != -1;\n \nswitch (window.orientation) { // using window.orientation as deciding factor\n  case 0:\n  case 180:\n    this.screenOrientation = 'portrait';\n    if (iOSapp){ // does not seems to work\n      \n      return window.screen.height*kapple;  //0.1 for app and 0.1 for nonfullscreenapp  \n    \n    }\n    else if (_isEPub){ // does not seems to work\n      //   return Math.max(window.screen.width,window.screen.height)*0.9;\n      return window.innerHeight*kepub;  //0.1 for app and 0.1 for nonfullscreenapp  \n      // return window.screen.height;\n      //  return window.innerHeight;\n      // return document.documentElement.clientHeight;\n    }\n   \n    else {\n     \n      return 100*k+\"vh\";\n    }\n    break;\n  case 90:\n  case -90:\n    this.screenOrientation = 'landscape';\n \n    if (iOSapp){ // App\n      return window.screen.width*kapple;  \n      // return window.screen.height;\n      //  return window.innerHeight;\n      //  return document.documentElement.clientHeight;\n    }\n    else if (_isEPub){ // does not seems to work\n      //   return Math.max(window.screen.width,window.screen.height)*0.9;\n      return window.innerHeight*kepub;  //0.1 for app and 0.1 for nonfullscreenapp  \n      // return window.screen.height;\n      //  return window.innerHeight;\n      // return document.documentElement.clientHeight;\n    }\n   \n    else {\n      return 100*k+\"vh\";\n      }\n    break;\n  default:\n    this.screenOrientation = 'unknown';\n    //       return (iPad)?\"\"+(window.screen.width+window.screen.height)*0.4:((iPhone)?\"\"+window.screen.width:_view._format(window.innerHeight*0.9,\"0\"));\n     if (Firefox){\n      return window.innerHeight*k;// number as of 20180831 Firefox does not support vh yet so need a separate line to handle\n      }\n      \n      else {\n        return 100*k+\"vh\"; // string every other solid deployment, Android Android App web chrome etc works in EJSS6.0beta\n        //  works in EjsS_5.3_180131\n        //window.innerHeight*k;\n}\n\n}\n \n}"
        },
        {
          "Name": "startAccelerometer",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function startAccelerometer () {\n // msg=\"\";\n // displaySlider=\"none\";\n  theta=0; // slider not used\n//  xCursor=xPivot=0;\n  accelerometer.start();\n  accelerometer.setAverageInterval(0.1);\n  accelRunning=true;\n // updateAccValues();\n}"
        },
        {
          "Name": "readAcceleromoter",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function readAccelerometer () {\n  var viewData = accelerometer.getViewData();\n  accX = viewData.x;\n  accY = viewData.y;\n  accZ = viewData.z;\n  //Assume sensor is not present if all componets are zero\n  var hasData=viewData.x||viewData.y||viewData.z;\n  msg=hasData?\"\":\"Accelerometer not detected. Use slider to simulate acceleration.\";\n  //phi=hasData?Math.atan2(accX,-accY):0;\n  if(hasData){\n    phi=-Math.atan2(accX,-accY);   //tilt angle\n //   xCursor=xPivot=0;              // center the pivor\n    g=Math.sqrt(accX*accX+accY*accY);\n  }else{  // fake data\n    phi=0; // no tilt\n    g=g0;\n    accX=0;\n    accY=-g; // from g\n  }\n}"
        },
        {
          "Name": "stopAcceleromoeter",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function stopAccelerometer () {\n  accelerometer.stop();\n // msg=\"Use slider to simulate acceleration.\"\n//  phi=0; // acceleromter angle not used\n  accX=0;\n  accY=g;\n  accZ=0;\n // displaySlider=\"block\";\n // accelRunning=false;\n}"
        },
        {
          "Name": "updateAccValues",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function updateAccValues() {\n  if(accelRunning){\n    if(_isPaused ){\n      readAccelerometer();\n      _model.update();\n      _view._update();\n      _view._render();\n     }\n    window.setTimeout(updateAccValues, 100);// read accelerometer every 1/10 sec\n  }\n}"
        }
      ]
    },
    "elements": {
      "list": [
        {
          "Classname": "org.colos.ejss.model_elements.hardware.AccelerometerElement",
          "Name": "accelerometer"
        }
      ]
    }
  },
  "view": {
    "Tree": [
      {
        "Name": "Full",
        "Type": "Panel",
        "Expanded": "true",
        "Properties": [
          {
            "name": "Height",
            "value": "Height"
          },
          {
            "name": "Width",
            "value": "Width"
          }
        ],
        "Children": [
          {
            "Name": "controlPanel",
            "Type": "Panel",
            "Expanded": "true",
            "Properties": [
              {
                "name": "Visibility",
                "value": "!print"
              },
              {
                "name": "Width",
                "value": "\"100%\""
              },
              {
                "name": "Display",
                "value": "\"inline-flex\""
              }
            ],
            "Children": [
              {
                "Name": "comboBox",
                "Type": "ComboBox",
                "Properties": [
                  {
                    "name": "Options",
                    "value": "[\"Show SHM\",\"Hide SHM\",\"Show circular view\",\"Show x-y view\",\"\u03b8=0\u00b0\",\"\u03b8=1\u00b0\",\"\u03b8=2\u00b0\",\"\u03b8=3\u00b0\",\"\u03b8=4\u00b0\",\"\u03b8=5\u00b0\",\"\u03b8=6\u00b0\",\"\u03b8=7\u00b0\",\"\u03b8=8\u00b0\",\"\u03b8=9\u00b0\",\"\u03b8=10\u00b0\",\"\u03b8=20\u00b0\",\"\u03b8=30\u00b0\",\"\u03b8=40\u00b0\",\"\u03b8=50\u00b0\",\"\u03b8=60\u00b0\",\"\u03b8=70\u00b0\",\"\u03b8=80\u00b0\",\"\u03b8=90\u00b0\",\"L=1 m\",\"L=2 m\",\"L=3 m\",\"L=4 m\",\"L=5 m\",\"L=6 m\",\"L=7 m\",\"Damping=0.0\",\"Damping=0.5\",\"Damping=1.0\",\"Damping=1.5\",\"Damping=2.0\",\"Damping=5.0\",\"Custom angle\",\"\",\"print\"]"
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Choose \u03b8, length L or damping from the menu. Drag the bob for a custom angle; use damping = 0 for a fair SHM comparison.\""
                  },
                  {
                    "name": "OnChange",
                    "value": "//var option = _view.comboBox.getProperty(\"SelectedOptions\");\n//alert(option);\nvar opts = _view.comboBox.getProperty(\"SelectedOptions\");  // array of options\n    var option = (opts.length > 0)? opts[0]:\"\"; // selected option \n\nif ( option==\"Custom angle\"){\n  \n  }\n//printing starts here\nelse if (option == \"print\"){\n  print = true;\n  }\n//printing ends here\n  else if ( option==\"Show SHM\"){\nshm=true;\n\n  }\n  else if ( option==\"Hide SHM\"){\nshm=false;\n\n  }\n  \n//\"Show circular view\",\"Show x-y view\"\nelse if ( option==\"Show circular view\"){\npolarshow=true;\n\n  }\n  else if ( option==\"Show x-y view\"){\npolarshow=false;\n\n  }\nelse if ( option==\"\u03b8=0\u00b0\"){\nthetadegrees = 0;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=1\u00b0\"){\nthetadegrees = 1;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=2\u00b0\"){\nthetadegrees = 2;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=3\u00b0\"){\nthetadegrees = 3;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=4\u00b0\"){\nthetadegrees = 4;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=5\u00b0\"){\nthetadegrees = 5;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=6\u00b0\"){\nthetadegrees = 6;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=7\u00b0\"){\nthetadegrees = 7;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=8\u00b0\"){\nthetadegrees = 8;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=9\u00b0\"){\nthetadegrees = 9;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=10\u00b0\"){\nthetadegrees = 10;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=20\u00b0\"){\nthetadegrees = 20;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=30\u00b0\"){\nthetadegrees = 30;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=40\u00b0\"){\nthetadegrees = 40;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=50\u00b0\"){\nthetadegrees = 50;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=60\u00b0\"){\nthetadegrees = 60;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n\n  }\n  else if ( option==\"\u03b8=70\u00b0\"){\nthetadegrees = 70;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=80\u00b0\"){\nthetadegrees = 80;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n  else if ( option==\"\u03b8=90\u00b0\"){\nthetadegrees = 90;\ntheta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\n\n  }\n   else if ( option==\"L=1 m\"){\nL = 1;\n  }\n  else if ( option==\"L=2 m\"){\nL = 2;\n  }\n  else if ( option==\"L=3 m\"){\nL = 3;\n  }\n  else if ( option==\"L=4 m\"){\nL = 4;\n  }\n  else if ( option==\"L=5 m\"){\nL = 5;\n  }\n  else if ( option==\"L=6 m\"){\nL = 6;\n  }\n  else if ( option==\"L=7 m\"){\nL = 7;\n  }\n  //\"b=0.0\",\"b=0.5\",\"b=1.0\",\"b=1.5\",\"b=2.0\",\"b=5.0\",\n  else if ( option==\"Damping=0.0\"){\nb=0.0;\n  }\n  else if ( option==\"Damping=0.5\"){\nb=0.5;\n  }\n  else if ( option==\"Damping=1.0\"){\nb=1.0;\n  }\n  else if ( option==\"Damping=1.5\"){\nb=1.5;\n  }\n  else if ( option==\"Damping=2.0\"){\nb=2.0;\n  }\n  else if ( option==\"Damping=5.0\"){\nb=5.0;\n  }\n  \n  \n  \n  \n\r\nif (window.PendulumAnalytics) window.PendulumAnalytics.menu(option);"
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "checkBox",
                "Type": "CheckBox",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"shm\""
                  },
                  {
                    "name": "Checked",
                    "value": "shm"
                  },
                  {
                    "name": "TextOn",
                    "value": "shm"
                  },
                  {
                    "name": "TextOff",
                    "value": "shm"
                  },
                  {
                    "name": "OnCheckOn",
                    "value": "shm=true; if (window.PendulumAnalytics) window.PendulumAnalytics.toggle(\"shm\", true);"
                  },
                  {
                    "name": "OnCheckOff",
                    "value": "shm=false; if (window.PendulumAnalytics) window.PendulumAnalytics.toggle(\"shm\", false);"
                  }
                ]
              },
              {
                "Name": "checkBox_2",
                "Type": "CheckBox",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"polar?\""
                  },
                  {
                    "name": "Checked",
                    "value": "polarshow"
                  },
                  {
                    "name": "OnCheckOn",
                    "value": "polarshow=true; if (window.PendulumAnalytics) window.PendulumAnalytics.toggle(\"polar\", true);"
                  },
                  {
                    "name": "OnCheckOff",
                    "value": "polarshow=false; if (window.PendulumAnalytics) window.PendulumAnalytics.toggle(\"polar\", false);"
                  }
                ]
              },
              {
                "Name": "thetadegree",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"\u03b8=\"+thetadegrees.toFixed(0)+\"\u00b0\""
                  }
                ]
              },
              {
                "Name": "slider",
                "Type": "Slider",
                "Properties": [
                  {
                    "name": "OnChange",
                    "value": "theta = thetadegrees/180*pi;\nthetas = thetadegrees/180*pi;\r\nif (window.PendulumAnalytics) window.PendulumAnalytics.parameter('release_angle');"
                  },
                  {
                    "name": "Value",
                    "value": "thetadegrees"
                  },
                  {
                    "name": "Minimum",
                    "value": "-90"
                  },
                  {
                    "name": "Maximum",
                    "value": "90"
                  },
                  {
                    "name": "Step",
                    "value": "1"
                  },
                  {
                    "name": "ShowText",
                    "value": "false"
                  },
                  {
                    "name": "Format",
                    "value": "\"\u03b8=\"+0+\"\u00b0\""
                  }
                ]
              },
              {
                "Name": "damping",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"b=\"+b.toFixed(2)"
                  }
                ]
              },
              {
                "Name": "slider_2",
                "Type": "Slider",
                "Properties": [
                  {
                    "name": "Value",
                    "value": "b"
                  },
                  {
                    "name": "Minimum",
                    "value": "0"
                  },
                  {
                    "name": "Maximum",
                    "value": "2"
                  },
                  {
                    "name": "Step",
                    "value": "0.1"
                  },
                  {
                    "name": "ShowText",
                    "value": "false"
                  },
                  {
                    "name": "Format",
                    "value": "\"\u03b8=\"+0+\"\u00b0\""
                  },
                  {
                    "name": "OnChange",
                    "value": "if (window.PendulumAnalytics) window.PendulumAnalytics.parameter('damping');"
                  }
                ]
              },
              {
                "Name": "playPauseButton2",
                "Type": "TwoStateButton",
                "Properties": [
                  {
                    "name": "OffClick",
                    "value": "if (window.PendulumAnalytics) window.PendulumAnalytics.pause();\r\ntext=\"paused\"; _pause();"
                  },
                  {
                    "name": "TextOn",
                    "value": "\"Play\u25ba\""
                  },
                  {
                    "name": "State",
                    "value": "_isPaused"
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Play or pause the motion\""
                  },
                  {
                    "name": "TextOff",
                    "value": "\"Pause\u275a\u275a\""
                  },
                  {
                    "name": "OnClick",
                    "value": "if (window.PendulumAnalytics) window.PendulumAnalytics.play();\r\n_play(); text=\"playing\";"
                  },
                  {
                    "name": "Font",
                    "value": "fontb"
                  }
                ]
              },
              {
                "Name": "stepButton2",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Tooltip",
                    "value": "\"Advance by one time step\""
                  },
                  {
                    "name": "Text",
                    "value": "\"Step\u275a\u25ba\""
                  },
                  {
                    "name": "OnClick",
                    "value": "if (window.PendulumAnalytics) window.PendulumAnalytics.step(); _step();"
                  },
                  {
                    "name": "Font",
                    "value": "fontb"
                  }
                ]
              },
              {
                "Name": "resetButton2",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Tooltip",
                    "value": "\"Reset to 10\u00b0 before each new angle trial\""
                  },
                  {
                    "name": "Text",
                    "value": "\"Reset\u21bb\""
                  },
                  {
                    "name": "OnClick",
                    "value": "if (window.PendulumAnalytics) window.PendulumAnalytics.reset(); _reset(); if (window.PendulumAnalytics) window.PendulumAnalytics.refreshPrompt();"
                  },
                  {
                    "name": "Font",
                    "value": "fontb"
                  }
                ]
              }
            ]
          },
          {
            "Name": "panel2",
            "Type": "Panel",
            "Expanded": "true",
            "Properties": [
              {
                "name": "Height",
                "value": "\"100%\""
              },
              {
                "name": "Width",
                "value": "\"100%\""
              }
            ],
            "Children": [
              {
                "Name": "plottingPanel",
                "Type": "PlottingPanel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Gutters",
                    "value": "[0,0,0,0]"
                  },
                  {
                    "name": "ShowAreaRectangle",
                    "value": "false"
                  },
                  {
                    "name": "XFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "OnDoubleClick",
                    "value": "toggleFullScreen();"
                  },
                  {
                    "name": "AxisXShow",
                    "value": "!polarshow"
                  },
                  {
                    "name": "YFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "XTickStep",
                    "value": "0.5"
                  },
                  {
                    "name": "YTickStep",
                    "value": "0.5"
                  },
                  {
                    "name": "AllowScalingDragging",
                    "value": "true"
                  },
                  {
                    "name": "XAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "Height",
                    "value": "%changeOrientation()%"
                  },
                  {
                    "name": "GridXShow",
                    "value": "!polarshow"
                  },
                  {
                    "name": "Width",
                    "value": "Width1"
                  },
                  {
                    "name": "TLMessage",
                    "value": "!print?text:\"\""
                  },
                  {
                    "name": "Background",
                    "value": "\"url(#mygrandient2)\""
                  },
                  {
                    "name": "Title",
                    "value": "\"Pendulum vs small-angle SHM\""
                  },
                  {
                    "name": "Enabled",
                    "value": "true"
                  },
                  {
                    "name": "SquareAspect",
                    "value": "true"
                  },
                  {
                    "name": "MaximumY",
                    "value": "0"
                  },
                  {
                    "name": "OnDrag",
                    "value": " _view.plottingPanel.getAxisX().setAbsoluteY(_view.plottingPanel.getGrid().getFixedTickY());\n  _view.plottingPanel.getAxisY().setAbsoluteX(_view.plottingPanel.getGrid().getFixedTickX());"
                  },
                  {
                    "name": "MaximumX",
                    "value": "1.2"
                  },
                  {
                    "name": "YAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "GridYShow",
                    "value": "!polarshow"
                  },
                  {
                    "name": "MinimumX",
                    "value": "-1.2"
                  },
                  {
                    "name": "MinimumY",
                    "value": "-1.2"
                  },
                  {
                    "name": "AxisYShow",
                    "value": "!polarshow"
                  },
                  {
                    "name": "AutoScaleY",
                    "value": "false"
                  },
                  {
                    "name": "AutoScaleX",
                    "value": "false"
                  },
                  {
                    "name": "Visibility",
                    "value": "!polarshow"
                  },
                  {
                    "name": "BLMessage",
                    "value": "!print?\"accelPresent=\"+accelPresent+\"\\naccX =\"+accX.toFixed(2)+\"\\naccY =\"+accY.toFixed(2)+\"\\naccZ =\"+accZ.toFixed(2):\"\""
                  },
                  {
                    "name": "BRMessage",
                    "value": "!print?\"T simple-real = \"+_view._format(T1,\"0.000\") + \" s & \\nT shm =\" + _view._format(T,\"0.000\") + \" s \"+\"\\nt = \"+_view._format(t,\"0.000\") + \" s ,\\n\"+ \"numberofswing =\"+_view._format(numberofswing,\"00\")+\"\\nb=\"+b.toFixed(1)+\" 1/sm\":\"\""
                  }
                ],
                "Children": [
                  {
                    "Name": "polar",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "Visibility",
                        "value": "polarshow"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "shape",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"White\""
                          },
                          {
                            "name": "SizeX",
                            "value": "6"
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"NORTH\""
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"RECTANGLE\""
                          },
                          {
                            "name": "X",
                            "value": "0"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "SizeY",
                            "value": "6"
                          }
                        ]
                      },
                      {
                        "Name": "radiiSet",
                        "Type": "ShapeSet2D",
                        "Properties": [
                          {
                            "name": "NumberOfElements",
                            "value": "nr"
                          },
                          {
                            "name": "SizeX",
                            "value": "radii"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"LightGray\""
                          },
                          {
                            "name": "X",
                            "value": "0"
                          },
                          {
                            "name": "Attributes",
                            "value": "{ \"stroke-dasharray\":\"8 8 8 8\" } "
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "SizeY",
                            "value": "radii"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          },
                          {
                            "name": "DrawFill",
                            "value": "false"
                          }
                        ]
                      },
                      {
                        "Name": "spokeSet",
                        "Type": "SegmentSet2D",
                        "Properties": [
                          {
                            "name": "NumberOfElements",
                            "value": "ns"
                          },
                          {
                            "name": "SizeX",
                            "value": "dxSpoke"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"LightGray\""
                          },
                          {
                            "name": "X",
                            "value": "0"
                          },
                          {
                            "name": "Attributes",
                            "value": "{ \"stroke-dasharray\":\"8 8 8 8\" } "
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "SizeY",
                            "value": "dySpoke"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "segment",
                    "Type": "Segment2D",
                    "Properties": [
                      {
                        "name": "SizeX",
                        "value": "x"
                      },
                      {
                        "name": "X",
                        "value": "0"
                      },
                      {
                        "name": "Y",
                        "value": "0"
                      },
                      {
                        "name": "SizeY",
                        "value": "y"
                      },
                      {
                        "name": "LineWidth",
                        "value": "2"
                      }
                    ]
                  },
                  {
                    "Name": "group",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "X",
                        "value": "xs"
                      },
                      {
                        "name": "Y",
                        "value": "ys"
                      },
                      {
                        "name": "Visibility",
                        "value": "shm"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "shm",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"Green\""
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"SOUTH\""
                          },
                          {
                            "name": "Y",
                            "value": "-0.05"
                          },
                          {
                            "name": "Text",
                            "value": "\"SHM\""
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_ANY\""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "group2",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "X",
                        "value": "x"
                      },
                      {
                        "name": "Y",
                        "value": "y"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "shm2",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"Blue\""
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"NORTH\""
                          },
                          {
                            "name": "Y",
                            "value": "-0.05"
                          },
                          {
                            "name": "Text",
                            "value": "\"Pendulum\""
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_ANY\""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "mass",
                    "Type": "Shape2D",
                    "Properties": [
                      {
                        "name": "FillColor",
                        "value": "\"url(#mygrandient)\""
                      },
                      {
                        "name": "Transformation",
                        "value": "theta"
                      },
                      {
                        "name": "RelativePosition",
                        "value": "\"CENTERED\""
                      },
                      {
                        "name": "ShapeType",
                        "value": "\"WHEEL\""
                      },
                      {
                        "name": "OnDrag",
                        "value": "newPosition();\r\n\r\n_view.comboBox.setSelectedOptions([\"Custom angle\"]);"
                      },
                      {
                        "name": "SizeX",
                        "value": "40"
                      },
                      {
                        "name": "X",
                        "value": "x"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Red\""
                      },
                      {
                        "name": "Y",
                        "value": "y"
                      },
                      {
                        "name": "SizeY",
                        "value": "40"
                      },
                      {
                        "name": "PixelSize",
                        "value": "true"
                      },
                      {
                        "name": "LineWidth",
                        "value": "2"
                      },
                      {
                        "name": "EnabledPosition",
                        "value": "\"ENABLED_ANY\""
                      }
                    ]
                  },
                  {
                    "Name": "shmdrivenmasspostion",
                    "Type": "Shape2D",
                    "Properties": [
                      {
                        "name": "FillColor",
                        "value": "\"Green\""
                      },
                      {
                        "name": "SizeX",
                        "value": "20"
                      },
                      {
                        "name": "RelativePosition",
                        "value": "\"CENTERED\""
                      },
                      {
                        "name": "ShapeType",
                        "value": "\"ELLIPSE\""
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Blue\""
                      },
                      {
                        "name": "X",
                        "value": "xs"
                      },
                      {
                        "name": "Y",
                        "value": "ys"
                      },
                      {
                        "name": "Visibility",
                        "value": "shm"
                      },
                      {
                        "name": "PixelSize",
                        "value": "true"
                      },
                      {
                        "name": "SizeY",
                        "value": "20"
                      }
                    ]
                  }
                ]
              }
            ]
          }
        ]
      }
    ],
    "RootProperties": []
  },
  "metadata": {
    "APP": "WebEJS",
    "CreatedWith": "WebEJS : The web version of Easy JavaScript Simulations",
    "MoreInfo": "WebEJS 1.1",
    "version": "https://www.um.es/fem/wikis/webejs/"
  }
}