{
  "information": {
    "Title": "Block and Spring on an Inclined Plane",
    "Author": [
      "Wolfgang Christian, remixed by lookang (weelookang@gmail.com)  for simple harmonic motion",
      "lookang"
    ],
    "AuthorLogo": [
      "./BlockAndSpringOnInclinedPlane/01authorwc_icon.png",
      "./BlockAndSpringOnInclinedPlane/1authorlookangphoto.png"
    ],
    "Password": "",
    "Keywords": "Newton's laws, friction",
    "Abstract": "",
    "Copyright": "",
    "Level": "Beginner",
    "Language": "English",
    "Logo": [
      "./BlockAndSpringOnInclinedPlane/block_2013-12-20_1506320by180.png"
    ],
    "RunAlways": "true",
    "ModelTab": "",
    "ModelTabTitle": "",
    "ModelName": "",
    "FixedNavigationBar": "false",
    "CSSFile": "",
    "DetectedFiles": [
      "./BlockAndSpringOnInclinedPlane/01authorwc_icon.png",
      "./BlockAndSpringOnInclinedPlane/1authorlookangphoto.png",
      "./BlockAndSpringOnInclinedPlane/BlockAndSpringOnInclinedPlane.html",
      "./BlockAndSpringOnInclinedPlane/block_2013-12-20_1506320by180.png",
      "./BlockAndSpringOnInclinedPlane/block_on_incline.jpg",
      "./BlockAndSpringOnInclinedPlane/newton_law_eqn.gif",
      "./BlockAndSpringOnInclinedPlane/static_friction_eqn.gif"
    ],
    "AuxiliaryFiles": [
      "./BlockAndSpringOnInclinedPlane/"
    ],
    "HTMLHead": "<script async=\"true\" src=\"https://www.googletagmanager.com/gtag/js?id=UA-3326007-19\"></script>\n<script>\n  window.dataLayer = window.dataLayer || [];\n  function gtag(){dataLayer.push(arguments);}\n  gtag('js', new Date());\n  gtag('config', 'UA-3326007-19');\n</script>\n<script data-ad-client=\"ca-pub-0121577198857509\" async=\"true\" src=\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\"></script>\n<script>\n  function toggleAnswer(id) {\n    var box = document.getElementById(id);\n    if (box.style.display === \"block\") {\n      box.style.display = \"none\";\n    } else {\n      box.style.display = \"block\";\n    }\n  }\n</script>",
    "SaveInXMLFormat": "false",
    "IncludeSource": "true",
    "IncludeLibrary": "true",
    "UglifyJS": "false",
    "PreviewFullModel": "false",
    "UseInterpreter": "true",
    "UseDeltaForODE": "false"
  },
  "description": {
    "pages": [
      {
        "Name": "About",
        "Active": "true",
        "Internal": "false",
        "Type": "DESCRIPTION_EDITOR",
        "Locale": "_default_",
        "Title": "About",
        "External": "false",
        "Code": "<html>\n<head></head>\n<body>\n<h2>Topics</h2><p>Forces on an inclined plane, Hooke's law, static friction, kinetic friction, and oscillatory motion.</p><h2>Description</h2><p>This simulation shows a block attached to a spring on an inclined plane. Students can vary the initial velocity, angle, spring constant, length of the incline, and both the static and kinetic coefficients of friction to investigate when the block remains at rest, when it begins to slip, and when it oscillates.</p><h2>Sample Learning Goals</h2><ol><li>Explain why the block can remain at rest even when gravity and the spring both act along the slope.</li><li>Predict when slipping begins by comparing the parallel driving force with the maximum static friction.</li><li>Relate the motion graphs to the changing force on the block.</li><li>Describe how changing angle, friction, and spring constant affects the motion.</li></ol><h2>Suggested Activities</h2><ol><li>Set the block at rest and increase the angle slowly. Predict the moment when the block will start to slip.</li><li>Keep the angle fixed and increase the static friction. Explain why the block can remain stationary.</li><li>Set friction close to zero and displace the block. Observe when the motion looks closest to oscillation.</li><li>Turn on the graphs and connect the world view to the force, displacement, and velocity plots.</li></ol><h2>Version</h2><ol><li><a href=\"http://weelookang.blogspot.sg/2013/12/sliding-block-and-spring-model-by.html\">Original blog post and credits</a></li></ol>\n</body>\n</html>"
      },
      {
        "Name": "ForTeacher",
        "Active": "true",
        "Internal": "false",
        "Type": "DESCRIPTION_EDITOR",
        "Locale": "_default_",
        "Title": "ForTeacher",
        "External": "false",
        "Code": "<html>\n<head></head>\n<body>\n<h2>Teacher Notes</h2><p>A productive question for this model is: <strong>What must be true for the block to stay at rest?</strong></p><p>Encourage students to compare two quantities:</p><ol><li><strong>The parallel driving force</strong>: the combined effect of the spring force and the component of weight along the slope.</li><li><strong>The maximum static friction</strong>: the largest frictional force available before slipping begins.</li></ol><p>If the parallel driving force is smaller than or equal to the maximum static friction, the block can stay at rest. If it is larger, the block must slip.</p><p>Suggested sequence: prediction, run, observe, and explain. Ask students to justify each case with both the animation and the force comparison message.</p>\n</body>\n</html>"
      },
      {
        "Name": "Intro Page",
        "Active": "true",
        "Internal": "false",
        "Type": "DESCRIPTION_EDITOR",
        "Locale": "_default_",
        "Title": "Intro Page",
        "External": "false",
        "Code": "<html>\n<head></head>\n<body>\n<p><strong>Try this first:</strong> predict whether the block will stay at rest, slip, or oscillate before you press play.</p><p>Then compare:</p><ol><li>the live motion status in the top-right corner, and</li><li>the force comparison message in the bottom-left corner.</li></ol><p><a href=\"http://weelookang.blogspot.sg/2013/12/sliding-block-and-spring-model-by.html\">Original blog post and credits</a></p><h3>Video Tutorial</h3><p>The lesson video below can be embedded when this model is recompiled in WebEJS.</p><div class=\"se-component se-video-container __se__float-none\" contenteditable=\"false\" style=\"width: 100%;\"><figure style=\"width: 100%; height: 56.25%; padding-bottom: 56.25%; margin: 0px;\"><iframe src=\"https://www.youtube.com/embed/jtg_xXuKuqQ?si=m3a45mhR3aI_0vVc\" frameborder=\"0\" allowfullscreen=\"\" data-percentage=\"100%,56.25%\" data-size=\"100%,56.25%\" data-align=\"none\" data-index=\"0\" data-file-name=\"jtg_xXuKuqQ?si=m3a45mhR3aI_0vVc\" data-file-size=\"0\" data-origin=\"100%,56.25%\" style=\"width: 100%; height: 100%; pointer-events: auto;\"></iframe></figure></div>\n</body>\n</html>"
      },
      {
        "Name": "Block and Spring on an Incline Plane",
        "Active": "true",
        "Internal": "false",
        "Type": "DESCRIPTION_EDITOR",
        "Locale": "_default_",
        "Title": "Block and Spring on an Incline Plane",
        "External": "true",
        "Code": "./BlockAndSpringOnInclinedPlane/BlockAndSpringOnInclinedPlane.html"
      }
    ]
  },
  "model": {
    "variables": {
      "pages": [
        {
          "Name": "Drawing Vars",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "",
              "Value": "",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "fontb",
              "Value": "\"normal bold 1vw \"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "font",
              "Value": "\"normal normal 1vw \"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "motionDone",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "bounce",
              "Value": "",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "L",
              "Value": "1.0",
              "Type": "double",
              "Dimension": "",
              "Comment": "length of the inclined surface",
              "Domain": "public"
            },
            {
              "Name": "Ldrag",
              "Value": "L",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "angle",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "angle of the plane",
              "Domain": "public"
            },
            {
              "Name": "angleDegrees",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "bumperX",
              "Value": "L",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "bumperY",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "blockSize",
              "Value": "0.15*L",
              "Type": "double",
              "Dimension": "",
              "Comment": "size of the block",
              "Domain": "public"
            },
            {
              "Name": "mass",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "mass of the block",
              "Domain": "public"
            },
            {
              "Name": "initX",
              "Value": "0.1",
              "Type": "double",
              "Dimension": "",
              "Comment": "initial distance to the bottom-right corner (L/2-blockSize/2)",
              "Domain": "public"
            },
            {
              "Name": "minX",
              "Value": "-blockSize/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "smallest allowed value of x",
              "Domain": "public"
            },
            {
              "Name": "maxX",
              "Value": "L+blockSize/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "largest allowed value of x",
              "Domain": "public"
            },
            {
              "Name": "trMessage",
              "Value": "\"Predict first: will the block stay at rest, slip, or oscillate? Then drag the block or the top of incline and click play.\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "showGraphX",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "showGraphV",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "showGraphF",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "Constants",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "slippingMsg",
              "Value": "\"At rest: static friction balances the spring and weight components\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "forceBalanceText",
              "Value": "\"Compare |F_parallel| with max static friction to predict whether slipping begins.\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "direction",
              "Value": "",
              "Type": "int",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "m",
              "Value": "0.1",
              "Type": "double",
              "Dimension": "",
              "Comment": "mass",
              "Domain": "public"
            },
            {
              "Name": "g",
              "Value": "9.8",
              "Type": "double",
              "Dimension": "",
              "Comment": "acceleration of gravity in m/s^2",
              "Domain": "public"
            },
            {
              "Name": "k",
              "Value": "10",
              "Type": "double",
              "Dimension": "",
              "Comment": "spring constant in N/m",
              "Domain": "public"
            },
            {
              "Name": "muKinetic",
              "Value": "0.00",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "muStatic",
              "Value": "0.00",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "muKdrag",
              "Value": "muKinetic/10",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "muSdrag",
              "Value": "muStatic/10",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "kdrag",
              "Value": "k/20",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "Dynamical Vars",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "t",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "time",
              "Domain": "public"
            },
            {
              "Name": "ttext",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "dt",
              "Value": "0.02",
              "Type": "double",
              "Dimension": "",
              "Comment": "increment of time",
              "Domain": "public"
            },
            {
              "Name": "x",
              "Value": "initX",
              "Type": "double",
              "Dimension": "",
              "Comment": "x position of the cart along incline",
              "Domain": "public"
            },
            {
              "Name": "y",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "",
              "Comment": "y position of the cart (constant)",
              "Domain": "public"
            },
            {
              "Name": "v",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "",
              "Comment": "x velocity of the cart",
              "Domain": "public"
            },
            {
              "Name": "vdrag",
              "Value": "v/10",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "tol",
              "Value": "1.0E-9",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "Vector Vars",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "showVectors",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "arrowScale",
              "Value": "0.2",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "frictionForce",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "springForce",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "netForce",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "weightX",
              "Value": "-m*g*Math.sin(angle)",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "weightY",
              "Value": "-m*g*Math.cos(angle)",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "layout",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "text",
              "Value": "\"select the different position of RED and Blue dots and click play\"",
              "Type": "String",
              "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": "Width3",
              "Value": "\"0%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "Width4",
              "Value": "\"0%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "Height1",
              "Value": "\"15\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "graph",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "world",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "disabledworld",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "disabled",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "datashow",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "datashow2",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            }
          ]
        }
      ]
    },
    "initialization": {
      "pages": [
        {
          "Name": "Check Intial Direction",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "checkDirection();\ntrMessage=\"Predict first: will the block stay at rest, slip, or oscillate? Then drag the block or the top of incline and click play.\";\n\nangleDegrees = Math.degrees(angle);\nupdatePedagogy();\n"
        }
      ]
    },
    "evolution": {
      "information": {
        "FPS": "10",
        "SPD": "1",
        "RealTimeVariable": "",
        "Autoplay": "false"
      },
      "pages": [
        {
          "Name": "Evolution",
          "Active": "true",
          "Internal": "false",
          "Type": "ODE_EDITOR",
          "Comment": "equations of motion;  acceleration ax is computed in a preliminary code page",
          "IndependentVariable": "t",
          "Increment": "dt",
          "Equations": [
            {
              "state": "x",
              "rate": "v"
            },
            {
              "state": "v",
              "rate": "ax"
            }
          ],
          "Method": "RungeKuttaFehlberg",
          "AbsoluteTolerance": "tol",
          "PreliminaryCode": {
            "Code": "var ax=0;\nif(direction!=0){\n  var as=-k*(x-L/2)/m;        // acceleration due to spring\n  var gx=-g*Math.sin(angle);  // x-component of g\n  var gy=-g*Math.cos(angle);  // y-component of g\n  var friction=-direction*muKinetic*gy;\n  ax=gx+as+friction;\n}",
            "Comment": ""
          },
          "EventMaximumStep": "",
          "Events": {
            "pages": [
              {
                "Type": "EVENT_EDITOR",
                "Name": "Bottom bounce",
                "Active": "true",
                "Internal": "false",
                "EventType": "STATE_EVENT",
                "Method": "SECANT",
                "Iterations": "100",
                "Tolerance": "tol",
                "StopAtEvent": "true",
                "ZeroCondition": "if(v>=0) return 1;  // block is moving up the incline and away from bottom bumper\nreturn x-blockSize/2;//  positive if block is above bumper",
                "Action": "v=Math.abs(v);//  block moves up incline\nif(!bounce){\n  _pause();  \n  motionDone=true;\n  slippingMsg = \"Hit bumper at: \"+_format(t,\"0.00\")+\" s.\";\n}\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "Top bounce",
                "Active": "true",
                "Internal": "false",
                "EventType": "STATE_EVENT",
                "Method": "SECANT",
                "Iterations": "100",
                "Tolerance": "tol",
                "StopAtEvent": "true",
                "ZeroCondition": "if(v<=0) return 1;     // block is moving down the incline and away from top bumper\nreturn L-blockSize/2-x; //  positive if block is below top bumper",
                "Action": "v=-Math.abs(v);//  block moves down incline\nif(!bounce){\n  _pause(); \n  motionDone=true;\n  slippingMsg = \"Hit bumper at: \"+_format(t,\"0.00\")+\" s.\";\n}\n",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "Stop slipping",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "tol",
                "StopAtEvent": "true",
                "ZeroCondition": "return v;\n",
                "Action": "v=0;  // need exact zero before checking direction\ncheckDirection();",
                "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": [
              {
                "Type": "ERROR_EDITOR",
                "Name": "Error handling code",
                "Active": "true",
                "Internal": "false",
                "Code": "",
                "Comment": "",
                "ErrorType": "ANY_ERROR"
              }
            ]
          }
        }
      ]
    },
    "fixed_relations": {
      "pages": [
        {
          "Name": "Compute forces",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "springForce=-k*(x-L/2);\nweightX=-m*g*Math.sin(angle);\nweightY=-m*g*Math.cos(angle);\nif(direction===0) {\n  // not slipping so friction is equal and opposite to spring and gravitation force\n  frictionForce=-weightX-springForce;\n  netForce=0;\n} else {\n  // use kinetic coefficient when slipping\n  frictionForce=-direction*muKinetic*weightY;\n  netForce=weightX+springForce+frictionForce;\n}\nupdatePedagogy();\n\nttext= \" t = \" + _view._format(t,\"0.00\") + \" s \";"
        }
      ]
    },
    "custom": {
      "pages": [
        {
          "Name": "Check for slipping",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// check direction of friction force\nfunction checkDirection() {\n  motionDone= x<minX || x>maxX;\n  \n  if(v>0) direction=-1; // bug removed by lookang\n  else if (v<0) direction =1; // bug removed by lookang\n  \n  //if (v==0) {  // check for static friction\n  else {\n    springForce=-k*(x-L/2);\n    weightX=-m*g*Math.sin(angle);\n    weightY=-m*g*Math.cos(angle);\n    if(Math.abs(weightX+springForce)>Math.abs(muStatic*weightY)) {  // sliding condition\n      direction=(weightX+springForce>0)?-1:1;\n      frictionForce=Math.sign(v)*muKinetic*weightY;\n      //_println(\"slipping friction=\"+frictionForce);\n    } else {\n      frictionForce=-weightX-springForce;\n      direction=0;  // static friction\n      //_println(\"not slipping friction=\"+frictionForce);\n    }\n  }\n  updatePedagogy();\n}\n\nfunction updatePedagogy() {\n  var parallelForce = Math.abs(weightX+springForce);\n  var maxStatic = Math.abs(muStatic*weightY);\n  trMessage = \"Predict first: will the block stay at rest, slip, or oscillate? Then drag the block or the top of incline and click play.\";\n  if(direction===0) {\n    slippingMsg = \"At rest: static friction balances the spring and weight components\";\n  } else if (Math.abs(muKinetic)<1.0e-6 && Math.abs(muStatic)<1.0e-6) {\n    slippingMsg = \"Sliding: with almost no friction, gravity and the spring set the motion\";\n  } else {\n    slippingMsg = \"Sliding: the parallel driving force is larger than the maximum static friction\";\n  }\n  forceBalanceText = \"|F_parallel| = \"+parallelForce.toFixed(2)+\" N, max static = \"+maxStatic.toFixed(2)+\" N\";\n}"
        },
        {
          "Name": "Check for slipping 2",
          "Active": "false",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// check direction of friction force\nfunction checkDirection() {\n  trMessage=null;\n  motionDone= x<minX || x>maxX;\n  if(v>0) direction=1;\n  else if (v<0) direction =-1;\n  else {  // check for static friction\n    springForce=-k*(x-L/2);\n    weightX=-m*g*Math.sin(angle);\n    weightY=-m*g*Math.cos(angle);\n    if(Math.abs(weightX+springForce)>Math.abs(muStatic*weightY)) {  // sliding condition\n      direction=(weightX+springForce>0)?-1:1;\n      frictionForce=Math.signum(v)*muKinetic*weightY;\n      slippingMsg=\"slipping\";\n      //_println(\"slipping friction=\"+frictionForce);\n    } else {\n      frictionForce=-weightX-springForce;\n      direction=0;  // static friction\n      slippingMsg=\"not slipping\";\n      //_println(\"not slipping friction=\"+frictionForce);\n    }\n  }\n}"
        },
        {
          "Name": "alert",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function displayAlert() {\n/*  _alert(\"drawingPanel\",\"Warning\",\n         \"End of motion reached.\\n\"+\n         \"Please reset the simulation or drag the block\\n\"+\n         \"to a new position before starting the motion.\"); */\n}"
        },
        {
          "Name": "fullscreen",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "//https://developer.mozilla.org/en-US/docs/Web/Guide/API/DOM/Using_full_screen_mode\n// does not work for iOS \n/*jslint browser:true */\nfunction toggleFullScreen() {\n  if (!document.fullscreenElement &&    // alternative standard method\n      !document.mozFullScreenElement && !document.webkitFullscreenElement && !document.msFullscreenElement ) {  // current working methods\n    if (document.documentElement.requestFullscreen) {\n      document.documentElement.requestFullscreen();\n    } else if (document.documentElement.msRequestFullscreen) {\n      document.documentElement.msRequestFullscreen();\n    } else if (document.documentElement.mozRequestFullScreen) {\n      document.documentElement.mozRequestFullScreen();\n    } else if (document.documentElement.webkitRequestFullscreen) {\n      document.documentElement.webkitRequestFullscreen();\n    }\n  } else {\n    if (document.exitFullscreen) {\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": "MathsFn",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// Converts from degrees to radians.\nMath.radians = function(degrees) {\n  return degrees * Math.PI / 180;\n};\n \n// Converts from radians to degrees.\nMath.degrees = function(radians) {\n  return radians * 180 / Math.PI;\n};"
        }
      ]
    },
    "elements": {
      "list": []
    }
  },
  "view": {
    "Tree": [
      {
        "Name": "fullscreen",
        "Type": "Panel",
        "Expanded": "true",
        "Properties": [
          {
            "name": "Height",
            "value": "%Height%"
          },
          {
            "name": "Width",
            "value": "%Width%"
          }
        ],
        "Children": [
          {
            "Name": "controlPanel",
            "Type": "Panel",
            "Expanded": "false",
            "Properties": [
              {
                "name": "Width",
                "value": "%Width%"
              },
              {
                "name": "Display",
                "value": "\"inline-flex\""
              }
            ],
            "Children": [
              {
                "Name": "velocityLabel",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"MAGENTA\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Velocity\""
                  },
                  {
                    "name": "Text",
                    "value": "\"v = \""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "velocitySlider",
                "Type": "Slider",
                "Properties": [
                  {
                    "name": "Minimum",
                    "value": "-5"
                  },
                  {
                    "name": "Maximum",
                    "value": "5"
                  },
                  {
                    "name": "Background",
                    "value": "\"MAGENTA\""
                  },
                  {
                    "name": "Value",
                    "value": "v"
                  },
                  {
                    "name": "OnChange",
                    "value": "v=Math.max(-99,v);\nv=Math.min(v,99);\nvdrag = v/10;\ncheckDirection();"
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "velocityField",
                "Type": "ParsedField",
                "Properties": [
                  {
                    "name": "Format",
                    "value": "\"0.00\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Block velocity\""
                  },
                  {
                    "name": "Value",
                    "value": "v"
                  },
                  {
                    "name": "OnChange",
                    "value": "v=Math.max(-99,v);\nv=Math.min(v,99);\ncheckDirection();"
                  },
                  {
                    "name": "Width",
                    "value": "\"4vw\""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "velocityUnitLabel",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"MAGENTA\""
                  },
                  {
                    "name": "Text",
                    "value": "\"m/s\""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "muLabel",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"Yellow\""
                  },
                  {
                    "name": "Text",
                    "value": "\"\u03bcs = \""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "muSlider",
                "Type": "Slider",
                "Properties": [
                  {
                    "name": "Minimum",
                    "value": "0.0"
                  },
                  {
                    "name": "Maximum",
                    "value": "2"
                  },
                  {
                    "name": "Format",
                    "value": "\"0.00\""
                  },
                  {
                    "name": "Background",
                    "value": "\"Yellow\""
                  },
                  {
                    "name": "Value",
                    "value": "muStatic"
                  },
                  {
                    "name": "OnChange",
                    "value": "muStatic=Math.max(muStatic,muKinetic);  // static must be larger than kinetic\nmuStatic=Math.max(0,muStatic);\nmuStatic=Math.min(muStatic,2);\nmuSdrag =muStatic/20;\ncheckDirection();"
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "muField",
                "Type": "ParsedField",
                "Properties": [
                  {
                    "name": "Format",
                    "value": "\"0.00\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Static coefficient of friction.\""
                  },
                  {
                    "name": "Value",
                    "value": "muStatic"
                  },
                  {
                    "name": "OnChange",
                    "value": "muStatic=Math.max(muStatic,muKinetic);  // static must be larger than kinetic\nmuStatic=Math.max(0,muStatic);\nmuStatic=Math.min(muStatic,2);\ncheckDirection () ;"
                  },
                  {
                    "name": "Width",
                    "value": "\"4vw\""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "muKineticLabel",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"Yellow\""
                  },
                  {
                    "name": "Text",
                    "value": "\"\u03bck = \""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "muKineticSlider",
                "Type": "Slider",
                "Properties": [
                  {
                    "name": "Minimum",
                    "value": "0.0"
                  },
                  {
                    "name": "Maximum",
                    "value": "2"
                  },
                  {
                    "name": "Background",
                    "value": "\"Yellow\""
                  },
                  {
                    "name": "Value",
                    "value": "muKinetic"
                  },
                  {
                    "name": "OnChange",
                    "value": "muKinetic=Math.min(muStatic,muKinetic);  // kinetic cann be larger than static\nmuKinetic=Math.max(0,muKinetic);\nmuKinetic=Math.min(muKinetic,2);\nmuKdrag = muKinetic/20;\ncheckDirection();"
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "muKineticField",
                "Type": "ParsedField",
                "Properties": [
                  {
                    "name": "Format",
                    "value": "\"0.00\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Kinetic coefficient of friction.\""
                  },
                  {
                    "name": "Value",
                    "value": "muKinetic"
                  },
                  {
                    "name": "OnChange",
                    "value": "muKinetic=Math.min(muStatic,muKinetic);  // kinetic cann be larger than static\nmuKinetic=Math.max(0,muKinetic);\nmuKinetic=Math.min(muKinetic,2);\ncheckDirection();"
                  },
                  {
                    "name": "Width",
                    "value": "\"4vw\""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "thetaLabel",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"rgba(128,192,255,1)\""
                  },
                  {
                    "name": "Text",
                    "value": "\"\u03b8 = \""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "thetaSlider",
                "Type": "Slider",
                "Properties": [
                  {
                    "name": "Minimum",
                    "value": "0.0"
                  },
                  {
                    "name": "Maximum",
                    "value": "90"
                  },
                  {
                    "name": "Background",
                    "value": "\"rgba(128,192,255,1)\""
                  },
                  {
                    "name": "Value",
                    "value": "angleDegrees"
                  },
                  {
                    "name": "OnChange",
                    "value": "angleDegrees=Math.max(0,angleDegrees);\nangleDegrees=Math.min(angleDegrees,90);\nangle=Math.radians(angleDegrees);\ncheckDirection();"
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "thetaField",
                "Type": "ParsedField",
                "Properties": [
                  {
                    "name": "Format",
                    "value": "\"0.0\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Incline plane angle in degrees.\""
                  },
                  {
                    "name": "Value",
                    "value": "angleDegrees"
                  },
                  {
                    "name": "OnChange",
                    "value": "angleDegrees=Math.max(0,angleDegrees);\nangleDegrees=Math.min(angleDegrees,90);\nangle=Math.radians(angleDegrees);\ncheckDirection();"
                  },
                  {
                    "name": "Width",
                    "value": "\"4vw\""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "springConstantLabel",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"RED\""
                  },
                  {
                    "name": "Text",
                    "value": "\"k = \""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "springConstantSlider",
                "Type": "Slider",
                "Properties": [
                  {
                    "name": "Minimum",
                    "value": "0.0"
                  },
                  {
                    "name": "Maximum",
                    "value": "10.0"
                  },
                  {
                    "name": "Background",
                    "value": "\"RED\""
                  },
                  {
                    "name": "Value",
                    "value": "k"
                  },
                  {
                    "name": "OnChange",
                    "value": "k=Math.max(0,k);\nk=Math.min(k,10);\nkdrag = k/20;\ncheckDirection();"
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "springConstantField",
                "Type": "ParsedField",
                "Properties": [
                  {
                    "name": "Format",
                    "value": "\"0.00\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Spring constant in N/m.\""
                  },
                  {
                    "name": "Value",
                    "value": "k"
                  },
                  {
                    "name": "OnChange",
                    "value": "k=Math.max(0,k);\nk=Math.min(k,10);\ncheckDirection();"
                  },
                  {
                    "name": "Width",
                    "value": "\"4vw\""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "springConstantUnitLabel",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"RED\""
                  },
                  {
                    "name": "Text",
                    "value": "\"N/m\""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "lengthLabel",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"BLACK\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Length\""
                  },
                  {
                    "name": "Foreground",
                    "value": "\"WHITE\""
                  },
                  {
                    "name": "Text",
                    "value": "\"L = \""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "lengthSlider",
                "Type": "Slider",
                "Properties": [
                  {
                    "name": "Minimum",
                    "value": "0.5"
                  },
                  {
                    "name": "Maximum",
                    "value": "2"
                  },
                  {
                    "name": "Background",
                    "value": "\"BLACK\""
                  },
                  {
                    "name": "Value",
                    "value": "L"
                  },
                  {
                    "name": "Foreground",
                    "value": "\"WHITE\""
                  },
                  {
                    "name": "OnChange",
                    "value": "L=Math.max(0.1,L);\nL=Math.min(L,10);\nLdrag = L;\nbumperX=L;\n\ncheckDirection();"
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "lengthField",
                "Type": "ParsedField",
                "Properties": [
                  {
                    "name": "Format",
                    "value": "\"0.00\""
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Length of incline plane in meters.\""
                  },
                  {
                    "name": "Value",
                    "value": "L"
                  },
                  {
                    "name": "OnChange",
                    "value": "L=Math.max(0.1,L);\nL=Math.min(L,10);\nbumperX=L;\ncheckDirection();"
                  },
                  {
                    "name": "Width",
                    "value": "\"4vw\""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "lengthUnitLabel",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Background",
                    "value": "\"Black\""
                  },
                  {
                    "name": "Foreground",
                    "value": "\"WHITE\""
                  },
                  {
                    "name": "Text",
                    "value": "\"m\""
                  },
                  {
                    "name": "Font",
                    "value": "font"
                  }
                ]
              },
              {
                "Name": "controlPanel2",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Display",
                    "value": "\"inline-flex\""
                  }
                ],
                "Children": [
                  {
                    "Name": "bounceCheckBox",
                    "Type": "CheckBox",
                    "Properties": [
                      {
                        "name": "Checked",
                        "value": "bounce"
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Bounce at ends of incline.\""
                      },
                      {
                        "name": "Text",
                        "value": "\"bounce\""
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "world",
                    "Type": "CheckBox",
                    "Properties": [
                      {
                        "name": "Checked",
                        "value": "world"
                      },
                      {
                        "name": "OnCheckOff",
                        "value": "Width1 = \"0%\";\ndisabled=false;\n\nif (showGraphV) \n  Width2 = \"100%\";\nelse if (showGraphX)\n  Width3 = \"100%\";\nelse if (showGraphF)\n  Width4 = \"100%\";\n  \n"
                      },
                      {
                        "name": "Background",
                        "value": "\"Orange\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"world view\""
                      },
                      {
                        "name": "Text",
                        "value": "\"world\""
                      },
                      {
                        "name": "Disabled",
                        "value": "disabledworld"
                      },
                      {
                        "name": "OnCheckOn",
                        "value": "if (showGraphV)\n  Width1 = Width2 = \"50%\";\nelse if (showGraphX)\n  Width1 = Width3 = \"50%\";\nelse if (showGraphF)\n  Width1 = Width4 = \"50%\";\nelse\n  Width1 = \"100%\";"
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "vvst",
                    "Type": "CheckBox",
                    "Properties": [
                      {
                        "name": "Checked",
                        "value": "showGraphV"
                      },
                      {
                        "name": "OnCheckOff",
                        "value": "Width2 = \"0%\";\n\nif ((!showGraphX) && (!showGraphF))\n{\n  world = true;\n  disabledworld=true;\n  Width1 = \"100%\";\n}  \n"
                      },
                      {
                        "name": "Background",
                        "value": "\"MAGENTA\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Show velocity graph.\""
                      },
                      {
                        "name": "Text",
                        "value": "\"v vs t\""
                      },
                      {
                        "name": "Disabled",
                        "value": "disabled"
                      },
                      {
                        "name": "OnCheckOn",
                        "value": "if (world) \n  Width1 = Width2 = \"50%\";\nelse\n  Width2 = \"100%\";\n \nWidth3 = \"0%\";\nWidth4 = \"0%\";  \n\ndisabledworld = showVectors = showGraphF = showGraphX = false;\n"
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "xvst",
                    "Type": "CheckBox",
                    "Properties": [
                      {
                        "name": "Checked",
                        "value": "showGraphX"
                      },
                      {
                        "name": "OnCheckOff",
                        "value": "Width3 = \"0%\";\n\nif ((!showGraphV) && (!showGraphF))\n{\n  world = true;\n  disabledworld=true;\n  Width1 = \"100%\";\n}  \n"
                      },
                      {
                        "name": "Background",
                        "value": "\"Blue\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Show position graph.\""
                      },
                      {
                        "name": "Foreground",
                        "value": "\"White\""
                      },
                      {
                        "name": "Text",
                        "value": "\"x vs t\""
                      },
                      {
                        "name": "Disabled",
                        "value": "disabled"
                      },
                      {
                        "name": "OnCheckOn",
                        "value": "if (world)\n  Width1 = Width3 = \"50%\";  \nelse \n  Width3 = \"100%\";\n \nWidth2 = \"0%\";\nWidth4 = \"0%\";  \ndisabledworld = showVectors = showGraphF = showGraphV = false;\n\n"
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "forceVsT",
                    "Type": "CheckBox",
                    "Properties": [
                      {
                        "name": "Checked",
                        "value": "showGraphF"
                      },
                      {
                        "name": "OnCheckOff",
                        "value": "Width4 = \"0%\";\n\nif ((!showGraphX) && (!showGraphV))\n{\n  world = true;\n  disabledworld=true;\n  Width1 = \"100%\";\n}  \n\n"
                      },
                      {
                        "name": "Background",
                        "value": "\"GREEN\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Show total force graph.\""
                      },
                      {
                        "name": "OnChange",
                        "value": "showVectors=showGraphF;"
                      },
                      {
                        "name": "Text",
                        "value": "\"force vs t\""
                      },
                      {
                        "name": "Disabled",
                        "value": "disabled"
                      },
                      {
                        "name": "OnCheckOn",
                        "value": "if (world)\n  Width1 = Width4 = \"50%\";\nelse\n  Width4 = \"100%\";\n\nWidth2 = \"0%\";\nWidth3 = \"0%\";  \ndisabledworld = showGraphV = showGraphX = false;"
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "playPauseButton",
                    "Type": "TwoStateButton",
                    "Properties": [
                      {
                        "name": "OffClick",
                        "value": "%_pause%"
                      },
                      {
                        "name": "TextOn",
                        "value": "\"\u25ba\""
                      },
                      {
                        "name": "State",
                        "value": "_isPaused"
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Starts and stops the simulation.\""
                      },
                      {
                        "name": "TextOff",
                        "value": "\"\u275a\u275a\""
                      },
                      {
                        "name": "Disabled",
                        "value": "motionDone"
                      },
                      {
                        "name": "OnClick",
                        "value": "trMessage=null;\nif (x<=maxX && x>=minX) _play();\nelse if (x>maxX && v<=0) _play();\nelse if (x<minX && v>=0) _play();\nelse displayAlert();"
                      },
                      {
                        "name": "Font",
                        "value": "fontb"
                      }
                    ]
                  },
                  {
                    "Name": "stepButton",
                    "Type": "Button",
                    "Properties": [
                      {
                        "name": "OnRelease",
                        "value": "trMessage=null;\nif (x<=maxX && x>=minX)_step();\nelse if (x>maxX && v<=0)_step();\nelse if (x<minX && v>=0)_step();\nelse displayAlert();"
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Step\""
                      },
                      {
                        "name": "Text",
                        "value": "\"\u275a\u25ba\""
                      },
                      {
                        "name": "Disabled",
                        "value": "motionDone"
                      },
                      {
                        "name": "Font",
                        "value": "fontb"
                      }
                    ]
                  },
                  {
                    "Name": "resetButton",
                    "Type": "Button",
                    "Properties": [
                      {
                        "name": "OnRelease",
                        "value": "%_reset%"
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Reset\""
                      },
                      {
                        "name": "Text",
                        "value": "\"\u21bb\""
                      },
                      {
                        "name": "Font",
                        "value": "fontb"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "Name": "displayPanel",
            "Type": "Panel",
            "Expanded": "false",
            "Properties": [
              {
                "name": "Width",
                "value": "%Width%"
              }
            ],
            "Children": [
              {
                "Name": "drawingPanel",
                "Type": "DrawingPanel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Enabled",
                    "value": "true"
                  },
                  {
                    "name": "OnDoubleClick",
                    "value": "toggleFullScreen();"
                  },
                  {
                    "name": "SquareAspect",
                    "value": "true"
                  },
                  {
                    "name": "MaximumY",
                    "value": "L*Math.sin(Math.max(angle, Math.PI/5))+0.05*L+0.05*L"
                  },
                  {
                    "name": "MaximumX",
                    "value": "L*Math.cos(angle)+0.05*L"
                  },
                  {
                    "name": "TRMessage",
                    "value": "%slippingMsg%"
                  },
                  {
                    "name": "MinimumX",
                    "value": "-0.05*L"
                  },
                  {
                    "name": "MinimumY",
                    "value": "-0.04*L"
                  },
                  {
                    "name": "AutoScaleY",
                    "value": "false"
                  },
                  {
                    "name": "AutoScaleX",
                    "value": "false"
                  },
                  {
                    "name": "Height",
                    "value": "\"90vh\""
                  },
                  {
                    "name": "BLMessage",
                    "value": "%forceBalanceText%"
                  },
                  {
                    "name": "Width",
                    "value": "%Width1%"
                  },
                  {
                    "name": "TLMessage",
                    "value": "%trMessage%"
                  },
                  {
                    "name": "BRMessage",
                    "value": "%ttext%"
                  }
                ],
                "Children": [
                  {
                    "Name": "ground",
                    "Type": "Shape2D",
                    "Properties": [
                      {
                        "name": "FillColor",
                        "value": "\"GREEN\""
                      },
                      {
                        "name": "SizeX",
                        "value": "4*L"
                      },
                      {
                        "name": "RelativePosition",
                        "value": "\"NORTH\""
                      },
                      {
                        "name": "ShapeType",
                        "value": "\"RECTANGLE\""
                      },
                      {
                        "name": "X",
                        "value": "0"
                      },
                      {
                        "name": "Y",
                        "value": "0"
                      },
                      {
                        "name": "SizeY",
                        "value": "L"
                      }
                    ]
                  },
                  {
                    "Name": "muKineticDragGroup",
                    "Type": "Group2D",
                    "Expanded": "false",
                    "Properties": [
                      {
                        "name": "X",
                        "value": "0"
                      },
                      {
                        "name": "Y",
                        "value": "0.45"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "muKdragable",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "15"
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"RECTANGLE\""
                          },
                          {
                            "name": "X",
                            "value": "muKdrag"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "SizeY",
                            "value": "15"
                          },
                          {
                            "name": "PixelSize",
                            "value": "true"
                          },
                          {
                            "name": "DrawFill",
                            "value": "false"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_X\""
                          },
                          {
                            "name": "OnDrag",
                            "value": "//vdrag= Math.round(vdrag);\nvar position = _view.drawingPanel.getInteraction().getInteractionPoint();\n//xi = position[0];\n//yi = position[1];\n//vdrag= Math.round(position[0]*10)/10;\nmuKdrag= Math.round(_info.point[0]*100)/100;\nif (muKdrag <0) muKdrag = 0;\nif (muKdrag >0.1) muKdrag = 0.1;\nmuKinetic = muKdrag*20;\n\ncheckDirection();\n"
                          }
                        ]
                      },
                      {
                        "Name": "group222",
                        "Type": "Group2D",
                        "Expanded": "false",
                        "Properties": [
                          {
                            "name": "X",
                            "value": "muKdrag"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          }
                        ],
                        "Children": [
                          {
                            "Name": "muKtext",
                            "Type": "Text2D",
                            "Properties": [
                              {
                                "name": "FillColor",
                                "value": "\"Orange\""
                              },
                              {
                                "name": "RelativePosition",
                                "value": "\"SOUTH\""
                              },
                              {
                                "name": "X",
                                "value": "0"
                              },
                              {
                                "name": "Y",
                                "value": "0.01"
                              },
                              {
                                "name": "Text",
                                "value": "\"\u03bck = \"+muKinetic.toFixed(2)"
                              },
                              {
                                "name": "Font",
                                "value": "\"normal normal 2vw \""
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "muStaticdraggroup22",
                    "Type": "Group2D",
                    "Expanded": "false",
                    "Properties": [
                      {
                        "name": "X",
                        "value": "0"
                      },
                      {
                        "name": "Y",
                        "value": "0.5"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "muSdragable",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "15"
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"RECTANGLE\""
                          },
                          {
                            "name": "X",
                            "value": "muSdrag"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "SizeY",
                            "value": "15"
                          },
                          {
                            "name": "PixelSize",
                            "value": "true"
                          },
                          {
                            "name": "DrawFill",
                            "value": "false"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_X\""
                          },
                          {
                            "name": "OnDrag",
                            "value": "//vdrag= Math.round(vdrag);\nvar position = _view.drawingPanel.getInteraction().getInteractionPoint();\n//xi = position[0];\n//yi = position[1];\n//vdrag= Math.round(position[0]*10)/10;\nmuSdrag= Math.round(_info.point[0]*100)/100;\nif (muSdrag <0) muSdrag = 0;\nif (muSdrag >0.1) muSdrag = 0.1;\nmuStatic =muSdrag*20;\n\ncheckDirection();\n"
                          }
                        ]
                      },
                      {
                        "Name": "group22",
                        "Type": "Group2D",
                        "Expanded": "false",
                        "Properties": [
                          {
                            "name": "X",
                            "value": "muSdrag"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          }
                        ],
                        "Children": [
                          {
                            "Name": "muS_text",
                            "Type": "Text2D",
                            "Properties": [
                              {
                                "name": "FillColor",
                                "value": "\"Orange\""
                              },
                              {
                                "name": "RelativePosition",
                                "value": "\"SOUTH\""
                              },
                              {
                                "name": "X",
                                "value": "0"
                              },
                              {
                                "name": "Y",
                                "value": "0.01"
                              },
                              {
                                "name": "Text",
                                "value": "\"\u03bcs = \"+muStatic.toFixed(2)"
                              },
                              {
                                "name": "Font",
                                "value": "\"normal normal 2vw \""
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "LDragGroup",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [],
                    "Children": [
                      {
                        "Name": "Ldragable",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "15"
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"RECTANGLE\""
                          },
                          {
                            "name": "X",
                            "value": "Ldrag"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "SizeY",
                            "value": "15"
                          },
                          {
                            "name": "PixelSize",
                            "value": "true"
                          },
                          {
                            "name": "DrawFill",
                            "value": "false"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_X\""
                          },
                          {
                            "name": "OnDrag",
                            "value": "\n//var position = _view.drawingPanel.getInteraction().getInteractionPoint();\n\nLdrag= Math.round(_info.point[0]*10)/10;\nif (Ldrag <0.5) Ldrag = 0.5;\nif (Ldrag >2) Ldrag = 2;\nL = Ldrag*1;\nbumperX=L;\ncheckDirection();\n"
                          }
                        ]
                      },
                      {
                        "Name": "group2222",
                        "Type": "Group2D",
                        "Expanded": "true",
                        "Properties": [
                          {
                            "name": "X",
                            "value": "L"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          }
                        ],
                        "Children": [
                          {
                            "Name": "muLtext2",
                            "Type": "Text2D",
                            "Properties": [
                              {
                                "name": "FillColor",
                                "value": "\"Black\""
                              },
                              {
                                "name": "RelativePosition",
                                "value": "\"SOUTH\""
                              },
                              {
                                "name": "X",
                                "value": "0.1"
                              },
                              {
                                "name": "Y",
                                "value": "0.05"
                              },
                              {
                                "name": "Text",
                                "value": "\"L = \"+L.toFixed(2)+\"m\""
                              },
                              {
                                "name": "Font",
                                "value": "\"normal normal 2vw \""
                              },
                              {
                                "name": "EnabledPosition",
                                "value": "\"ENABLED_ANY\""
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "coordinates",
                    "Type": "Group2D",
                    "Expanded": "false",
                    "Properties": [
                      {
                        "name": "Transformation",
                        "value": "angle"
                      },
                      {
                        "name": "X",
                        "value": "0"
                      },
                      {
                        "name": "Y",
                        "value": "0"
                      },
                      {
                        "name": "Visibility",
                        "value": "showVectors"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "xArrow",
                        "Type": "Arrow2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "2*blockSize"
                          },
                          {
                            "name": "X",
                            "value": "0"
                          },
                          {
                            "name": "Y",
                            "value": "1.5*blockSize"
                          },
                          {
                            "name": "SizeY",
                            "value": "0"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          }
                        ]
                      },
                      {
                        "Name": "yArrow",
                        "Type": "Arrow2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "0"
                          },
                          {
                            "name": "X",
                            "value": "0"
                          },
                          {
                            "name": "Y",
                            "value": "1.5*blockSize"
                          },
                          {
                            "name": "SizeY",
                            "value": "2*blockSize"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          }
                        ]
                      },
                      {
                        "Name": "x",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "X",
                            "value": "2*blockSize+0.03"
                          },
                          {
                            "name": "Y",
                            "value": "1.5*blockSize"
                          },
                          {
                            "name": "Text",
                            "value": "\"x\""
                          },
                          {
                            "name": "PixelSize",
                            "value": "true"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      },
                      {
                        "Name": "y",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "X",
                            "value": "0"
                          },
                          {
                            "name": "Y",
                            "value": "3.5*blockSize+0.03"
                          },
                          {
                            "name": "Text",
                            "value": "\"y\""
                          },
                          {
                            "name": "PixelSize",
                            "value": "true"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "inclineReferenceFrame",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "Transformation",
                        "value": "angle"
                      },
                      {
                        "name": "X",
                        "value": "0.0"
                      },
                      {
                        "name": "Y",
                        "value": "0.0"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "spring",
                        "Type": "Spring2D",
                        "Properties": [
                          {
                            "name": "Radius",
                            "value": "blockSize/5"
                          },
                          {
                            "name": "SizeX",
                            "value": "-L+x+blockSize/2"
                          },
                          {
                            "name": "X",
                            "value": "L"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"RED\""
                          },
                          {
                            "name": "Y",
                            "value": "blockSize/4"
                          },
                          {
                            "name": "SizeY",
                            "value": "0"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          }
                        ]
                      },
                      {
                        "Name": "incline",
                        "Type": "Segment2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "L"
                          },
                          {
                            "name": "X",
                            "value": "0"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "SizeY",
                            "value": "0"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          }
                        ]
                      },
                      {
                        "Name": "bottomBumper",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"BLACK\""
                          },
                          {
                            "name": "MovesGroup",
                            "value": "false"
                          },
                          {
                            "name": "SizeX",
                            "value": "0.01*L"
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"EAST\""
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"ROUND_RECTANGLE\""
                          },
                          {
                            "name": "X",
                            "value": "0.01*L"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "SizeY",
                            "value": "blockSize/2"
                          }
                        ]
                      },
                      {
                        "Name": "topBumper",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"Black\""
                          },
                          {
                            "name": "MovesGroup",
                            "value": "false"
                          },
                          {
                            "name": "SizeX",
                            "value": "0.01*L"
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"SOUTH_WEST\""
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"RECTANGLE\""
                          },
                          {
                            "name": "X",
                            "value": "bumperX"
                          },
                          {
                            "name": "Y",
                            "value": "bumperY"
                          },
                          {
                            "name": "SizeY",
                            "value": "blockSize/2"
                          },
                          {
                            "name": "OnDrag",
                            "value": "angle += Math.atan2(bumperY,bumperX);\nangle = Math.max(0,angle);\nangle = Math.min(Math.PI/2,angle);\nangleDegrees = Math.degrees(angle); // added by lookang\nbumperX = L;\nbumperY = 0;\ncheckDirection();"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_ANY\""
                          }
                        ]
                      },
                      {
                        "Name": "block",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "Sensitivity",
                            "value": "0"
                          },
                          {
                            "name": "FillColor",
                            "value": "\"rgba(128,192,255,1)\""
                          },
                          {
                            "name": "MovesGroup",
                            "value": "false"
                          },
                          {
                            "name": "SizeX",
                            "value": "blockSize"
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"SOUTH\""
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"RECTANGLE\""
                          },
                          {
                            "name": "X",
                            "value": "x"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"BLACK\""
                          },
                          {
                            "name": "Y",
                            "value": "y"
                          },
                          {
                            "name": "SizeY",
                            "value": "blockSize/2"
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_X\""
                          },
                          {
                            "name": "OnDrag",
                            "value": "y = 0;\n//x = _view.block.getX();\nx=Math.max(blockSize/2,x);\nx=Math.min(x,L-blockSize/2);\nv = 0;\nt = 0;\ncheckDirection();"
                          }
                        ]
                      },
                      {
                        "Name": "blockForces",
                        "Type": "Group2D",
                        "Expanded": "false",
                        "Properties": [
                          {
                            "name": "X",
                            "value": "x"
                          },
                          {
                            "name": "Y",
                            "value": "y+blockSize/4"
                          },
                          {
                            "name": "Visibility",
                            "value": "showVectors"
                          }
                        ],
                        "Children": [
                          {
                            "Name": "gravity",
                            "Type": "Arrow2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "(-m*g*Math.sin(angle))*arrowScale"
                              },
                              {
                                "name": "X",
                                "value": "0"
                              },
                              {
                                "name": "Y",
                                "value": "0"
                              },
                              {
                                "name": "SizeY",
                                "value": "(-m*g*Math.cos(angle))*arrowScale"
                              }
                            ]
                          },
                          {
                            "Name": "friction",
                            "Type": "Arrow2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "frictionForce*arrowScale"
                              },
                              {
                                "name": "X",
                                "value": "0"
                              },
                              {
                                "name": "LineColor",
                                "value": "\"YELLOW\""
                              },
                              {
                                "name": "Y",
                                "value": "0"
                              },
                              {
                                "name": "SizeY",
                                "value": "0*arrowScale"
                              },
                              {
                                "name": "LineWidth",
                                "value": "2"
                              }
                            ]
                          },
                          {
                            "Name": "normal",
                            "Type": "Arrow2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "0*arrowScale"
                              },
                              {
                                "name": "X",
                                "value": "0"
                              },
                              {
                                "name": "Y",
                                "value": "0"
                              },
                              {
                                "name": "SizeY",
                                "value": "-weightY*arrowScale"
                              }
                            ]
                          },
                          {
                            "Name": "springForce",
                            "Type": "Arrow2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "springForce*arrowScale"
                              },
                              {
                                "name": "X",
                                "value": "0"
                              },
                              {
                                "name": "LineColor",
                                "value": "\"RED\""
                              },
                              {
                                "name": "Y",
                                "value": "0"
                              },
                              {
                                "name": "SizeY",
                                "value": "0*arrowScale"
                              },
                              {
                                "name": "LineWidth",
                                "value": "2"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "Name": "verticalSupport",
                        "Type": "Segment2D",
                        "Properties": [
                          {
                            "name": "ResizesGroup",
                            "value": "false"
                          },
                          {
                            "name": "MovesGroup",
                            "value": "false"
                          },
                          {
                            "name": "SizeX",
                            "value": "0"
                          },
                          {
                            "name": "X",
                            "value": "L*Math.cos(angle)"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "SizeY",
                            "value": "L*Math.sin(angle)"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          }
                        ]
                      },
                      {
                        "Name": "velocitydraggroup2",
                        "Type": "Group2D",
                        "Expanded": "true",
                        "Properties": [
                          {
                            "name": "X",
                            "value": "x+blockSize/2"
                          },
                          {
                            "name": "Y",
                            "value": "y+blockSize"
                          }
                        ],
                        "Children": [
                          {
                            "Name": "velocity_drag22",
                            "Type": "Shape2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "15"
                              },
                              {
                                "name": "ShapeType",
                                "value": "\"RECTANGLE\""
                              },
                              {
                                "name": "X",
                                "value": "vdrag"
                              },
                              {
                                "name": "Y",
                                "value": "0"
                              },
                              {
                                "name": "SizeY",
                                "value": "15"
                              },
                              {
                                "name": "PixelSize",
                                "value": "true"
                              },
                              {
                                "name": "DrawFill",
                                "value": "false"
                              },
                              {
                                "name": "EnabledPosition",
                                "value": "\"ENABLED_X\""
                              },
                              {
                                "name": "OnDrag",
                                "value": "//vdrag= Math.round(vdrag);\n//var position = _view.drawingPanel.getInteraction().getInteractionPoint();\n//xi = position[0];\n//yi = position[1];\n//vdrag= Math.round(position[0]*10)/10;\n//vdrag= Math.round((_info.point[0]-(x+blockSize/2))*100)/100;\nvdrag= Math.round((_info.point[0]-(x+blockSize/2))*100)/100;\n\nif (vdrag <-0.5) vdrag = -0.5;\nif (vdrag >0.5) vdrag = 0.5;\nv =vdrag*10;\nv=Math.max(-99,v);\nv=Math.min(v,99);\ncheckDirection();\n"
                              }
                            ]
                          },
                          {
                            "Name": "velocityarrow",
                            "Type": "Arrow2D",
                            "Properties": [
                              {
                                "name": "MarkEnd",
                                "value": "\"TRIANGLE\""
                              },
                              {
                                "name": "SizeX",
                                "value": "vdrag"
                              },
                              {
                                "name": "LineColor",
                                "value": "\"Magenta\""
                              },
                              {
                                "name": "X",
                                "value": "0"
                              },
                              {
                                "name": "Y",
                                "value": "0"
                              },
                              {
                                "name": "SizeY",
                                "value": "0"
                              },
                              {
                                "name": "LineWidth",
                                "value": "2"
                              },
                              {
                                "name": "Offset",
                                "value": "\"SOUTH_WEST\""
                              }
                            ]
                          },
                          {
                            "Name": "group2",
                            "Type": "Group2D",
                            "Expanded": "true",
                            "Properties": [
                              {
                                "name": "X",
                                "value": "vdrag"
                              },
                              {
                                "name": "Y",
                                "value": "0"
                              }
                            ],
                            "Children": [
                              {
                                "Name": "v22",
                                "Type": "Text2D",
                                "Properties": [
                                  {
                                    "name": "FillColor",
                                    "value": "\"Magenta\""
                                  },
                                  {
                                    "name": "RelativePosition",
                                    "value": "\"SOUTH\""
                                  },
                                  {
                                    "name": "X",
                                    "value": "0"
                                  },
                                  {
                                    "name": "Y",
                                    "value": "0.05"
                                  },
                                  {
                                    "name": "Text",
                                    "value": "\"v = \"+ v.toFixed(2) +\"m/s\""
                                  },
                                  {
                                    "name": "Font",
                                    "value": "\"normal normal 2vw \""
                                  },
                                  {
                                    "name": "EnabledPosition",
                                    "value": "\"ENABLED_ANY\""
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "Name": "kdraggroup",
                        "Type": "Group2D",
                        "Expanded": "true",
                        "Properties": [
                          {
                            "name": "X",
                            "value": "0"
                          },
                          {
                            "name": "Y",
                            "value": "blockSize/4+0.1"
                          }
                        ],
                        "Children": [
                          {
                            "Name": "kdrag",
                            "Type": "Shape2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "15"
                              },
                              {
                                "name": "ShapeType",
                                "value": "\"RECTANGLE\""
                              },
                              {
                                "name": "X",
                                "value": "kdrag"
                              },
                              {
                                "name": "SizeY",
                                "value": "15"
                              },
                              {
                                "name": "PixelSize",
                                "value": "true"
                              },
                              {
                                "name": "DrawFill",
                                "value": "false"
                              },
                              {
                                "name": "EnabledPosition",
                                "value": "\"ENABLED_X\""
                              },
                              {
                                "name": "OnDrag",
                                "value": "var position = _view.drawingPanel.getInteraction().getInteractionPoint();\n\nkdrag = Math.round(_info.point[0]*1000)/1000;\n\nif (kdrag <0) kdrag = 0;\nif (kdrag >0.5) kdrag = 0.5;\nk = kdrag*20;\n\ncheckDirection();\n"
                              }
                            ]
                          },
                          {
                            "Name": "group23",
                            "Type": "Group2D",
                            "Expanded": "true",
                            "Properties": [
                              {
                                "name": "X",
                                "value": "kdrag"
                              },
                              {
                                "name": "Y",
                                "value": "0"
                              }
                            ],
                            "Children": [
                              {
                                "Name": "ktexte",
                                "Type": "Text2D",
                                "Properties": [
                                  {
                                    "name": "FillColor",
                                    "value": "\"Red\""
                                  },
                                  {
                                    "name": "RelativePosition",
                                    "value": "\"SOUTH\""
                                  },
                                  {
                                    "name": "X",
                                    "value": "0"
                                  },
                                  {
                                    "name": "Y",
                                    "value": "0.05"
                                  },
                                  {
                                    "name": "Text",
                                    "value": "\"k = \"+ k.toFixed(2) +\"N/m\""
                                  },
                                  {
                                    "name": "Font",
                                    "value": "\"normal normal 2vw \""
                                  },
                                  {
                                    "name": "EnabledPosition",
                                    "value": "\"ENABLED_ANY\""
                                  }
                                ]
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "thetagroup",
                    "Type": "Group2D",
                    "Expanded": "false",
                    "Properties": [],
                    "Children": [
                      {
                        "Name": "thethatextdrag",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"rgba(0,0,192,1)\""
                          },
                          {
                            "name": "X",
                            "value": "1.1"
                          },
                          {
                            "name": "Y",
                            "value": "0.1"
                          },
                          {
                            "name": "Text",
                            "value": "\"\u03b8 = \" + angleDegrees.toFixed(1)+\"\u00b0\""
                          },
                          {
                            "name": "EnabledPosition",
                            "value": "\"ENABLED_ANY\""
                          },
                          {
                            "name": "Font",
                            "value": "\"normal normal 2vw\""
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "vPlottingPanel",
                "Type": "PlottingPanel",
                "Expanded": "false",
                "Properties": [
                  {
                    "name": "Gutters",
                    "value": "[50,0,0,50]"
                  },
                  {
                    "name": "XFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "OnDoubleClick",
                    "value": "toggleFullScreen();"
                  },
                  {
                    "name": "MaximumX",
                    "value": "20*dt"
                  },
                  {
                    "name": "YFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "YAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "XTickStep",
                    "value": "0.1"
                  },
                  {
                    "name": "TitleY",
                    "value": "\"velocity (m/s)\""
                  },
                  {
                    "name": "YTickStep",
                    "value": "0.5"
                  },
                  {
                    "name": "AutoScaleY",
                    "value": "true"
                  },
                  {
                    "name": "TitleX",
                    "value": "\"time (s)\""
                  },
                  {
                    "name": "AutoScaleX",
                    "value": "true"
                  },
                  {
                    "name": "GuttersColor",
                    "value": "\"MAGENTA\""
                  },
                  {
                    "name": "XAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "Visibility",
                    "value": "showGraphV"
                  },
                  {
                    "name": "Height",
                    "value": "\"90vh\""
                  },
                  {
                    "name": "Width",
                    "value": "%Width2%"
                  }
                ],
                "Children": [
                  {
                    "Name": "vTrail",
                    "Type": "Trail2D",
                    "Properties": [
                      {
                        "name": "Maximum",
                        "value": "200"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"MAGENTA\""
                      },
                      {
                        "name": "InputX",
                        "value": "t"
                      },
                      {
                        "name": "InputY",
                        "value": "v"
                      },
                      {
                        "name": "NoRepeat",
                        "value": "true"
                      },
                      {
                        "name": "LineWidth",
                        "value": "2"
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "xPlottingPanel",
                "Type": "PlottingPanel",
                "Expanded": "false",
                "Properties": [
                  {
                    "name": "Gutters",
                    "value": "[50,0,0,50]"
                  },
                  {
                    "name": "XFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "GuttersLineColor",
                    "value": "\"White\""
                  },
                  {
                    "name": "OnDoubleClick",
                    "value": "toggleFullScreen();"
                  },
                  {
                    "name": "MaximumX",
                    "value": "20*dt"
                  },
                  {
                    "name": "YFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "YAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "XTickStep",
                    "value": "0.1"
                  },
                  {
                    "name": "TitleY",
                    "value": "\"position (m)\""
                  },
                  {
                    "name": "YTickStep",
                    "value": "0.5"
                  },
                  {
                    "name": "AutoScaleY",
                    "value": "true"
                  },
                  {
                    "name": "TitleX",
                    "value": "\"time (s)\""
                  },
                  {
                    "name": "AutoScaleX",
                    "value": "true"
                  },
                  {
                    "name": "GuttersColor",
                    "value": "\"Cyan\""
                  },
                  {
                    "name": "XAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "Visibility",
                    "value": "showGraphX"
                  },
                  {
                    "name": "Height",
                    "value": "\"90vh\""
                  },
                  {
                    "name": "Width",
                    "value": "%Width3%"
                  }
                ],
                "Children": [
                  {
                    "Name": "xpositionTrail",
                    "Type": "Trail2D",
                    "Properties": [
                      {
                        "name": "Maximum",
                        "value": "200"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Blue\""
                      },
                      {
                        "name": "InputX",
                        "value": "t"
                      },
                      {
                        "name": "InputY",
                        "value": "x"
                      },
                      {
                        "name": "NoRepeat",
                        "value": "true"
                      },
                      {
                        "name": "LineWidth",
                        "value": "2"
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "forcePlottingPanel",
                "Type": "PlottingPanel",
                "Expanded": "false",
                "Properties": [
                  {
                    "name": "Gutters",
                    "value": "[50,0,0,50]"
                  },
                  {
                    "name": "XFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "OnDoubleClick",
                    "value": "toggleFullScreen();"
                  },
                  {
                    "name": "MaximumX",
                    "value": "20*dt"
                  },
                  {
                    "name": "YFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "YAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "XTickStep",
                    "value": "0.1"
                  },
                  {
                    "name": "TitleY",
                    "value": "\"force (N)\""
                  },
                  {
                    "name": "YTickStep",
                    "value": "0.5"
                  },
                  {
                    "name": "AutoScaleY",
                    "value": "true"
                  },
                  {
                    "name": "TitleX",
                    "value": "\"time (s)\""
                  },
                  {
                    "name": "AutoScaleX",
                    "value": "true"
                  },
                  {
                    "name": "GuttersColor",
                    "value": "\"GREEN\""
                  },
                  {
                    "name": "XAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "Visibility",
                    "value": "showGraphF"
                  },
                  {
                    "name": "Height",
                    "value": "\"90vh\""
                  },
                  {
                    "name": "Width",
                    "value": "%Width4%"
                  }
                ],
                "Children": [
                  {
                    "Name": "forceTrail",
                    "Type": "Trail2D",
                    "Properties": [
                      {
                        "name": "Maximum",
                        "value": "200"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Green\""
                      },
                      {
                        "name": "InputX",
                        "value": "t"
                      },
                      {
                        "name": "InputY",
                        "value": "netForce"
                      },
                      {
                        "name": "NoRepeat",
                        "value": "true"
                      },
                      {
                        "name": "LineWidth",
                        "value": "2"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "Name": "html",
            "Type": "Panel",
            "Properties": [
              {
                "name": "Html",
                "value": "<div style=\"font-family: Arial, sans-serif; line-height: 1.6; max-width: 980px; margin: 0 auto; color: #1f2937;\">\n  <style>\n    .sim-card {\n      background: linear-gradient(135deg, #f8fbff, #eef6ff);\n      border: 1px solid #cfe3ff;\n      border-radius: 16px;\n      padding: 20px;\n      margin-bottom: 18px;\n      box-shadow: 0 6px 18px rgba(0,0,0,0.06);\n    }\n    .sim-card h2, .sim-card h3 {\n      margin-top: 0;\n      color: #0f3d66;\n    }\n    .sim-note {\n      background: #fff7cc;\n      border-left: 6px solid #f2b400;\n      padding: 12px 14px;\n      border-radius: 8px;\n      margin: 14px 0;\n    }\n    .question-box {\n      background: #ffffff;\n      border: 1px solid #d7e3f4;\n      border-radius: 14px;\n      padding: 16px;\n      margin: 14px 0;\n    }\n    .question-title {\n      font-weight: bold;\n      color: #123b5d;\n      margin-bottom: 10px;\n    }\n    .answer-box {\n      display: none;\n      margin-top: 12px;\n      padding: 12px 14px;\n      background: #eef9f0;\n      border-left: 5px solid #2f9e44;\n      border-radius: 8px;\n    }\n    .reveal-btn {\n      background: #0f6cbf;\n      color: white;\n      border: none;\n      border-radius: 8px;\n      padding: 8px 14px;\n      cursor: pointer;\n      font-size: 14px;\n    }\n    .reveal-btn:hover {\n      background: #0b568f;\n    }\n    .teacher-box {\n      background: #fdf2f8;\n      border: 1px solid #f4c7da;\n      border-radius: 14px;\n      padding: 18px;\n      margin-top: 24px;\n    }\n  </style>\n\n  <div class=\"sim-card\">\n    <h2>About this Simulation</h2>\n    <p><iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/jtg_xXuKuqQ?si=_WEhzODyivXKlFZQ\" 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      This simulation models the motion of a block attached to a spring on an inclined plane.\n      You can change the angle of the slope, the spring constant, and the friction coefficients,\n      then observe whether the block stays at rest, slips, or oscillates.\n    </p>\n    <p>\n      The model helps learners compare the forces acting along the incline. In particular, it shows\n      how the spring force, the component of gravity down the slope, and friction work together to\n      determine the motion. By exploring different settings, you can connect the world view to the\n      displacement, velocity, and force graphs.\n    </p>\n\n    <h3>Learning Objectives</h3>\n    <ul>\n      <li>Understand how the angle of incline changes the component of weight along the slope.</li>\n      <li>Explain when static friction is able to keep the block at rest.</li>\n      <li>Investigate how spring constant and friction affect slipping and oscillation.</li>\n      <li>Relate the motion of the block to the displacement, velocity, and force graphs.</li>\n      <li>Describe energy changes between gravitational potential, elastic potential, and kinetic energy.</li>\n    </ul>\n\n    <div class=\"sim-note\">\n      <strong>Try this first:</strong> Before pressing play, predict whether the block will stay at rest,\n      slip, or oscillate.\n    </div>\n  </div>\n\n  <div class=\"sim-card\">\n    <h3>How to Explore</h3>\n    <ol>\n      <li>Set the block in a starting position and predict what will happen before pressing play.</li>\n      <li>Adjust the incline angle and observe how the motion changes.</li>\n      <li>Change the static and kinetic friction coefficients to compare sticking and slipping.</li>\n      <li>Change the spring constant to see how strongly the block is pulled back toward equilibrium.</li>\n      <li>Turn on the graphs and compare the animation with the plotted quantities.</li>\n    </ol>\n  </div>\n\n  <div class=\"sim-card\">\n    <h3>Thinking Questions for Active Learning</h3>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">1. If the block is initially at rest, what must be true for it to remain at rest?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a1')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a1\">\n        The net force along the incline must be zero. Static friction must be able to balance the combined effect\n        of the spring force and the component of gravity along the slope.\n      </div>\n    </div>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">2. How does increasing the angle of the incline affect the tendency of the block to slip?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a2')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a2\">\n        Increasing the angle increases the component of weight acting down the slope, so slipping becomes more likely.\n      </div>\n    </div>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">3. What is the difference between static friction and kinetic friction in this simulation?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a3')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a3\">\n        Static friction acts when the block is not slipping and can adjust up to a maximum value. Kinetic friction acts\n        once the block is already sliding and usually has a smaller, nearly constant value.\n      </div>\n    </div>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">4. When does the block begin to oscillate instead of simply slipping down the slope?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a4')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a4\">\n        Oscillation is seen most clearly when friction is very small and the spring provides a restoring force that pulls\n        the block back toward equilibrium.\n      </div>\n    </div>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">5. How does increasing the spring constant change the motion of the block?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a5')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a5\">\n        A larger spring constant gives a stronger restoring force for the same displacement, which usually makes the motion quicker\n        and can reduce the oscillation period.\n      </div>\n    </div>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">6. What happens to the motion when friction is very small or zero?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a6')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a6\">\n        Less energy is lost, so the block can oscillate more clearly and the motion becomes closer to an ideal spring-block oscillator.\n      </div>\n    </div>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">7. How is the force graph related to the displacement of the block?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a7')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a7\">\n        The spring force changes with displacement, so the force graph changes as the block moves farther from or closer to equilibrium.\n      </div>\n    </div>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">8. At which parts of the motion is the kinetic energy greatest?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a8')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a8\">\n        The kinetic energy is greatest when the block is moving fastest, usually near the equilibrium position.\n      </div>\n    </div>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">9. When is the elastic potential energy in the spring greatest?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a9')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a9\">\n        The elastic potential energy is greatest when the spring is stretched or compressed the most.\n      </div>\n    </div>\n\n    <div class=\"question-box\">\n      <div class=\"question-title\">10. How does the equilibrium position change when the incline angle changes?</div>\n      <button class=\"reveal-btn\" onclick=\"toggleAnswer('a10')\">Show Answer</button>\n      <div class=\"answer-box\" id=\"a10\">\n        Changing the incline changes the component of gravity along the slope, so the position where the forces balance also changes.\n      </div>\n    </div>\n  </div>\n\n  <div class=\"teacher-box\">\n    <h3>Teacher-Only Suggested Use</h3>\n    <p>\n      Ask students to predict first, then test the prediction using the simulation, and finally explain their result\n      using the force comparison shown on screen.\n    </p>\n    <ul>\n      <li>Case 1: Choose values where static friction keeps the block at rest.</li>\n      <li>Case 2: Reduce static friction until slipping just begins.</li>\n      <li>Case 3: Reduce friction further and explore oscillation.</li>\n      <li>Case 4: Turn on graphs and connect the visual motion to the plotted quantities.</li>\n    </ul>\n  </div>\n</div>\n\n<script>\n  function toggleAnswer(id) {\n    var box = document.getElementById(id);\n    if (box.style.display === \"block\") {\n      box.style.display = \"none\";\n    } else {\n      box.style.display = \"block\";\n    }\n  }\n</script>"
              }
            ]
          }
        ]
      }
    ],
    "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/"
  }
}