{
  "information": {
    "Title": "ejss_model_dopplerxywee01 Doppler Effect Sound Wave JavaScript Applet",
    "Author": [
      "Fu-Kwun Hwang and remixed by lookang (weelookang@gmail.com)",
      "lookang"
    ],
    "AuthorLogo": [
      "./01authorfu-kwun.hwang.png",
      "./01authorlookang50x50.png"
    ],
    "Password": "",
    "Keywords": "",
    "Abstract": "http://weelookang.blogspot.sg/2016/03/doppler-effect-sound-wave-javascript.html",
    "Copyright": "Creative Commons Attribution",
    "Level": "",
    "Language": "",
    "Logo": [
      "./doppler/Screen Shot 2017-05-25 at 11.17.57 AM (2).png"
    ],
    "RunAlways": "true",
    "ModelTab": "",
    "ModelTabTitle": "",
    "ModelName": "",
    "FixedNavigationBar": "false",
    "CSSFile": "",
    "DetectedFiles": [
      "./01authorfu-kwun.hwang.png",
      "./01authorlookang50x50.png",
      "./doppler/Screen Shot 2017-05-25 at 11.17.57 AM (2).png"
    ],
    "AuxiliaryFiles": [
      "./doppler/"
    ],
    "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>",
    "SaveInXMLFormat": "false",
    "IncludeSource": "true",
    "IncludeLibrary": "true",
    "UglifyJS": "false",
    "PreviewFullModel": "false",
    "UseInterpreter": "true",
    "UseDeltaForODE": "false"
  },
  "description": {
    "pages": [
      {
        "Name": "Intro Page",
        "Active": "true",
        "Internal": "true",
        "Type": "DESCRIPTION_EDITOR",
        "Locale": "_default_",
        "Title": "Intro Page",
        "External": "false",
        "Code": "<html>\n<head></head>\n<body>\n<p>    Designed by Fu-Kwun Hwang http://www.phy.ntnu.edu.tw/ntnujava/ remixed by     lookang Reference taken from <a href=\"http://tp.lc.ehu.es/jma.html\">Juan     M. Aguirregabiria's </a><a target=\"_blank\" href=\"http://www.compadre.org/osp/items/detail.cfm?ID=7902\">http://www.compadre.org/osp/items/detail.cfm?ID=7902</a>     and Andrew Duffy's <a target=\"_blank\" href=\"http://www.compadre.org/osp/items/detail.cfm?ID=9982\">http://www.compadre.org/osp/items/detail.cfm?ID=9982     </a>which made the remixing of this simulation a lot easier :) lookang     thanks to the all of them great physics teachers. For more info: <a href=\"http://weelookang.blogspot.sg/2011/09/ejs-open-source-1-dimension-doppler.html\">http://weelookang.blogspot.sg/2011/09/ejs-open-source-1-dimension-doppler.html</a> </p><h1>      The Doppler effect    </h1><p> </p><p>      The Doppler effect describes the shift in frequency of a wave that is       produced by the motion of either the wave source or the observer of the       wave (or both).    </p><p>    A sound source is moving with velocity <em>v</em>     along the horizontal axis. Every period <em>T</em> a     wave front leaves the source and travels with velocity <em>c</em> with     respect to a medium (say air), assuming no air motion. A detector     is located at position (<em>x</em>, <em>y</em>)     and may move with velocity (<em>dx/dt</em>, <em>dy/dt</em>).     To promote ease of learning, only the x direction is enabled, thus, making     exploration confined to 1 Dimension.    </p><ul><li>        You may change via sliders and edit the values of the aforementioned         quantities, as well as the time interval <em>dt</em> between animation         frames.      </li><li>        The source and detector position may also be chosen by means of the         sliders.      </li><li>        Press <strong>Initial</strong> to set t = 0 and the source at its initial         position.      </li><li>        Press <strong>Continue</strong> to start or continue the animation.      </li><li>        Press <strong>Stop</strong> to pause the animation, and <strong>Reset</strong> to recover         the default settings.      </li></ul><p>    In the graphics window below the animation a vertical red     (green) bar is displayed each time a wave     front leaves the source (reaches     the detector).  </p>\n</body>\n</html>"
      }
    ]
  },
  "model": {
    "variables": {
      "pages": [
        {
          "Name": "coordinate",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "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 1.5vw \"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "range",
              "Value": "2000",
              "Type": "double",
              "Dimension": "",
              "Comment": "range",
              "Domain": "public"
            },
            {
              "Name": "xmin",
              "Value": "-range",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "xmax",
              "Value": "range",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ymin",
              "Value": "-range/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ymax",
              "Value": "range/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "t",
              "Value": "0.00001",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "dt",
              "Value": "0.01",
              "Type": "double",
              "Dimension": "",
              "Comment": "time step",
              "Domain": "public"
            },
            {
              "Name": "size",
              "Value": "range/40",
              "Type": "double",
              "Dimension": "",
              "Comment": "particle size",
              "Domain": "public"
            },
            {
              "Name": "size2",
              "Value": "size/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "stroke",
              "Value": "2.0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "pi",
              "Value": "Math.PI",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "text",
              "Value": "\"select/change \u03b8 and click play\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "basic",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "v0",
              "Value": "330",
              "Type": "double",
              "Dimension": "",
              "Comment": "speed of wave, v0 = 330 m/s",
              "Domain": "public"
            },
            {
              "Name": "vx",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "velocity x source",
              "Domain": "public"
            },
            {
              "Name": "vy",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "velocity x source",
              "Domain": "public"
            },
            {
              "Name": "x",
              "Value": "-vx*6",
              "Type": "double",
              "Dimension": "",
              "Comment": "xsource",
              "Domain": "public"
            },
            {
              "Name": "y",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vs",
              "Value": "Math.sqrt(vx*vx+vy*vy)",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "n",
              "Value": "400",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "xs",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "wavefront x position",
              "Domain": "public"
            },
            {
              "Name": "ys",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "wavefront y position",
              "Domain": "public"
            },
            {
              "Name": "D",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "diameter of wavefront",
              "Domain": "public"
            },
            {
              "Name": "vd",
              "Value": "2*v0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "velocity of diameter wavefront",
              "Domain": "public"
            },
            {
              "Name": "mx",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "my",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "press",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "T",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "period",
              "Domain": "public"
            },
            {
              "Name": "timemax",
              "Value": "(xmax-xmin)/vx",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "language",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "l_play",
              "Value": "\"play\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "l_pause",
              "Value": "\"pause\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "l_reset",
              "Value": "\"reset\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "l_init",
              "Value": "\"initialize\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "label",
              "Value": "\"play\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "l_step",
              "Value": "\"step\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "sound",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "xe",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "xobserver",
              "Domain": "public"
            },
            {
              "Name": "ye",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "sizee",
              "Value": "size*2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "eid",
              "Value": "0",
              "Type": "int",
              "Dimension": "",
              "Comment": "observer counter id",
              "Domain": "public"
            },
            {
              "Name": "sound",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "ts",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "",
              "Comment": "time store",
              "Domain": "public"
            },
            {
              "Name": "re",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "Math.sqrt(dx*dx+dy*dy);  re=distance(xe-xs[eid],ye-ys[eid])",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "lookang",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "c",
              "Value": "340",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vxobserver",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vyobserver",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vobserver",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "count",
              "Value": "0",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "tEmitted",
              "Value": "0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "tDetected",
              "Value": "0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "show",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "observershow",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "frequencyemitted",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "frequencydetected",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "number",
              "Value": "100",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "A1",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "omega",
              "Value": "2*pi*T",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "xscalar",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "yscalar",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "i",
              "Value": "0",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "j",
              "Value": "0",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "lambda",
              "Value": "vs*T",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "k",
              "Value": "2.0*pi/lambda",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "d",
              "Value": "0",
              "Type": "double",
              "Dimension": "[number+1][number+1]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "sum",
              "Value": "0",
              "Type": "double",
              "Dimension": "[number+1][number+1]",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "typeofplot",
              "Value": "1",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "colormode",
              "Value": "1",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "index",
              "Value": "0",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "layout",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "isAndroid",
              "Value": "checkAndroid()",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "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": "display width",
              "Domain": "public"
            },
            {
              "Name": "Width2",
              "Value": "\"0%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "display width",
              "Domain": "public"
            },
            {
              "Name": "world",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "graph",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "disabledworld",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "disabled",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "boolean",
              "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": "Android",
              "Value": "/Android|android/i.test(navigator.userAgent)",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        }
      ]
    },
    "initialization": {
      "pages": [
        {
          "Name": "\u00aa\u00ec\u00a9l\u00ad\u00c8",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "//_view.DrawingPanel.setAntialiasTextOn(true);\n//_view.DrawingPanel.setAntialiasShapeOn(true);\n\nfor(var i=0;i<n;i++){\n D[i]=0; \n xs[i]=x;\n ys[i]=y;\n vd[i]=0.; // make all wavefront start with zero speed\n}\n eid=0;\n sound=false;\nt=0;\ntimemax=(xmax-xmin)/vx;\n"
        },
        {
          "Name": "svgradient",
          "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=\"90%\" fx=\"90%\" fy=\"10%\">'+\n  '    <stop offset=\"0%\" style=\"stop-color:rgb(150,255,255); stop-opacity:1\" />'+\n  '    <stop offset=\"100%\" style=\"stop-color:rgb(150,150,255);stop-opacity:1\" />'+\n  '  </radialGradient>'+\n  '</defs></svg>';\ncontainer.innerHTML = svggradient;\ndocument.body.appendChild(container);\n//\"url(#mygrandient)\"\n"
        },
        {
          "Name": "axes",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "_view.plottingPanel.getAxisX().setPosition([0,0.5]);\n_view.plottingPanel.getTitleX().setPosition([0.5,0.5]);\n_view.plottingPanel.getAxisY().setPosition([0,0]);\n\n_view.plottingPanel2.getAxisX().setPosition([0,0.5]);\n_view.plottingPanel2.getTitleX().setPosition([0.95,0.5]);\n_view.plottingPanel2.getAxisY().setPosition([0.5,0]);\n//_view.plottingPanel2.getTitleY().setPosition([0.6,0.85]);\n"
        }
      ]
    },
    "evolution": {
      "information": {
        "FPS": "20",
        "SPD": "5",
        "RealTimeVariable": "",
        "Autoplay": "false"
      },
      "pages": [
        {
          "Name": "ODE",
          "Active": "true",
          "Internal": "false",
          "Type": "ODE_EDITOR",
          "Comment": "",
          "IndependentVariable": "t",
          "Increment": "dt",
          "Equations": [
            {
              "state": "x",
              "rate": "vx"
            },
            {
              "state": "y",
              "rate": "vy"
            },
            {
              "state": "D[i]",
              "rate": "vd[i]"
            },
            {
              "state": "xe",
              "rate": "vxobserver"
            },
            {
              "state": "ye",
              "rate": "vyobserver"
            }
          ],
          "Method": "RungeKutta",
          "AbsoluteTolerance": "0.0001",
          "PreliminaryCode": {
            "Code": "//re=distance(xe-xs[eid],ye-ys[eid]);\nre=Math.sqrt((xe-xs[eid])*(xe-xs[eid])+(ye-ys[eid])*(ye-ys[eid]));\n",
            "Comment": ""
          },
          "EventMaximumStep": "",
          "Events": {
            "pages": [
              {
                "Type": "EVENT_EDITOR",
                "Name": "Event",
                "Active": "false",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "if(vs<=v0){ //doppler\n  return re-D[eid]/2;\n }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n   tDetected[eid]= t;\n   if(eid<n-1)eid++;\n//   _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "Event 2",
                "Active": "false",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n//  if(vs>v0){ //supersonic\n for( var i=0;i<5;i++){\n   return distance(xe-xs[i],ye-ys[i])-D[i]/2;\n \n  }\n // }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[i]= t;\n    index = i;\n // }// if(eid+1<n-1)eid++;\n   _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "0",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[0],ye-ys[0])-D[0]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[0]= t;\n // }// if(eid+1<n-1)eid++;\n //  _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "1",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[1],ye-ys[1])-D[1]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[1]= t;\n // }// if(eid+1<n-1)eid++;\n//   _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "2",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[2],ye-ys[2])-D[2]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[2]= t;\n // }// if(eid+1<n-1)eid++;\n//   _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "3",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[3],ye-ys[3])-D[3]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[3]= t;\n // }// if(eid+1<n-1)eid++;\n //  _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "4",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[4],ye-ys[4])-D[4]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[4]= t;\n // }// if(eid+1<n-1)eid++;\n //  _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "5",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[5],ye-ys[5])-D[5]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[5]= t;\n // }// if(eid+1<n-1)eid++;\n //  _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "6",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[6],ye-ys[6])-D[6]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[6]= t;\n // }// if(eid+1<n-1)eid++;\n //  _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "7",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[7],ye-ys[7])-D[7]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[7]= t;\n // }// if(eid+1<n-1)eid++;\n//   _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "8",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[8],ye-ys[8])-D[8]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[8]= t;\n // }// if(eid+1<n-1)eid++;\n  // _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "9",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[9],ye-ys[9])-D[9]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[9]= t;\n // }// if(eid+1<n-1)eid++;\n  // _pause();\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "10",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "\n  if(vs>v0){ //supersonic\n// for( var i=0;i<count+1;i++){\n   return distance(xe-xs[10],ye-ys[10])-D[10]/2;\n // index = i;\n//  }\n  }\n",
                "Action": "sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n// for( var i=0;i<count+1;i++){\n   tDetected[10]= t;\n // }// if(eid+1<n-1)eid++;\n //  _pause();\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": []
          }
        }
      ]
    },
    "fixed_relations": {
      "pages": [
        {
          "Name": "emit",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "//if(_isPlaying()){\nfor( var i=0;i<n;i++){\n if(vd[i]===0 && t>=i*T){ // clever way to assign wavefront\n  count = i; // added by lookang to count waves emitted\n  tEmitted[i] = t;\n  vd[i]=2*v0; // assign velocit to wavesfront\n  xs[i]=x; // assign position\n  ys[i]=y;\n }\n// sound\n// vs<v0 for only doppler effect no sonic boom simulated\n// re - D[eid]/2 < size to detect wave overlay detector size\n //if(vs<v0&& Math.abs((re=distance(xe-xs[eid],ye-ys[eid]))-D[eid]/2)<0){\n //  if(vs<v0&& Math.signum((re=distance(xe-xs[eid],ye-ys[eid]))-D[eid]/2)<0){ // change to signum by lookang to detect correctly\n// re=distance(xe-xs[eid],ye-ys[eid]);\n //if(vs<v0&& (re-D[eid]/2)<0){ // change to signum by lookang to detect correctly\n// sound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n//   ts=t;\n//   tDetected[eid]= t;\n //  if(eid<n-1)eid++;\n// }\n\nif(sound&& t>ts+T/10)sound=false;\n}\n//}"
        },
        {
          "Name": "detect",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "if(vs<v0&& (re-D[eid]/2)<0){\n  D[eid]=re*2;\nsound=true;\n//Toolkit.getDefaultToolkit().beep(); // taken from http://www.compadre.org/OSP/items/detail.cfm?ID=8385&Attached=1 \n//Ceiling Bounce Model written by Wolfgang Christian \n   ts=t;\n   tDetected[eid]= t;\n   if(eid<n-1)eid++;\n   }\n//   _pause();\n"
        },
        {
          "Name": "scalapolt",
          "Active": "false",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "omega = 2*pi*T;\nfor (i=0; i<number; i++)\n{\n xscalar = xmin+(xmax-xmin)*i/number;\n for (j=0; j<number; j++)\n {\n  yscalar = ymin+(ymax-ymin)*j/number;\n  d[i][j]=Math.sqrt((xscalar-x)*(xscalar-x)+(yscalar-y)*(yscalar-y));\n//sum[i][j]= A1*Math.cos(omega*t-k*d[i][j]);\n//sum[i][j]= A1*Math.cos(omega/4*t);\nsum[i][j]= A1*Math.cos(-k*d[i][j]);\n}\n}\n"
        },
        {
          "Name": "stop",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "\n\nif(x>xmax || x<xmin || y>ymax || y<ymin||count>401){ // count>3 does not work?\n_pause();\n// playpause();\n sound=false;\n}\nif(xe>xmax || xe<xmin || ye>ymax || ye<ymin||count>401){ // count>3 does not work?\n_pause();\n// playpause();\n sound=false;\n}\n\n\n"
        },
        {
          "Name": "sonicboom",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "vs=Math.sqrt(vx*vx+vy*vy);\nvobserver = Math.sqrt(vxobserver*vxobserver+vyobserver*vyobserver);\nif (Math.abs(vs) >Math.abs(v0) ) // consider only 1 D in x\n{\n      text = \"Sonic Boom\"+\", t = \"+_view._format(t,\"0.00\")+ \" s\";\n  }\n  else {\n    text = \"Doppler Effect\"+\", t = \"+_view._format(t,\"0.00\")+ \" s\";\n    }\n"
        },
        {
          "Name": "frequency",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "frequencyemitted = 1/T;\nif ((x-xe)*(v0-vobserver) >0){ // towards each other\n\nfrequencydetected = frequencyemitted*( v0+ vobserver)/( v0+ vs);\n}\nelse {\n frequencydetected = frequencyemitted*( v0- vobserver)/( v0- vs); \n  }\n"
        }
      ]
    },
    "custom": {
      "pages": [
        {
          "Name": "restart",
          "Active": "false",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function restart () {\n}"
        },
        {
          "Name": "changeOrientation",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function changeOrientation() {\nvar iOSapp = (typeof device != 'undefined' && device.platform == \"iOS\");\nvar iOSapp2 = (typeof device != 'undefined' && device.platform == \"iOS\");\nvar Androidapp = (typeof device != 'undefined' && device.platform == \"Android\");\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\nswitch (window.orientation) {\n            case 0:\n            case 180:\n                   this.screenOrientation = 'portrait';\n                \n                  if (iOSapp){ // does not seems to work\n               //   return Math.max(window.screen.width,window.screen.height)*0.9;\n              return window.screen.height*0.7;    \n                 // return window.screen.height;\n                //  return window.innerHeight;\n              // return document.documentElement.clientHeight;\n               }\n               else if (iOSapp2&&iOS){ // App debugging\n               //   return Math.max(window.screen.width,window.screen.height)*0.9;\n              return window.screen.height*0.7;    \n                 // return window.screen.height;\n                //  return window.innerHeight;\n              // return document.documentElement.clientHeight;\n               }\n               \n              else if (iPad&&iOSapp==false){ // browser currently also for iOS APP\n            //   return Math.max(window.screen.width,window.screen.height);\n          //     return window.innerHeight;\n          return window.screen.height*0.9;\n               }\n               else if (iPhone&&iOSapp==false){ // browser currently also for iOS APP\n        //return window.innerHeight;\n        return window.screen.height*0.7;\n                 }\n                 else if (iPad&&iOSapp==true){ // browser currently also for iOS APP\n            //   return Math.max(window.screen.width,window.screen.height);\n               return window.screen.height;\n               }\n               else if (iPhone&&iOSapp==true){ // browser currently also for iOS APP\n            return window.screen.height;\n                 }\n                 \n /*                \n                 else if (iPad&&!parent.cordova){ //browser \n                //  return Math.max(window.screen.width,window.screen.height)*0.8;\n               return document.documentElement.clientHeight;\n               }\n               else if (iPhone&&!parent.cordova){ //browser \n                // return Math.max(window.screen.width,window.screen.height)*0.7;\n                 return document.documentElement.clientHeight;\n                 }\n                 \n */                \n                 else if (Android&&parent.cordova){\n                  // return Math.max(window.innerWidth,window.innerHeight)*0.9;\n                   return window.innerHeight;\n                   }\n               else{\n                // return Math.max(window.innerWidth,window.innerHeight)*0.9;\n                return window.innerHeight;\n                 }\n                break;\n            case 90:\n            case -90:\n                this.screenOrientation = 'landscape';\n/*                \n                if (iPad&&!parent.cordova){ //browser\n               //  return Math.min(window.screen.width,window.screen.height)*0.8;\n               //alert(\"ipad\");\n              return document.documentElement.clientHeight;\n               }\n                else if (iPhone&&!parent.cordova){ //browser\n              //   return Math.min(window.screen.width,window.screen.height)*0.7;\n                return document.documentElement.clientHeight;\n                 }\n */                if (iOSapp){ // App\n           return window.screen.height*0.7;  \n               // return window.screen.height;\n                //  return window.innerHeight;\n             //  return document.documentElement.clientHeight;\n               }\n               \n              else if (iPad&&iOSapp==false){ // browser currently also for iOS APP\n            //   return Math.max(window.screen.width,window.screen.height);\n           //    return window.innerHeight;\n           return window.screen.width*0.7;\n               }\n               else if (iPhone&&iOSapp==false){ // browser currently also for iOS APP\n    //    return window.innerHeight;\n    return window.screen.width*0.7;\n                 }\n                 else if (iPad&&iOSapp==true){ // browser currently also for iOS APP\n            //   return Math.max(window.screen.width,window.screen.height);\n               return window.screen.height;\n               }\n               else if (iPhone&&iOSapp==true){ // browser currently also for iOS APP\n            return window.screen.height;\n                 }\n                else if (Android&&parent.cordova){ // in Android App form\n                 // return Math.min(window.innerWidth,window.innerHeight)*0.9;\n                  return window.innerHeight;\n                //  alert(\"in Android App form\");\n                  }\n                  else { // browser Android and PC\n                 // return Math.min(window.innerWidth,window.innerHeight)*0.9;\n                 // alert(\"browser Android and PC\");\n                 return window.innerHeight;\n                  }\n                \n                break;\n            \n            \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       return window.innerHeight;\n       }\n    }"
        },
        {
          "Name": "svgradient",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": ""
        },
        {
          "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": "fullsceen",
          "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) {\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}"
        },
        {
          "Name": "playpause",
          "Active": "false",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function playpause () {\n if(label==l_play){\n  label=l_pause;\n  _play();\n }else{\n  label=l_play;\n  _pause();\n }\n}"
        },
        {
          "Name": "distance",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function distance ( dx, dy) {\n return Math.sqrt(dx*dx+dy*dy);\n}"
        }
      ]
    },
    "elements": {
      "list": []
    }
  },
  "view": {
    "Tree": [
      {
        "Name": "panel",
        "Type": "Panel",
        "Expanded": "true",
        "Properties": [
          {
            "name": "Width",
            "value": "Width"
          }
        ],
        "Children": [
          {
            "Name": "controlpanel",
            "Type": "Panel",
            "Expanded": "false",
            "Properties": [
              {
                "name": "Display",
                "value": "!print?\"inline-flex\":\"none\""
              },
              {
                "name": "Font",
                "value": "font"
              }
            ],
            "Children": [
              {
                "Name": "scenariobox",
                "Type": "ComboBox",
                "Properties": [
                  {
                    "name": "Options",
                    "value": "[\"Stationary source\",\"\",\"Doppler effect\",\"vs = 0.3c\",\"vs = 0.5c\",\"vs = 0.7c\",\"Break sound barrier vs=c\",\"Supersonic vs=1.4c\",\"Moving observer\",\"vo = 0.3c\",\"vo = 0.5c\",\"vo = 0.7c\",\"vo = c\",\"vo = 1.4c\",\"Scenario 2\",\"Scenario 3\",\"Scenario 4\",\"Scenario 5\",\"\",\"print\"]"
                  },
                  {
                    "name": "OnChange",
                    "value": "var opts1 = _view.scenariobox.getProperty(\"SelectedOptions\");  // array of options\nvar option1 = (opts1.length > 0)? opts1[0]:\"\"; // selected option \nif ( option1==\"Stationary source\"){\nvx = 0;\nx = 0;\nxe = 6*v0;\nvxobserver = 0; //put far\n_initialize();\n}\n//\"vs = 0.1c\",\"vs = 0.5c\",\"vs = 0.7c\",\"vs = 0.76c\"\n//print\nelse if (option1 == \"print\"){\n  print = true;\n  }\n//print\nelse if ( option1==\"vs = 0.3c\"){\nvx = v0*0.3;\nx = -vx*20;\nxe = 0;\nvxobserver = 0;\n_initialize();\n}\nelse if ( option1==\"vs = 0.5c\"){\nvx = v0*0.5;\nx = -vx*10;\nxe = 0;\nvxobserver = 0;\n_initialize();\n}\nelse if ( option1==\"vs = 0.7c\"){\nvx = v0*0.7;\nx = -1848;\nxe = 0;\nvxobserver = 0;\n_initialize();\n}\nelse if ( option1==\"Break sound barrier vs=c\"){\nvx = v0;\nx = -vx*6;\nxe = 0;\nvxobserver = 0;\n_initialize();\n}\n//\"Supersonic\"\nelse if ( option1==\"Supersonic vs=1.4c\"){\nvx = v0*1.4;\nx = -vx*4;\nxe = 0;\nvxobserver = 0;\n_initialize();\n}\nelse if ( option1==\"vo = 0.3c\"){\nvx = 0;\nx = -vx*20;\n\nvxobserver = v0*0.3;\nxe = -vxobserver*20;\n_initialize();\n}\nelse if ( option1==\"vo = 0.5c\"){\nvx = 0;\nx = -vx*20;\n\nvxobserver = v0*0.5;\nxe = -vxobserver*10;\n_initialize();\n}\nelse if ( option1==\"vo = 0.7c\"){\nvx = 0;\nx = -vx*20;\n\nvxobserver = v0*0.7;\nxe = -1848;\n_initialize();\n}\nelse if ( option1==\"vo = c\"){\nvx = 0;\nx = -vx*20;\n\nvxobserver = v0*0.9999; // debug if need smaller a bit\nxe = -vxobserver*6;\n_initialize();\n}\nelse if ( option1==\"vo = 1.4c\"){\nvx = 0;\nx = -0.001;\n\nvxobserver = v0*1.4;\nxe = -vxobserver*4+0.001;\n_initialize();\n}\n\nelse if ( option1==\"Scenario 1\"){\nvx = 250;\nx = -vx*6;\nxe = 0;\nvxobserver = 0;\n_initialize()\n}\nelse if ( option1==\"Scenario 2\"){\nx = xmin/2;\nxe = 0;\nvx = 0;\nvxobserver = 150;\n_initialize()\n}\nelse if ( option1==\"Scenario 3\"){\nx = xmin/2;\nxe = 0;\nvx = 250;\nvxobserver = 100;\n_initialize()\n}\nelse if ( option1==\"Scenario 4\"){\nx = xmin/2;\nxe = xmax/2;\nvx = 250;\nvxobserver = -150;\n_initialize()\n}\nelse if ( option1==\"Scenario 5\"){\nx = xmin;\nxe = 0;\nvx = 450;\nvxobserver = 0;\n_initialize()\n}"
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "controlcomboBox",
                "Type": "ComboBox",
                "Properties": [
                  {
                    "name": "Options",
                    "value": "[\"Show World\",\"Hide World\",\"\",\"Show Graph\",\"Hide Graph\",\"\",\"Sound On\",\"Sound Off\",\"\",\"print\"]"
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"World View\""
                  },
                  {
                    "name": "OnChange",
                    "value": "var opts = _view.controlcomboBox.getProperty(\"SelectedOptions\");  // array of options\nvar option = (opts.length > 0)? opts[0]:\"\"; // selected option \n\nif ( option==\"Show World\"){\nworld=true;\nWidth1 = \"50%\";\nWidth2 = \"50%\";\ndisabled=false;\n  }\n  \nelse if ( option==\"Hide World\"){\nworld=false;\nWidth1 = \"0%\";\nWidth2 = \"100%\";\ndisabled=true;\n  }\n  \nif ( option==\"Show Graph\"){\ngraph=true;\nWidth1 = \"50%\";\nWidth2 = \"50%\";\ndisabledworld=false;\n  }\n  \nelse if ( option==\"Hide Graph\"){\ngraph=false;\nWidth1 = \"100%\";\nWidth2 = \"0%\";\ndisabledworld=true;\n  }\n  \nif ( option==\"Sound On\"){\nsound=true;\n  }\n//print\nelse if (option == \"print\"){\n  print = true;\n  }\n//print\nelse if ( option==\"Sound Off\"){\nsound=false;\n  }\n"
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  },
                  {
                    "name": "Display",
                    "value": "\"none\""
                  }
                ]
              },
              {
                "Name": "world2",
                "Type": "CheckBox",
                "Properties": [
                  {
                    "name": "Checked",
                    "value": "world"
                  },
                  {
                    "name": "OnCheckOff",
                    "value": "world=false;\nWidth1 = \"0%\";\nWidth2 = \"100%\";\ndisabled=true;\n\n"
                  },
                  {
                    "name": "Background",
                    "value": "\"Orange\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"world view\""
                  },
                  {
                    "name": "Text",
                    "value": "\"world\""
                  },
                  {
                    "name": "Disabled",
                    "value": "disabledworld"
                  },
                  {
                    "name": "OnCheckOn",
                    "value": "world=true;\nWidth1 = \"50%\";\nWidth2 = \"50%\";\ndisabled=false;\n"
                  }
                ]
              },
              {
                "Name": "xvst",
                "Type": "CheckBox",
                "Properties": [
                  {
                    "name": "Checked",
                    "value": "graph"
                  },
                  {
                    "name": "OnCheckOff",
                    "value": "graph=false;\nWidth1 = \"100%\";\nWidth2 = \"0%\";\ndisabledworld=true;"
                  },
                  {
                    "name": "Background",
                    "value": "\"Blue\""
                  },
                  {
                    "name": "Foreground",
                    "value": "\"White\""
                  },
                  {
                    "name": "Text",
                    "value": "\"emit/detect\""
                  },
                  {
                    "name": "Disabled",
                    "value": "disabled"
                  },
                  {
                    "name": "OnCheckOn",
                    "value": "graph=true;\nWidth1 = \"50%\";\nWidth2 = \"50%\";\ndisabledworld=false;"
                  }
                ]
              },
              {
                "Name": "sound",
                "Type": "CheckBox",
                "Properties": [
                  {
                    "name": "Checked",
                    "value": "sound"
                  },
                  {
                    "name": "Text",
                    "value": "\"sound\""
                  },
                  {
                    "name": "ImageOnUrl",
                    "value": "\"./doppler/SoundOn.gif\""
                  },
                  {
                    "name": "ImageOffUrl",
                    "value": "\"./doppler/SoundOff.gif\""
                  }
                ]
              },
              {
                "Name": "playPauseButton2",
                "Type": "TwoStateButton",
                "Properties": [
                  {
                    "name": "OffClick",
                    "value": "text=\"paused\";\n_pause();"
                  },
                  {
                    "name": "TextOn",
                    "value": "\"Play\u25ba\""
                  },
                  {
                    "name": "State",
                    "value": "_isPaused"
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Play/Pause\""
                  },
                  {
                    "name": "TextOff",
                    "value": "\"Pause\u275a\u275a\""
                  },
                  {
                    "name": "OnClick",
                    "value": "_play();\ntext=\"playing\";"
                  },
                  {
                    "name": "Font",
                    "value": "fontb"
                  }
                ]
              },
              {
                "Name": "stepButton2",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Tooltip",
                    "value": "\"Step\""
                  },
                  {
                    "name": "Text",
                    "value": "\"Step\u275a\u25ba\""
                  },
                  {
                    "name": "OnClick",
                    "value": "_step()"
                  },
                  {
                    "name": "Font",
                    "value": "fontb"
                  }
                ]
              },
              {
                "Name": "resetButton2",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Tooltip",
                    "value": "\"Reset\""
                  },
                  {
                    "name": "Text",
                    "value": "\"Reset\u21bb\""
                  },
                  {
                    "name": "OnClick",
                    "value": "_reset()"
                  },
                  {
                    "name": "Font",
                    "value": "fontb"
                  }
                ]
              }
            ]
          },
          {
            "Name": "panel3",
            "Type": "Panel",
            "Expanded": "false",
            "Properties": [
              {
                "name": "Width",
                "value": "\"100%\""
              },
              {
                "name": "Font",
                "value": "font"
              },
              {
                "name": "Display",
                "value": "print?\"none\":\"inline-flex\""
              }
            ],
            "Children": [
              {
                "Name": "panel_2",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"red\""
                  }
                ],
                "Children": [
                  {
                    "Name": "label3222",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"Red\""
                      },
                      {
                        "name": "Text",
                        "value": "\" period = \""
                      },
                      {
                        "name": "Display",
                        "value": "\"inline-block\""
                      }
                    ]
                  },
                  {
                    "Name": "field2222",
                    "Type": "ParsedField",
                    "Properties": [
                      {
                        "name": "Format",
                        "value": "\"0.0\""
                      },
                      {
                        "name": "Value",
                        "value": "T"
                      },
                      {
                        "name": "OnChange",
                        "value": "%_initialize%"
                      },
                      {
                        "name": "Width",
                        "value": "\"5vw\""
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "label22222",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"Red\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"second\""
                      },
                      {
                        "name": "Text",
                        "value": "\" s \""
                      },
                      {
                        "name": "Width",
                        "value": "(_isEPub)?\"0\":\"\""
                      }
                    ]
                  },
                  {
                    "Name": "slider2222",
                    "Type": "Slider",
                    "Properties": [
                      {
                        "name": "Maximum",
                        "value": "2"
                      },
                      {
                        "name": "Minimum",
                        "value": "1"
                      },
                      {
                        "name": "Background",
                        "value": "\"Red\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Period\""
                      },
                      {
                        "name": "Value",
                        "value": "T"
                      },
                      {
                        "name": "OnChange",
                        "value": "%_initialize%"
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "panel_3",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"Magenta\""
                  }
                ],
                "Children": [
                  {
                    "Name": "label322",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"Magenta\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Source velocity\""
                      },
                      {
                        "name": "Text",
                        "value": "\" v source=\""
                      }
                    ]
                  },
                  {
                    "Name": "field222",
                    "Type": "ParsedField",
                    "Properties": [
                      {
                        "name": "Format",
                        "value": "\"000\""
                      },
                      {
                        "name": "Value",
                        "value": "vx"
                      },
                      {
                        "name": "OnChange",
                        "value": "%_initialize%"
                      },
                      {
                        "name": "Width",
                        "value": "\"6vw\""
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "label2222",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"Magenta\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"metre per second\""
                      },
                      {
                        "name": "Text",
                        "value": "\" m/s \""
                      },
                      {
                        "name": "Width",
                        "value": "(_isEPub)?\"0\":\"\""
                      }
                    ]
                  },
                  {
                    "Name": "slider222",
                    "Type": "Slider",
                    "Properties": [
                      {
                        "name": "Maximum",
                        "value": "c"
                      },
                      {
                        "name": "Minimum",
                        "value": "-c"
                      },
                      {
                        "name": "Background",
                        "value": "\"Magenta\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Source velocity\""
                      },
                      {
                        "name": "Value",
                        "value": "vx"
                      },
                      {
                        "name": "OnChange",
                        "value": "%_initialize%"
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "panel_4",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"Green\""
                  }
                ],
                "Children": [
                  {
                    "Name": "label32",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"rgba(0,150,0,1.0)\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Sound speed\""
                      },
                      {
                        "name": "Foreground",
                        "value": "\"White\""
                      },
                      {
                        "name": "Text",
                        "value": "\" v observer = \""
                      }
                    ]
                  },
                  {
                    "Name": "field22",
                    "Type": "ParsedField",
                    "Properties": [
                      {
                        "name": "Format",
                        "value": "\"000\""
                      },
                      {
                        "name": "Value",
                        "value": "vxobserver"
                      },
                      {
                        "name": "OnChange",
                        "value": "%_initialize%"
                      },
                      {
                        "name": "Width",
                        "value": "\"5vw\""
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "label222",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"rgba(0,150,0,1.0)\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"metre per second\""
                      },
                      {
                        "name": "Foreground",
                        "value": "\"White\""
                      },
                      {
                        "name": "Text",
                        "value": "\" m/s \""
                      },
                      {
                        "name": "Width",
                        "value": "(_isEPub)?\"0\":\"\""
                      }
                    ]
                  },
                  {
                    "Name": "slider22",
                    "Type": "Slider",
                    "Properties": [
                      {
                        "name": "Maximum",
                        "value": "c"
                      },
                      {
                        "name": "Minimum",
                        "value": "-c"
                      },
                      {
                        "name": "Background",
                        "value": "\"rgba(0,150,0,1.0)\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"x component of the detector velocity\""
                      },
                      {
                        "name": "Value",
                        "value": "vxobserver"
                      },
                      {
                        "name": "OnChange",
                        "value": "%_initialize%"
                      },
                      {
                        "name": "Foreground",
                        "value": "\"White\""
                      },
                      {
                        "name": "Width",
                        "value": "(_isEPub)?\"0\":\"\""
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "panel_5",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"Magenta\""
                  }
                ],
                "Children": [
                  {
                    "Name": "label3",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"Magenta\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Sound speed\""
                      },
                      {
                        "name": "Text",
                        "value": "\" c = \""
                      }
                    ]
                  },
                  {
                    "Name": "field2",
                    "Type": "ParsedField",
                    "Properties": [
                      {
                        "name": "Format",
                        "value": "\"000\""
                      },
                      {
                        "name": "Value",
                        "value": "v0"
                      },
                      {
                        "name": "OnChange",
                        "value": "%_initialize%"
                      },
                      {
                        "name": "Width",
                        "value": "\"5vw\""
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "label22",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"Magenta\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"metre per second\""
                      },
                      {
                        "name": "Text",
                        "value": "\" m/s \""
                      },
                      {
                        "name": "Width",
                        "value": "(_isEPub)?\"0\":\"\""
                      }
                    ]
                  },
                  {
                    "Name": "slider2",
                    "Type": "Slider",
                    "Properties": [
                      {
                        "name": "Maximum",
                        "value": "340"
                      },
                      {
                        "name": "Minimum",
                        "value": "0"
                      },
                      {
                        "name": "Background",
                        "value": "\"Magenta\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Sound speed\""
                      },
                      {
                        "name": "Value",
                        "value": "v0"
                      },
                      {
                        "name": "OnChange",
                        "value": "%_initialize%"
                      },
                      {
                        "name": "Width",
                        "value": "(_isEPub)?\"0\":\"\""
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "Name": "panel2",
            "Type": "Panel",
            "Expanded": "true",
            "Properties": [
              {
                "name": "Height",
                "value": "\"80vh\""
              },
              {
                "name": "Width",
                "value": "\"100%\""
              }
            ],
            "Children": [
              {
                "Name": "plottingPanel",
                "Type": "PlottingPanel",
                "Expanded": "false",
                "Properties": [
                  {
                    "name": "Gutters",
                    "value": "[0,0,0,0]"
                  },
                  {
                    "name": "YScalePrecision",
                    "value": "0"
                  },
                  {
                    "name": "XFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "OnDoubleClick",
                    "value": "toggleFullScreen();"
                  },
                  {
                    "name": "YFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "TRMessage",
                    "value": "print?\"\":\"Doppler Effect Model in 1 Dimension\""
                  },
                  {
                    "name": "XTickStep",
                    "value": "vx==0?v0:vx"
                  },
                  {
                    "name": "YTickStep",
                    "value": "vx==0?v0:vx"
                  },
                  {
                    "name": "XAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "Height",
                    "value": "\"80vh\""
                  },
                  {
                    "name": "Width",
                    "value": "Width1"
                  },
                  {
                    "name": "Background",
                    "value": "\"url(#mygrandient)\""
                  },
                  {
                    "name": "Enabled",
                    "value": "true"
                  },
                  {
                    "name": "SquareAspect",
                    "value": "true"
                  },
                  {
                    "name": "MaximumY",
                    "value": "ymax"
                  },
                  {
                    "name": "MaximumX",
                    "value": "xmax"
                  },
                  {
                    "name": "YAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "MinimumX",
                    "value": "xmin"
                  },
                  {
                    "name": "MinimumY",
                    "value": "ymin"
                  },
                  {
                    "name": "AxisXFont",
                    "value": "\"normal normal 1vw\""
                  },
                  {
                    "name": "AutoScaleY",
                    "value": "false"
                  },
                  {
                    "name": "AutoScaleX",
                    "value": "false"
                  },
                  {
                    "name": "Visibility",
                    "value": "world"
                  },
                  {
                    "name": "XScalePrecision",
                    "value": "0"
                  },
                  {
                    "name": "BRMessage",
                    "value": "print?\"\":text"
                  }
                ],
                "Children": [
                  {
                    "Name": "source",
                    "Type": "Shape2D",
                    "Properties": [
                      {
                        "name": "FillColor",
                        "value": "\"Red\""
                      },
                      {
                        "name": "SizeX",
                        "value": "20"
                      },
                      {
                        "name": "ShapeType",
                        "value": "\"WHEEL\""
                      },
                      {
                        "name": "X",
                        "value": "x"
                      },
                      {
                        "name": "Y",
                        "value": "y"
                      },
                      {
                        "name": "SizeY",
                        "value": "20"
                      },
                      {
                        "name": "PixelSize",
                        "value": "true"
                      },
                      {
                        "name": "EnabledPosition",
                        "value": "\"ENABLED_ANY\""
                      }
                    ]
                  },
                  {
                    "Name": "vdrag",
                    "Type": "Group2D",
                    "Expanded": "false",
                    "Properties": [
                      {
                        "name": "X",
                        "value": "x"
                      },
                      {
                        "name": "Y",
                        "value": "y"
                      },
                      {
                        "name": "Visibility",
                        "value": "_isPaused"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "varrow",
                        "Type": "Arrow2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "vx"
                          },
                          {
                            "name": "MarkEndHeight",
                            "value": "20"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"Magenta\""
                          },
                          {
                            "name": "SizeY",
                            "value": "vy"
                          },
                          {
                            "name": "MarkEndWidth",
                            "value": "20"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          },
                          {
                            "name": "OnDrag",
                            "value": "vy = 0;\ntimemax=(xmax-xmin)/vx;\n"
                          },
                          {
                            "name": "Offset",
                            "value": "\"SOUTH_WEST\""
                          }
                        ]
                      },
                      {
                        "Name": "vdragbtn",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "15"
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"WHEEL\""
                          },
                          {
                            "name": "X",
                            "value": "vx"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"Magenta\""
                          },
                          {
                            "name": "PixelSize",
                            "value": "true"
                          },
                          {
                            "name": "SizeY",
                            "value": "15"
                          },
                          {
                            "name": "DrawFill",
                            "value": "false"
                          },
                          {
                            "name": "OnDrag",
                            "value": "vy = 0;\ntimemax=(xmax-xmin)/vx;\n"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_X\""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "image",
                    "Type": "Image2D",
                    "Properties": [
                      {
                        "name": "SizeX",
                        "value": "20"
                      },
                      {
                        "name": "X",
                        "value": "xe"
                      },
                      {
                        "name": "Y",
                        "value": "ye"
                      },
                      {
                        "name": "ImageUrl",
                        "value": "\"./doppler/ear.gif\""
                      },
                      {
                        "name": "Visibility",
                        "value": "observershow"
                      },
                      {
                        "name": "SizeY",
                        "value": "20"
                      },
                      {
                        "name": "PixelSize",
                        "value": "true"
                      },
                      {
                        "name": "EnabledPosition",
                        "value": "\"ENABLED_X\""
                      }
                    ]
                  },
                  {
                    "Name": "obsvdrag",
                    "Type": "Group2D",
                    "Expanded": "false",
                    "Properties": [
                      {
                        "name": "X",
                        "value": "xe"
                      },
                      {
                        "name": "Y",
                        "value": "ye"
                      },
                      {
                        "name": "Visibility",
                        "value": "observershow"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "whatdoesthisdo",
                        "Type": "Group2D",
                        "Expanded": "false",
                        "Properties": [
                          {
                            "name": "Visibility",
                            "value": "false"
                          }
                        ],
                        "Children": [
                          {
                            "Name": "observer",
                            "Type": "Shape2D",
                            "Properties": [
                              {
                                "name": "FillColor",
                                "value": "\"Blue\""
                              },
                              {
                                "name": "SizeX",
                                "value": "20"
                              },
                              {
                                "name": "ShapeType",
                                "value": "\"RECTANGLE\""
                              },
                              {
                                "name": "X",
                                "value": "xe"
                              },
                              {
                                "name": "Y",
                                "value": "ye"
                              },
                              {
                                "name": "SizeY",
                                "value": "20"
                              },
                              {
                                "name": "PixelSize",
                                "value": "true"
                              },
                              {
                                "name": "EnabledPosition",
                                "value": "\"ENABLED_X\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "Name": "obsvvarrow",
                        "Type": "Arrow2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "vxobserver"
                          },
                          {
                            "name": "MarkEndHeight",
                            "value": "20"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"rgba(0,150,0,1.0)\""
                          },
                          {
                            "name": "SizeY",
                            "value": "vy"
                          },
                          {
                            "name": "MarkEndWidth",
                            "value": "20"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          },
                          {
                            "name": "OnDrag",
                            "value": "vy = 0;\ntimemax=(xmax-xmin)/vx;\n"
                          },
                          {
                            "name": "Offset",
                            "value": "\"SOUTH_WEST\""
                          }
                        ]
                      },
                      {
                        "Name": "obsvvdragbtn",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "15"
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"WHEEL\""
                          },
                          {
                            "name": "X",
                            "value": "vxobserver"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"rgba(0,150,0,1.0)\""
                          },
                          {
                            "name": "PixelSize",
                            "value": "true"
                          },
                          {
                            "name": "SizeY",
                            "value": "15"
                          },
                          {
                            "name": "DrawFill",
                            "value": "false"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_X\""
                          },
                          {
                            "name": "OnDrag",
                            "value": "vy = 0;\n_initialize();\n"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "wavesfront",
                    "Type": "ShapeSet2D",
                    "Properties": [
                      {
                        "name": "NumberOfElements",
                        "value": "n"
                      },
                      {
                        "name": "FillColor",
                        "value": "\"rgba(255,255,255,0.0)\""
                      },
                      {
                        "name": "SizeX",
                        "value": "D"
                      },
                      {
                        "name": "ShapeType",
                        "value": "\"ELLIPSE\""
                      },
                      {
                        "name": "X",
                        "value": "xs"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Blue\""
                      },
                      {
                        "name": "Y",
                        "value": "ys"
                      },
                      {
                        "name": "SizeY",
                        "value": "D"
                      },
                      {
                        "name": "LineWidth",
                        "value": "2"
                      }
                    ]
                  },
                  {
                    "Name": "wavemeetobserver",
                    "Type": "Shape2D",
                    "Properties": [
                      {
                        "name": "FillColor",
                        "value": "\"rgba(255,255,255,0.0)\""
                      },
                      {
                        "name": "SizeX",
                        "value": "D[eid]"
                      },
                      {
                        "name": "ShapeType",
                        "value": "\"ELLIPSE\""
                      },
                      {
                        "name": "X",
                        "value": "xs[eid]"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Green\""
                      },
                      {
                        "name": "Y",
                        "value": "ys[eid]"
                      },
                      {
                        "name": "Visibility",
                        "value": "vs<v0"
                      },
                      {
                        "name": "SizeY",
                        "value": "D[eid]"
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "plottingPanel2",
                "Type": "PlottingPanel",
                "Expanded": "false",
                "Properties": [
                  {
                    "name": "Gutters",
                    "value": "[50,0,0,0]"
                  },
                  {
                    "name": "YScalePrecision",
                    "value": "0"
                  },
                  {
                    "name": "XFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "OnDoubleClick",
                    "value": "toggleFullScreen();"
                  },
                  {
                    "name": "YFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "TRMessage",
                    "value": "print?\"\":\"Emissions and detections\""
                  },
                  {
                    "name": "XTickStep",
                    "value": "1"
                  },
                  {
                    "name": "XAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "Height",
                    "value": "\"80vh\""
                  },
                  {
                    "name": "Width",
                    "value": "Width2"
                  },
                  {
                    "name": "TLMessage",
                    "value": "print?\"\":\"count= \"+_view._format(count,\"0\")+\", f = \"+_view._format(frequencyemitted,\"0.00\")+ \" Hz\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Times at which emissions and detections happen\""
                  },
                  {
                    "name": "Enabled",
                    "value": "true"
                  },
                  {
                    "name": "MaximumY",
                    "value": "1"
                  },
                  {
                    "name": "MaximumX",
                    "value": "13"
                  },
                  {
                    "name": "YAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "GridYShow",
                    "value": "false"
                  },
                  {
                    "name": "MinimumX",
                    "value": "0"
                  },
                  {
                    "name": "MinimumY",
                    "value": "-1"
                  },
                  {
                    "name": "AxisYShow",
                    "value": "false"
                  },
                  {
                    "name": "AxisXFont",
                    "value": "\"normal normal 1vw\""
                  },
                  {
                    "name": "AutoScaleY",
                    "value": "true"
                  },
                  {
                    "name": "TitleX",
                    "value": "\"t\""
                  },
                  {
                    "name": "AutoScaleX",
                    "value": "true"
                  },
                  {
                    "name": "Visibility",
                    "value": "graph"
                  },
                  {
                    "name": "XScalePrecision",
                    "value": "0"
                  },
                  {
                    "name": "BRMessage",
                    "value": "print?\"\":\"count number of waves detected= \"+_view._format(eid,\"0\")+\", f' = \"+_view._format(frequencydetected,\"0.00\")+ \" Hz\""
                  }
                ],
                "Children": [
                  {
                    "Name": "temmited",
                    "Type": "SegmentSet2D",
                    "Properties": [
                      {
                        "name": "NumberOfElements",
                        "value": "n"
                      },
                      {
                        "name": "SizeX",
                        "value": "0"
                      },
                      {
                        "name": "X",
                        "value": "tEmitted"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"RED\""
                      },
                      {
                        "name": "Y",
                        "value": "0"
                      },
                      {
                        "name": "SizeY",
                        "value": "1"
                      },
                      {
                        "name": "LineWidth",
                        "value": "3"
                      }
                    ]
                  },
                  {
                    "Name": "tdetected",
                    "Type": "SegmentSet2D",
                    "Properties": [
                      {
                        "name": "NumberOfElements",
                        "value": "n"
                      },
                      {
                        "name": "SizeX",
                        "value": "0"
                      },
                      {
                        "name": "X",
                        "value": "tDetected"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Green\""
                      },
                      {
                        "name": "Y",
                        "value": "0"
                      },
                      {
                        "name": "SizeY",
                        "value": "-1"
                      },
                      {
                        "name": "LineWidth",
                        "value": "3"
                      }
                    ]
                  },
                  {
                    "Name": "time",
                    "Type": "Arrow2D",
                    "Properties": [
                      {
                        "name": "SizeX",
                        "value": "t"
                      },
                      {
                        "name": "X",
                        "value": "0"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Black\""
                      },
                      {
                        "name": "Y",
                        "value": "0"
                      },
                      {
                        "name": "SizeY",
                        "value": "0"
                      },
                      {
                        "name": "LineWidth",
                        "value": "3"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "Name": "html",
            "Type": "Panel",
            "Properties": [
              {
                "name": "Html",
                "value": "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/FkiyZ5f2CuU?si=xR605hnVqWl7D35R\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen></iframe>\n<div class=\"simulation-description\">\n  <h2>Doppler Effect Sound Wave JavaScript Applet</h2>\n\n  <p>\n    This simulation allows students to explore the Doppler effect for sound waves.\n    It shows how the observed frequency and wavelength change when a sound source\n    and/or observer moves relative to each other.\n  </p>\n\n  <p>\n    When the source moves towards the observer, the wavefronts are compressed and\n    a higher frequency is heard. When the source moves away, the wavefronts are\n    spread out and a lower frequency is heard.\n  </p>\n\n  <h3>Suggested Learning Activities</h3>\n  <ul>\n    <li>Observe how the wavefronts change when the source is moving.</li>\n    <li>Compare the sound heard in front of and behind the moving source.</li>\n    <li>Explain why an ambulance siren sounds higher-pitched as it approaches and lower-pitched as it moves away.</li>\n    <li>Investigate how changing the speed of the source affects the Doppler effect.</li>\n  </ul>\n\n  <h3>Credits</h3>\n  <p>\n    Original model by Fu-Kwun Hwang, remixed by lookang.\n    Compiled with WebEJS. Released under a Creative Commons Attribution licence.\n  </p>\n</div>\n\n<style>\n.simulation-description {\n  max-width: 900px;\n  margin: 24px auto;\n  padding: 20px;\n  font-family: Arial, sans-serif;\n  line-height: 1.6;\n  font-size: 16px;\n  color: #222;\n  background: #f8f9fa;\n  border-radius: 12px;\n  border: 1px solid #ddd;\n}\n\n.simulation-description h2 {\n  margin-top: 0;\n  color: #1f4e79;\n}\n\n.simulation-description h3 {\n  margin-top: 20px;\n  color: #333;\n}\n\n.simulation-description ul {\n  padding-left: 22px;\n}\n</style>"
              }
            ]
          }
        ]
      }
    ],
    "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/"
  }
}