{
  "information": {
    "Title": "Strength of an ElectroMagnet with variables number of coils, material of rod type, iron or plastic, size of rod large or small, number of batteries, battery strength full or low",
    "Author": [
      "weelookang@gmail.com",
      "Francisco Esquembre",
      "Felix J. Garcia Clemente",
      "Siti",
      "Coco"
    ],
    "AuthorLogo": [
      "./1authorlookangphoto5050.png",
      "./01authorPacoEsquembre2011.png",
      "./01authorFelix_J_Garcia_Clemente.png",
      "./siti.png",
      "./coco.png"
    ],
    "Password": "",
    "Keywords": "",
    "Abstract": "",
    "Copyright": "",
    "Level": "",
    "Language": "",
    "Logo": [
      "./EMStrength/Screenshot 2021-11-02 at 4.36.32 PM.png"
    ],
    "RunAlways": "true",
    "ModelTab": "",
    "ModelTabTitle": "",
    "ModelName": "",
    "FixedNavigationBar": "false",
    "CSSFile": "",
    "DetectedFiles": [
      "./01authorFelix_J_Garcia_Clemente.png",
      "./01authorPacoEsquembre2011.png",
      "./1authorlookangphoto5050.png",
      "./EMStrength/Screenshot 2021-11-02 at 4.36.32 PM.png",
      "./coco.png",
      "./siti.png"
    ],
    "AuxiliaryFiles": [
      "./EMStrength/"
    ],
    "HTMLHead": "<script async=\"true\" src=\"https://www.googletagmanager.com/gtag/js?id=UA-3326007-19\"></script>\n<script>\n  window.dataLayer = window.dataLayer || [];\n  function gtag(){dataLayer.push(arguments);}\n  gtag('js', new Date());\n  gtag('config', 'UA-3326007-19');\n</script>\n<script data-ad-client=\"ca-pub-0121577198857509\" async=\"true\" src=\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\"></script>",
    "SaveInXMLFormat": "false",
    "IncludeSource": "true",
    "IncludeLibrary": "true",
    "UglifyJS": "false",
    "PreviewFullModel": "false",
    "UseInterpreter": "true",
    "UseDeltaForODE": "false"
  },
  "description": {
    "pages": []
  },
  "model": {
    "variables": {
      "pages": [
        {
          "Name": "Var Table",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "font",
              "Value": "\"normal normal 1.5vw \"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "font2",
              "Value": "\"normal normal 1.5vw \"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "t",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "dt",
              "Value": "0.05",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "pi",
              "Value": "Math.PI",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "battDef",
              "Value": "",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "battNo",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xBatt",
              "Value": "[0,-3,3,-6,6]",
              "Type": "double",
              "Dimension": "[battNo]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "yBatt",
              "Value": "8",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "coilCounter",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "coilNo",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "coilNos",
              "Value": "9",
              "Type": "double",
              "Dimension": "[coilCounter]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xCoil",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "yCoil",
              "Value": "[0.5,-2,-4.5,-0.75,-3.25,-0.1,-1.3,-2.6,-3.9]",
              "Type": "double",
              "Dimension": "[coilNos]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xSizeCoil",
              "Value": "-2",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "open",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "Mainly to animate the switch",
              "Domain": "public"
            },
            {
              "Name": "voltage",
              "Value": "2",
              "Type": "double",
              "Dimension": "",
              "Comment": "Assuming each full batt is 2V, one low/flat is 0.5V",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "sizeL",
              "Value": "",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "Check if the size of the rod chosen is Small or Large, initial is Large",
              "Domain": "public"
            },
            {
              "Name": "material",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "1",
              "Domain": "public"
            },
            {
              "Name": "xSizeIron",
              "Value": "1.75",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xSizePla",
              "Value": "1.75",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "scaleX1",
              "Value": "-3",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "scaleX2",
              "Value": "7",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "enableTable",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "paperclips",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "pickupstate",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xIron",
              "Value": "-1.5",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "yIron",
              "Value": "-2",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "ySizeIron",
              "Value": "7",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "g",
              "Value": "10",
              "Type": "double",
              "Dimension": "",
              "Comment": "acceleration of gravity",
              "Domain": "public"
            },
            {
              "Name": "mass",
              "Value": "0.002",
              "Type": "double",
              "Dimension": "",
              "Comment": "mass of link",
              "Domain": "public"
            },
            {
              "Name": "b",
              "Value": "0.01",
              "Type": "double",
              "Dimension": "",
              "Comment": "damping coefficient",
              "Domain": "public"
            },
            {
              "Name": "L",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "length of chain",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "n",
              "Value": "7",
              "Type": "int",
              "Dimension": "",
              "Comment": "number of segments",
              "Domain": "public"
            },
            {
              "Name": "msg",
              "Value": "\"Set the initial separation\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "x",
              "Value": "0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "y",
              "Value": "0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "dx",
              "Value": "2",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "dy",
              "Value": "1",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "theta",
              "Value": "0",
              "Type": "double",
              "Dimension": "[n]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xPlastic",
              "Value": "-1.5",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "yPlastic",
              "Value": "-2",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "ySizePla",
              "Value": "7",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "j",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "k",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "dj",
              "Value": "2",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "dk",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "Calculations",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "volt",
              "Value": "2",
              "Type": "double",
              "Dimension": "",
              "Comment": "To indicate the voltage of each batt whether its full or low",
              "Domain": "public"
            },
            {
              "Name": "coilRes",
              "Value": "0.75",
              "Type": "double",
              "Dimension": "",
              "Comment": "How much does the no of Coil affects the overall magnetism",
              "Domain": "public"
            },
            {
              "Name": "sizeRes",
              "Value": "1",
              "Type": "double",
              "Dimension": "",
              "Comment": "If the size is small, effiency is halved",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "paperclipno",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "hint",
              "Value": "\"\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "hintt",
              "Value": "\"\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "layout",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "iOS",
              "Value": "/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "http://stackoverflow.com/questions/9038625/detect-if-device-is-ios",
              "Domain": "public"
            },
            {
              "Name": "Android",
              "Value": "/Android|android/i.test(navigator.userAgent)",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "iPad",
              "Value": "/iPad/.test(navigator.userAgent) && !window.MSStream",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "http://stackoverflow.com/questions/9038625/detect-if-device-is-ios",
              "Domain": "public"
            },
            {
              "Name": "iPhone",
              "Value": "/iPhone|iPod/.test(navigator.userAgent) && !window.MSStream",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "http://stackoverflow.com/questions/9038625/detect-if-device-is-ios",
              "Domain": "public"
            },
            {
              "Name": "Width",
              "Value": "(_isEPub)?\"400\":\"100%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "display width",
              "Domain": "public"
            },
            {
              "Name": "Height",
              "Value": "(_isEPub)?\"500\":\"100%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "Width1",
              "Value": "\"100%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "display width",
              "Domain": "public"
            },
            {
              "Name": "Width2",
              "Value": "\"0%\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "display width",
              "Domain": "public"
            },
            {
              "Name": "world",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "graph",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "disabledworld",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "disabled",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "cells",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xmin",
              "Value": "-10",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xmax",
              "Value": "10",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "ymin",
              "Value": "-10",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "ymax",
              "Value": "10",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "log",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "logline",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "loginfo",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "captured",
              "Value": "false",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "ppclog",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "battlog",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "coillog",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "matlog",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "sizelog",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "ppctil",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "batttil",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "coiltil",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "mattil",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "sizetil",
              "Value": "",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            }
          ]
        }
      ]
    },
    "initialization": {
      "pages": [
        {
          "Name": "chainlay",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "x = linspace(-3,0,n);\ny = linspace(-9.5,-9.5,n);\n\n"
        },
        {
          "Name": "undefined",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "if (ppclog==undefined){\n  ppclog=\"\";\n  }\nif (battlog==undefined){\n  battlog=\"\";\n  }\nif (coillog==undefined){\n  coillog=\"\";\n  }\nif (matlog==undefined){\n  matlog=\"\";\n  }\nif (sizelog==undefined){\n  sizelog=\"\";\n  }\n  if (sizeL==undefined){\n  sizeL=true; //whether size is large\n  xSizeIron=1.75;\nxSizePla=1.75; //size of plastic\nsizeL=true; //whether size is large\nxSizeCoil=-2;\nxCoil=1;\nsizeRes=1;\n_view.comboBox2.setSelectedOptions([\"large\"]);\n  }\n  else if (sizeL==false) { //small\n   xSizeIron=1;\nxSizePla=1; //size of plastic\nsizeL=false; //whether size is large\nxSizeCoil=-1.25;\nxCoil=0.6;\nsizeRes=0.5; \n_view.comboBox2.setSelectedOptions([\"small\"]);\n    }\n  if (material==undefined){\n material=1; //whether size is large\n comboxSetCorrectly ()\n  \n  }\n  \n  \n   if (battDef==undefined){\n battDef=true; //whether size is large\n comboxSetCorrectly ()\n // battNo=1;\nvolt=2;\n  }\n  else if (battDef==false){\n battDef=false; //whether size is large\n comboxSetCorrectly ()\n  //battNo=1;\nvolt=0.5;\n_view.comboBox3.setSelectedOptions([\"Low\"]);\n  }\n\nif (battNo==undefined){\n  battNo =1;\n  \n  }\nif (coilNo==undefined){\n  coilNo = 3;\n  coilCounter=1\n // for (var i=0; i<100  ; i++) {\n  //yCoil = [0.5,-2,-4.5,-0.75,-3.25,-0.1,-1.3,-2.6,-3.9]\n//}\n  \n  }\n else if (coilNo==5){\n  coilNo = 5;\n  coilCounter=2\n // for (var i=0; i<100  ; i++) {\n  //yCoil = [0.5,-2,-4.5,-0.75,-3.25,-0.1,-1.3,-2.6,-3.9]\n//}\n  \n  }\n else if (coilNo==9){\n  coilNo = 9;\n  coilCounter=3\n // for (var i=0; i<100  ; i++) {\n  //yCoil = [0.5,-2,-4.5,-0.75,-3.25,-0.1,-1.3,-2.6,-3.9]\n//}\n  \n  }\n"
        },
        {
          "Name": "table",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "if (ppclog.length>1){\n  enableTable=true;\n  Width1=\"70%\";\n  Width2=\"30%\";\n  }\n"
        },
        {
          "Name": "tlmessage",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "if (_isMobile){\n  //do nothing\n  }\n  \n  else{\n    // copy this into the initialization\n// make the font bigger\n\n_view.plottingPanel.getMessageDecoration(\"TL\").getFont().setFontSize(\"1vw\");\n_view.plottingPanel.getMessageDecoration(\"TR\").getFont().setFontSize(\"1vw\");\n_view.plottingPanel.getMessageDecoration(\"BL\").getFont().setFontSize(\"1vw\");\n_view.plottingPanel.getMessageDecoration(\"BR\").getFont().setFontSize(\"1vw\");\n\n//_view.plottingPanel.getMessageDecoration(\"TL\").getStyle().setFillColor(\"red\");\n    }"
        }
      ]
    },
    "evolution": {
      "information": {
        "FPS": "20",
        "SPD": "1",
        "RealTimeVariable": "",
        "Autoplay": "false"
      },
      "pages": [
        {
          "Name": "Evol Page",
          "Active": "true",
          "Internal": "false",
          "Type": "ODE_EDITOR",
          "Comment": "",
          "IndependentVariable": "t",
          "Increment": "dt",
          "Equations": [
            {
              "state": "",
              "rate": ""
            }
          ],
          "Method": "RungeKutta",
          "AbsoluteTolerance": "0.00001",
          "PreliminaryCode": {
            "Code": "",
            "Comment": "Code to be executed before rate equations are evaluated"
          },
          "EventMaximumStep": "",
          "Events": {
            "pages": []
          },
          "ZenoEffect": {
            "Code": "",
            "Comment": "",
            "StopAfterEffect": "true"
          },
          "AccelerationIndependentOfVelocity": "false",
          "ForceSynchronization": "false",
          "UseBestInterpolation": "false",
          "EstimateFirstStep": "false",
          "MemoryLength": "",
          "InternalStep": "",
          "MaximumStep": "",
          "MaximumNumberOfSteps": "10000",
          "RelativeTolerance": "",
          "DelayList": "",
          "DelayMaximum": "",
          "DelayAddDiscont": "",
          "DelayInitialCondition": {
            "Code": "",
            "Comment": ""
          },
          "DirectIncidenceMatrix": "",
          "Discontinuities": {
            "pages": []
          },
          "ErrorHandling": {
            "pages": []
          }
        }
      ]
    },
    "fixed_relations": {
      "pages": [
        {
          "Name": "FixRel Page",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "if (battNo==5){\n  voltage = 4*volt*coilRes*sizeRes;\n  }\nelse {\n  voltage = battNo*volt*coilRes*sizeRes;\n  }\n\nif (pickupstate==true){\n  paperclipno = magnetism() + 1;\n  }\n  \nhint = hints();\nhintt = hint2();\n/*\nif (captured==true&&yIron<-3){\n  disabled=true;\n  }\n*/\n\nif (open==false){\n  disabled=true;\n  }\nelse {\n  disabled=false;\n  }\n\nlogline = \"No. Of Paperclips : \\n Attracted \\n No. of Batteries : \\nNo. of Coils : \\nMaterial Type : \\nSize :\"\nppctil = \"No. of paper \\n clips attracted\";\nbatttil = \"No. of \\nbatteries \\n(F/L)\";\ncoiltil = \"No. of \\n coils\";\nmattil = \"material \\n type\";\nsizetil = \" size\";\n/*\nif (pickupstate==true&&yIron>=-2){\n    loginfo=loginfo + \"\\n\" + paperclipno + battNo + coilNo;\n    }\n*/\n"
        }
      ]
    },
    "custom": {
      "pages": [
        {
          "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": "magnetism",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function magnetism () {\n  if (voltage<1.6){\n    return -1\n    }\n  if (voltage <3.2 && voltage>=1.6){\n    return 0\n    }\n  if (voltage <4.8 && voltage >=3.2){\n    return 1\n    }\n  if (voltage <6.4 && voltage>=4.8){\n    return 2\n    }\n  if (voltage <8 && voltage>=6.4){\n    return 3\n    }\n  if (voltage>=8){\n    return 4\n    }\n}\n\n/*\nvoltage\n0-1.6\n1.6-3.2\n3.2-4.8\n4.8-6.4\n6.4-8\n8onwards\n*/\n"
        },
        {
          "Name": "initializeCatenary",
          "Active": "false",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function initializeCatenary () {\n//  chainSag solver not avaliable in EJSS but is in EJS \n  //var a=chainSag.solve(100,amin,amax);  // find optimum sag parameter\n  //_println(\"a=\"+a);\n  var offset=odd?1:0;\n  for(var i=0, j=nCat-1; i<nCat-1; i++,j--) {\n    phi[i]=Math.atan2(yCat[j-1]-yCat[j],xCat[j]-xCat[j-1]);\n    phi[nCat+i-1+offset]=Math.atan2(yCat[i+1]-yCat[i],xCat[i+1]-xCat[i]);\n    phiDot[i]=0;\n    phiDot[nCat+i-1+offset]=0;\n  }\n  if(odd) {\n    // center link was skipped in loop\n    phi[n/2]=0;\n    phiDot[n/2]=0;\n  }\n}"
        },
        {
          "Name": "linspace",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "//https://gist.github.com/joates/6584908\n// a is start\n// b is stop\n// n is number of them to space out in\nfunction linspace(a,b,n) {\n    if(typeof n === \"undefined\") n = Math.max(Math.round(b-a)+1,1);\n    if(n<2) { return n===1?[a]:[]; }\n    var i,ret = Array(n);\n    n--;\n    for(i=n;i>=0;i--) { ret[i] = (i*b+(n-i)*a)/n; }\n    return ret;\n}"
        },
        {
          "Name": "changeOrientation",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// code to be copied to EJSS source code under Custom and used in drawingPanel3D and plottingPanel2D\n// address the problem is height difference is iOS app , epub, and Firefox\n// user need to change only k and kepub\n// copy %changeOrientation()% into the Height Field of drawingPanel3D and plottingPanel2D\nfunction changeOrientation() {\n \nvar k =0.80 ; // k control height 1 is for full screen, 0.9 shorten etc\nvar kapple =0.90 // control apple app height\nvar kepub =0.90 ;\n// check platform for Apps\ntry { // allow code to run in Student Learning Space \n  var iOSapp =  (typeof parent.device != 'undefined' && parent.device.platform == \"iOS\");\n  var Androidapp = (typeof parent.device != 'undefined' && parent.device.platform == \"Android\");\n} catch(e) {\n  var iOSapp = false;\n  var Androidapp = false;\n}\n// check platform for web browsers\nvar iOS =/iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\nvar iPad =/iPad/.test(navigator.userAgent) && !window.MSStream;\nvar iPhone = /iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;\nvar Android= /Android|android/i.test(navigator.userAgent);\n\n//navigator\nvar Firefox = navigator.userAgent.indexOf(\"Firefox\") != -1;\n \nswitch (window.orientation) { // using window.orientation as deciding factor\n  case 0:\n  case 180:\n    this.screenOrientation = 'portrait';\n    if (iOSapp){ // does not seems to work\n      \n      return window.screen.height*kapple;  //0.1 for app and 0.1 for nonfullscreenapp  \n    \n    }\n    else if (_isEPub){ // does not seems to work\n      //   return Math.max(window.screen.width,window.screen.height)*0.9;\n      return window.innerHeight*kepub;  //0.1 for app and 0.1 for nonfullscreenapp  \n      // return window.screen.height;\n      //  return window.innerHeight;\n      // return document.documentElement.clientHeight;\n    }\n   \n    else {\n     \n      return 100*k+\"vh\";\n    }\n    break;\n  case 90:\n  case -90:\n    this.screenOrientation = 'landscape';\n \n    if (iOSapp){ // App\n      return window.screen.width*kapple;  \n      // return window.screen.height;\n      //  return window.innerHeight;\n      //  return document.documentElement.clientHeight;\n    }\n    else if (_isEPub){ // does not seems to work\n      //   return Math.max(window.screen.width,window.screen.height)*0.9;\n      return window.innerHeight*kepub;  //0.1 for app and 0.1 for nonfullscreenapp  \n      // return window.screen.height;\n      //  return window.innerHeight;\n      // return document.documentElement.clientHeight;\n    }\n   \n    else {\n      return 100*k+\"vh\";\n      }\n    break;\n  default:\n    this.screenOrientation = 'unknown';\n    //       return (iPad)?\"\"+(window.screen.width+window.screen.height)*0.4:((iPhone)?\"\"+window.screen.width:_view._format(window.innerHeight*0.9,\"0\"));\n     if (Firefox){\n      return window.innerHeight*k;// number as of 20180831 Firefox does not support vh yet so need a separate line to handle\n      }\n   //   else if (iOS&&(window.orientation==0)||(window.orientation==180)){\n   //   return  window.screen.height*k;// number as of 20180831 Firefox does not support vh yet so need a separate line to handle\n   //   }\n    //  else if (iOS&&(window.orientation==90)||(window.orientation==-90)){\n   //   return  window.screen.width*k;// number as of 20180831 Firefox does not support vh yet so need a separate line to handle\n   //   }\n      else {\n      //alert();\n      // return 100*k+\"%\"; // work on fullscreen works in EJSS6.0beta\n        //  works in EjsS_5.3_180131\n      return  window.innerHeight*k; // work on panel \n       \n}\n\n}\n \n}"
        },
        {
          "Name": "speech",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// copy this custom function\n// in iOS need to add speech to the play button as On iOS the API works but must be triggered by a user action callback, like a response to a tap event, to provide a better experience to users and avoid unexpected sounds out of your phone\nfunction speech (option) {\n\n\ntry { // allow code to run in Student Learning Space \nvar isCordova = (!!this.parent.cordova || !!window.cordova);\nif(isCordova) { // check it is running in Android or iOS\n       // parent.TTS.speak({text:option,locale:'zh-CN'});\n\tparent.TTS.speak({text:option,locale:'us-EN'});\n\t// parent.TTS.speak({text:option,locale:'en-US'});\n\t// parent.TTS.speak({text:option,locale:'id-ID'});\n} \n} \ncatch(e) {\n  var isCordova = false;\n  }\n  \n   var msg = new SpeechSynthesisUtterance(option);\n\n  //https://stackoverflow.com/questions/43983845/speechsynthesis-api-for-chinese-firefox\n  // Set the text.\n\t//msg.text = option; \n\t//https://forums.developer.apple.com/message/323564#323564\n\t// comment out the next 2 lines for english\n//msg.voice = speechSynthesis.getVoices().filter(function(voice) { return voice.name == 'Ting-Ting'; })[0];\n//msg.lang = 'zh-CH'; // need for android?\n//msg.lang = 'id-ID'; // need for android?\nmsg.lang = 'us-EN'; // need for android?\n\n//https://flaviocopes.com/speech-synthesis-api/\n//debug\n//console.log(`Voices #: ${speechSynthesis.getVoices().length}`)\n//speechSynthesis.getVoices().forEach(voice => {\n// console.log(voice.name, voice.lang)\n//})\n//debug\n\n// Queue this utterance.\nwindow.speechSynthesis.speak(msg);\n\n\n\n \n\n}"
        },
        {
          "Name": "hint1",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function hint1() { //hints for initial stages\n  if (open==true){\n    return \"Switch is open, press Play to close the circuit.\"\n    }\n  if (open==false && yIron>-8 && pickupstate==false && yPlastic>-8){\n    return \"Drag the rod closer to attract the paper clips.\"\n    }\n}"
        },
        {
          "Name": "hint2",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function hint2(){//hints for final stage to inform user to Press Reset button\n  if (captured==true){\n    return \"Click Reset Setup to choose a different set of variables\"\n    }\n  if (open==true){\n    return \"Feel free to change the variables\"\n    }\n  else {\n    return \"\"\n    }\n}"
        },
        {
          "Name": "hints",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function hints () { //to compile all the hints based on criteria\n  if (open==true){\n    return \"Switch is open, press Play to close the circuit.\"\n    }\n  if (open==false && yIron>-8 && pickupstate==false && yPlastic>-8 && captured==false){ // to inform user to move the rod closer\n    return \"Drag down the rod to attract the paper clips and \\nup to see the amount of paperclips attracted. \"\n    }\n  if (material==1){ //when the material is iron\n    if (pickupstate == true && paperclipno != 5){\n    return \"The rod has attracted \" + paperclipno + \" number of paper clips.\"\n      }\n    if (pickupstate == true && paperclipno == 5){\n      return \"The rod has reached its maximum magnetic strength.\"\n      }\n    if (open==false && battDef==false){\n      return \"The batteries are low, the electromagnet is weak.\"\n      }\n    if (open==false && voltage <1.6 || captured==false){\n      return \"The rod is not strong enough to attract any paper clips.\"\n      }\n    }\n  if (material==2){ //when the material is plastic\n    if (open==false){\n      return \"The rod is made out of plastic and it is not a magnetic material.\\nTherefore, it cannot attract any of the paper clips.\"\n      }\n    }\n}"
        },
        {
          "Name": "battType",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function battType(battDef) {\n  if (battDef==true){\n    return \"(F)\"\n    }\n  else {\n    return \"(L)\"\n    }\n}"
        },
        {
          "Name": "materialType",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function materialType(material) {\n  if (material==1){\n    return \"Iron\"\n    }\n  if (material==2){\n    return \"Plastic\"\n    }\n}"
        },
        {
          "Name": "sizeType",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "function sizeType (sizeL) {\n  if (sizeL==true){\n    return \"L\"\n    }\n  if (sizeL==false){\n    return \"S\"\n    }\n}"
        },
        {
          "Name": "comboxSet",
          "Active": "true",
          "Internal": "false",
          "Type": "LIBRARY_EDITOR",
          "Comment": "",
          "Code": "// placed at reset setup button and init undefined to capture all use cases\nfunction comboxSetCorrectly () {\nif (material==1){\n_view.comboBox.setSelectedOptions([\"iron\"]);\n}\nelse if (material==2){\n_view.comboBox.setSelectedOptions([\"plastic\"]);\n}\n\n\nif (sizeL==true){\n_view.comboBox2.setSelectedOptions([\"large\"]);\n}\nelse if (sizeL==false){\n_view.comboBox2.setSelectedOptions([\"small\"]);\n}\n\nif (battDef==true){\n\n_view.comboBox3.setSelectedOptions([\"Full\"]);\n}\nelse if (battDef==false){\n\n_view.comboBox3.setSelectedOptions([\"Low\"]);\n}\n\n\n}\n"
        }
      ]
    },
    "elements": {
      "list": []
    }
  },
  "view": {
    "Tree": [
      {
        "Name": "fullscreen",
        "Type": "Panel",
        "Expanded": "true",
        "Properties": [
          {
            "name": "Width",
            "value": "Width"
          }
        ],
        "Children": [
          {
            "Name": "control",
            "Type": "Panel",
            "Expanded": "true",
            "Properties": [
              {
                "name": "Background",
                "value": "\"rgba(192,235,255,1)\""
              },
              {
                "name": "BorderColor",
                "value": "\"black\""
              },
              {
                "name": "BorderWidth",
                "value": "1"
              },
              {
                "name": "Font",
                "value": "font"
              }
            ],
            "Children": [
              {
                "Name": "inlienflex",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Width",
                    "value": "\"100%\""
                  },
                  {
                    "name": "Display",
                    "value": "\"inline-flex\""
                  }
                ],
                "Children": [
                  {
                    "Name": "coils2",
                    "Type": "Panel",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"DarkGray\""
                      },
                      {
                        "name": "Width",
                        "value": "\"50%\""
                      },
                      {
                        "name": "Display",
                        "value": "\"block\""
                      }
                    ],
                    "Children": [
                      {
                        "Name": "coils3",
                        "Type": "Label",
                        "Properties": [
                          {
                            "name": "Text",
                            "value": "\"no. of coils =\" + coilNo"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      },
                      {
                        "Name": "slider2",
                        "Type": "Slider",
                        "Properties": [
                          {
                            "name": "Minimum",
                            "value": "1"
                          },
                          {
                            "name": "Maximum",
                            "value": "3"
                          },
                          {
                            "name": "Value",
                            "value": "coilCounter"
                          },
                          {
                            "name": "OnChange",
                            "value": "if (coilCounter==1){\n  coilNo=3;\n  coilRes=0.75;\n  }\nelse if (coilCounter==2){\n  coilNo=5;\n  coilRes=1;\n  }\nelse if (coilCounter==3){\n  coilNo=9;\n  coilRes=1.25;\n  }\n  \n"
                          },
                          {
                            "name": "Step",
                            "value": "1"
                          },
                          {
                            "name": "Disabled",
                            "value": "disabled"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "typeofrods",
                    "Type": "Panel",
                    "Expanded": "false",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"LightGray\""
                      },
                      {
                        "name": "Width",
                        "value": "\"25%\""
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      },
                      {
                        "name": "Display",
                        "value": "\"none\""
                      }
                    ],
                    "Children": [
                      {
                        "Name": "rodText2",
                        "Type": "Label",
                        "Properties": [
                          {
                            "name": "TextAlign",
                            "value": "\"center\""
                          },
                          {
                            "name": "Text",
                            "value": "\"material of rod: \""
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      },
                      {
                        "Name": "comboBox",
                        "Type": "ComboBox",
                        "Properties": [
                          {
                            "name": "Options",
                            "value": "[\"iron\",\"plastic\"]"
                          },
                          {
                            "name": "OnChange",
                            "value": "var opts = _view.comboBox.getProperty(\"SelectedOptions\");  // array of options\n    var option = (opts.length > 0)? opts[0]:\"\"; // selected option \n\nif (option==\"iron\"){\n  material=1;\n  }\nelse if (option==\"plastic\"){\n  material=2;\n  }\n  \n"
                          },
                          {
                            "name": "Disabled",
                            "value": "disabled"
                          },
                          {
                            "name": "Width",
                            "value": "\"8vw\""
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      },
                      {
                        "Name": "typeofrodssize",
                        "Type": "Panel",
                        "Expanded": "false",
                        "Properties": [],
                        "Children": [
                          {
                            "Name": "SizeRod",
                            "Type": "Label",
                            "Properties": [
                              {
                                "name": "Text",
                                "value": "\"Size of rod:\""
                              },
                              {
                                "name": "Font",
                                "value": "font"
                              }
                            ]
                          },
                          {
                            "Name": "comboBox2",
                            "Type": "ComboBox",
                            "Properties": [
                              {
                                "name": "Options",
                                "value": "[\"large\",\"small\"]"
                              },
                              {
                                "name": "OnChange",
                                "value": "var opts = _view.comboBox2.getProperty(\"SelectedOptions\");  // array of options\n    var option = (opts.length > 0)? opts[0]:\"\"; // selected option \n\nif (option==\"small\"){\n  xSizeIron=1;\nxSizePla=1; //size of plastic\nsizeL=false; //whether size is large\nxSizeCoil=-1.25;\nxCoil=0.6;\nsizeRes=0.5;\n  }\nelse if (option==\"large\"){\n  xSizeIron=1.75;\nxSizePla=1.75; //size of plastic\nsizeL=true; //whether size is large\nxSizeCoil=-2;\nxCoil=1;\nsizeRes=1;\n  }\n  \n"
                              },
                              {
                                "name": "Disabled",
                                "value": "disabled"
                              },
                              {
                                "name": "Width",
                                "value": "\"8vw\""
                              },
                              {
                                "name": "Font",
                                "value": "font"
                              }
                            ]
                          },
                          {
                            "Name": "small",
                            "Type": "RadioButton",
                            "Properties": [
                              {
                                "name": "Text",
                                "value": "\"Small\""
                              },
                              {
                                "name": "Disabled",
                                "value": "disabled"
                              },
                              {
                                "name": "OnCheckOn",
                                "value": "xSizeIron=1;\nxSizePla=1; //size of plastic\nsizeL=false; //whether size is large\nxSizeCoil=-1.25;\nxCoil=0.6;\nsizeRes=0.5;"
                              },
                              {
                                "name": "Display",
                                "value": "\"none\""
                              }
                            ]
                          },
                          {
                            "Name": "large",
                            "Type": "RadioButton",
                            "Properties": [
                              {
                                "name": "Checked",
                                "value": "true"
                              },
                              {
                                "name": "Text",
                                "value": "\"Large\""
                              },
                              {
                                "name": "Disabled",
                                "value": "disabled"
                              },
                              {
                                "name": "OnCheckOn",
                                "value": "xSizeIron=1.75;\nxSizePla=1.75; //size of plastic\nsizeL=true; //whether size is large\nxSizeCoil=-2;\nxCoil=1;\nsizeRes=1;"
                              },
                              {
                                "name": "Display",
                                "value": "\"none\""
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "battery",
                    "Type": "Panel",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "Background",
                        "value": "\"rgba(0,254,0,1.0)\""
                      },
                      {
                        "name": "Width",
                        "value": "\"50%\""
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      },
                      {
                        "name": "Display",
                        "value": "\"inline-block\""
                      }
                    ],
                    "Children": [
                      {
                        "Name": "battText",
                        "Type": "Label",
                        "Properties": [
                          {
                            "name": "Text",
                            "value": "\"no. of batteries= \"+ _view._format(battNo,\"0\")"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      },
                      {
                        "Name": "slider",
                        "Type": "Slider",
                        "Properties": [
                          {
                            "name": "Minimum",
                            "value": "1"
                          },
                          {
                            "name": "Maximum",
                            "value": "5"
                          },
                          {
                            "name": "Value",
                            "value": "battNo"
                          },
                          {
                            "name": "OnChange",
                            "value": "/*if (battDef==true){\n  voltage=2*battNo;\n  }\nelse if (battDef==false){\n  voltage=0.5*battNo;\n  }\n*/"
                          },
                          {
                            "name": "Step",
                            "value": "1"
                          },
                          {
                            "name": "Disabled",
                            "value": "disabled"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "panel3",
                    "Type": "Panel",
                    "Expanded": "false",
                    "Properties": [
                      {
                        "name": "Width",
                        "value": "\"25%\""
                      },
                      {
                        "name": "Display",
                        "value": "\"none\""
                      }
                    ],
                    "Children": [
                      {
                        "Name": "battLevel",
                        "Type": "CheckBox",
                        "Properties": [
                          {
                            "name": "OnCheckOff",
                            "value": "battDef=true;\nbattNo=1;\nvoltage=2;\n\n"
                          },
                          {
                            "name": "Text",
                            "value": "\"Low Battery\""
                          },
                          {
                            "name": "OnCheckOn",
                            "value": "battDef=false;\nvoltage=0.5;\nbattNo=1;\n"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          },
                          {
                            "name": "Display",
                            "value": "\"none\""
                          }
                        ]
                      },
                      {
                        "Name": "battLevel2",
                        "Type": "Label",
                        "Properties": [
                          {
                            "name": "Text",
                            "value": "\"Battery level: \""
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      },
                      {
                        "Name": "comboBox3",
                        "Type": "ComboBox",
                        "Properties": [
                          {
                            "name": "Options",
                            "value": "[\"Full\",\"Low\"]"
                          },
                          {
                            "name": "OnChange",
                            "value": "var opts = _view.comboBox3.getProperty(\"SelectedOptions\");  // array of options\n    var option = (opts.length > 0)? opts[0]:\"\"; // selected option \n\nif (option==\"Full\"){\nbattDef=true;\nbattNo=1;\nvolt=2;\n  }\nelse if (option==\"Low\"){\n battDef=false;\nbattNo=1;\nvolt=0.5;\n  }\n  \n"
                          },
                          {
                            "name": "Disabled",
                            "value": "disabled"
                          },
                          {
                            "name": "Width",
                            "value": "\"8vw\""
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      },
                      {
                        "Name": "lowBatt2",
                        "Type": "RadioButton",
                        "Properties": [
                          {
                            "name": "Text",
                            "value": "\"Low\""
                          },
                          {
                            "name": "Disabled",
                            "value": "disabled"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          },
                          {
                            "name": "OnCheckOn",
                            "value": "battDef=false;\nbattNo=1;\nvolt=0.5;"
                          },
                          {
                            "name": "Display",
                            "value": "\"none\""
                          }
                        ]
                      },
                      {
                        "Name": "fullBatt2",
                        "Type": "RadioButton",
                        "Properties": [
                          {
                            "name": "Checked",
                            "value": "true"
                          },
                          {
                            "name": "Text",
                            "value": "\"Full\""
                          },
                          {
                            "name": "Disabled",
                            "value": "disabled"
                          },
                          {
                            "name": "OnCheckOn",
                            "value": "battDef=true;\nbattNo=1;\nvolt=2;"
                          },
                          {
                            "name": "Display",
                            "value": "\"none\""
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "controlPanel",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Width",
                    "value": "\"100%\""
                  },
                  {
                    "name": "Display",
                    "value": "\"inline-flex\""
                  }
                ],
                "Children": [
                  {
                    "Name": "playPauseButton2",
                    "Type": "TwoStateButton",
                    "Properties": [
                      {
                        "name": "OffClick",
                        "value": "_pause();\n//speech (\"paused\");\nopen=true;\n"
                      },
                      {
                        "name": "TextOn",
                        "value": "\"Play \u25b6\""
                      },
                      {
                        "name": "State",
                        "value": "_isPaused"
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"Play/Pause\""
                      },
                      {
                        "name": "TextOff",
                        "value": "\"Pause \u275a\u275a\""
                      },
                      {
                        "name": "Disabled",
                        "value": "disabled"
                      },
                      {
                        "name": "Width",
                        "value": "\"25%\""
                      },
                      {
                        "name": "OnClick",
                        "value": "_play();\n//speech (\"play\");\nopen=false;\n"
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "resetButton3",
                    "Type": "Button",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "\"Reset Setup \u21bb\""
                      },
                      {
                        "name": "Width",
                        "value": "\"25%\""
                      },
                      {
                        "name": "OnClick",
                        "value": "_reset();\ncomboxSetCorrectly ()\n//speechzh (\"\u4f60\u597d\");\n"
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      }
                    ]
                  },
                  {
                    "Name": "resettable",
                    "Type": "Button",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "\"Reset Table \u21bb\""
                      },
                      {
                        "name": "OnPress",
                        "value": "ppclog = \"\";\nbattlog = \"\";\ncoillog = \"\";\nmatlog = \"\";\nsizelog = \"\";\n"
                      },
                      {
                        "name": "Width",
                        "value": "\"25%\""
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      },
                      {
                        "name": "Display",
                        "value": "enableTable==true? \"inline-block\":\"none\""
                      }
                    ]
                  },
                  {
                    "Name": "enabletable",
                    "Type": "CheckBox",
                    "Properties": [
                      {
                        "name": "Checked",
                        "value": "enableTable"
                      },
                      {
                        "name": "OnCheckOff",
                        "value": "enableTable=false;\nWidth1=\"100%\";\nWidth2=\"0%\";\n"
                      },
                      {
                        "name": "Text",
                        "value": "\"Enable Data Logger\""
                      },
                      {
                        "name": "Width",
                        "value": "\"25%\""
                      },
                      {
                        "name": "OnCheckOn",
                        "value": "enableTable=true;\nWidth1=\"70%\";\nWidth2=\"30%\";"
                      }
                    ]
                  },
                  {
                    "Name": "stepButton2",
                    "Type": "Button",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "\"|\u25ba\""
                      },
                      {
                        "name": "OnClick",
                        "value": "_step()"
                      },
                      {
                        "name": "Font",
                        "value": "font"
                      },
                      {
                        "name": "Display",
                        "value": "\"none\""
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "Name": "panel2",
            "Type": "Panel",
            "Expanded": "true",
            "Properties": [],
            "Children": [
              {
                "Name": "plottingPanel",
                "Type": "PlottingPanel",
                "Expanded": "false",
                "Properties": [
                  {
                    "name": "Gutters",
                    "value": "[0,0,0,0]"
                  },
                  {
                    "name": "ShowAreaRectangle",
                    "value": "false"
                  },
                  {
                    "name": "YScalePrecision",
                    "value": "0"
                  },
                  {
                    "name": "XFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "OnDoubleClick",
                    "value": "toggleFullScreen();"
                  },
                  {
                    "name": "AxisXShow",
                    "value": "false"
                  },
                  {
                    "name": "YFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "TRMessage",
                    "value": "hintt"
                  },
                  {
                    "name": "XTickStep",
                    "value": "1"
                  },
                  {
                    "name": "YTickStep",
                    "value": "1"
                  },
                  {
                    "name": "XAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "Height",
                    "value": "%changeOrientation()%"
                  },
                  {
                    "name": "OnPress",
                    "value": "var position = _view.plottingPanel.getInteraction().getInteractionPoint();\n"
                  },
                  {
                    "name": "GridXShow",
                    "value": "false"
                  },
                  {
                    "name": "Width",
                    "value": "Width1"
                  },
                  {
                    "name": "TLMessage",
                    "value": "hint"
                  },
                  {
                    "name": "Enabled",
                    "value": "true"
                  },
                  {
                    "name": "SquareAspect",
                    "value": "true"
                  },
                  {
                    "name": "MaximumY",
                    "value": "10"
                  },
                  {
                    "name": "MaximumX",
                    "value": "scaleX2"
                  },
                  {
                    "name": "YAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "GridYShow",
                    "value": "false"
                  },
                  {
                    "name": "MinimumX",
                    "value": "scaleX1"
                  },
                  {
                    "name": "MinimumY",
                    "value": "-10"
                  },
                  {
                    "name": "AxisYShow",
                    "value": "false"
                  },
                  {
                    "name": "AutoScaleY",
                    "value": "false"
                  },
                  {
                    "name": "AutoScaleX",
                    "value": "false"
                  },
                  {
                    "name": "Visibility",
                    "value": "world===true"
                  },
                  {
                    "name": "XScalePrecision",
                    "value": "0"
                  },
                  {
                    "name": "Display",
                    "value": "\"inline-block\""
                  }
                ],
                "Children": [
                  {
                    "Name": "labels",
                    "Type": "Group2D",
                    "Expanded": "false",
                    "Properties": [],
                    "Children": [
                      {
                        "Name": "battArrow",
                        "Type": "Segment2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "1"
                          },
                          {
                            "name": "X",
                            "value": "0"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"rgb(248,140,123,1.0)\""
                          },
                          {
                            "name": "Y",
                            "value": "7"
                          },
                          {
                            "name": "SizeY",
                            "value": "-1"
                          },
                          {
                            "name": "LineWidth",
                            "value": "1"
                          }
                        ]
                      },
                      {
                        "Name": "battText2",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"rgb(248,140,123,1.0)\""
                          },
                          {
                            "name": "X",
                            "value": "1.7"
                          },
                          {
                            "name": "Y",
                            "value": "5.5"
                          },
                          {
                            "name": "Text",
                            "value": "\"battery\""
                          },
                          {
                            "name": "Font",
                            "value": "\"normal normal 25px \\\"Comic Sans MS\\\", cursive, sans-serif\""
                          }
                        ]
                      },
                      {
                        "Name": "switchArrow2",
                        "Type": "Segment2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "2"
                          },
                          {
                            "name": "X",
                            "value": "11.5"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"rgb(248,140,123,1.0)\""
                          },
                          {
                            "name": "Y",
                            "value": "4"
                          },
                          {
                            "name": "Visibility",
                            "value": "open==false"
                          },
                          {
                            "name": "SizeY",
                            "value": "2"
                          },
                          {
                            "name": "LineWidth",
                            "value": "1"
                          }
                        ]
                      },
                      {
                        "Name": "switchArrow",
                        "Type": "Segment2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "1.5"
                          },
                          {
                            "name": "X",
                            "value": "12"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"rgb(248,140,123,1.0)\""
                          },
                          {
                            "name": "Y",
                            "value": "4"
                          },
                          {
                            "name": "Visibility",
                            "value": "open==true"
                          },
                          {
                            "name": "SizeY",
                            "value": "2"
                          },
                          {
                            "name": "LineWidth",
                            "value": "1"
                          }
                        ]
                      },
                      {
                        "Name": "switchText",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"rgb(248,140,123,1.0)\""
                          },
                          {
                            "name": "X",
                            "value": "13.5"
                          },
                          {
                            "name": "Y",
                            "value": "6.25"
                          },
                          {
                            "name": "Text",
                            "value": "\"switch\""
                          },
                          {
                            "name": "Font",
                            "value": "\"normal normal 23px \\\"Comic Sans MS\\\", cursive, sans-serif\""
                          }
                        ]
                      },
                      {
                        "Name": "rodArrow2",
                        "Type": "Segment2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "5"
                          },
                          {
                            "name": "X",
                            "value": "xPlastic"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"rgb(248,140,123,1.0)\""
                          },
                          {
                            "name": "Y",
                            "value": "yPlastic+ySizePla/2"
                          },
                          {
                            "name": "Visibility",
                            "value": "material==2"
                          },
                          {
                            "name": "SizeY",
                            "value": "0"
                          },
                          {
                            "name": "LineWidth",
                            "value": "1"
                          },
                          {
                            "name": "Offset",
                            "value": "\"SOUTH_WEST\""
                          }
                        ]
                      },
                      {
                        "Name": "rodArrow",
                        "Type": "Segment2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "5"
                          },
                          {
                            "name": "X",
                            "value": "xIron"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"rgb(248,140,123,1.0)\""
                          },
                          {
                            "name": "Y",
                            "value": "yIron+ySizeIron/2"
                          },
                          {
                            "name": "Visibility",
                            "value": "material==1"
                          },
                          {
                            "name": "SizeY",
                            "value": "0"
                          },
                          {
                            "name": "LineWidth",
                            "value": "1"
                          },
                          {
                            "name": "Offset",
                            "value": "\"SOUTH_WEST\""
                          }
                        ]
                      },
                      {
                        "Name": "paperArrow",
                        "Type": "Segment2D",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "3"
                          },
                          {
                            "name": "X",
                            "value": "1"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"rgb(248,140,123,1.0)\""
                          },
                          {
                            "name": "Y",
                            "value": "-9"
                          },
                          {
                            "name": "SizeY",
                            "value": "1"
                          },
                          {
                            "name": "LineWidth",
                            "value": "1"
                          }
                        ]
                      },
                      {
                        "Name": "paperText",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"rgb(248,140,123,1.0)\""
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"WEST\""
                          },
                          {
                            "name": "X",
                            "value": "4.25"
                          },
                          {
                            "name": "Y",
                            "value": "-7.75"
                          },
                          {
                            "name": "Text",
                            "value": "\"paper clips (copper/steel)\""
                          },
                          {
                            "name": "Font",
                            "value": "\"normal normal 25px \\\"Comic Sans MS\\\", cursive, sans-serif\""
                          }
                        ]
                      },
                      {
                        "Name": "noPaperclip",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "RelativePosition",
                            "value": "\"CENTERED\""
                          },
                          {
                            "name": "X",
                            "value": "-16.5"
                          },
                          {
                            "name": "Y",
                            "value": "0"
                          },
                          {
                            "name": "Text",
                            "value": "\"no. of paper clips \\n attracted = \"+ paperclipno"
                          },
                          {
                            "name": "Visibility",
                            "value": "false"
                          },
                          {
                            "name": "Font",
                            "value": "\"normal normal 2vw \\\"Comic Sans MS\\\", cursive, sans-serif\""
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "electromagnet",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [],
                    "Children": [
                      {
                        "Name": "wires1",
                        "Type": "Group2D",
                        "Expanded": "false",
                        "Properties": [
                          {
                            "name": "Visibility",
                            "value": "material==1"
                          }
                        ],
                        "Children": [
                          {
                            "Name": "right_wire",
                            "Type": "Polygon2D",
                            "Properties": [
                              {
                                "name": "Points",
                                "value": "[[11,3.5],[10,3.5],[10,1],[xIron+xSizeIron/2,yIron+5.5]]"
                              },
                              {
                                "name": "LineColor",
                                "value": "\"Black\""
                              },
                              {
                                "name": "LineWidth",
                                "value": "3"
                              }
                            ]
                          },
                          {
                            "Name": "left_wire",
                            "Type": "Polygon2D",
                            "Properties": [
                              {
                                "name": "Points",
                                "value": "[[10.5,6],[10,6],[10,8],[-10,8],[-10,1.5],[-5.5,1.5],[-5.5,-5],[xIron-xSizeIron/2,yIron+0.7]]"
                              },
                              {
                                "name": "LineColor",
                                "value": "\"Black\""
                              },
                              {
                                "name": "LineWidth",
                                "value": "3"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "Name": "wires2",
                        "Type": "Group2D",
                        "Expanded": "false",
                        "Properties": [
                          {
                            "name": "Visibility",
                            "value": "material==2"
                          }
                        ],
                        "Children": [
                          {
                            "Name": "right_wire2",
                            "Type": "Polygon2D",
                            "Properties": [
                              {
                                "name": "Points",
                                "value": "[[11,3.5],[10,3.5],[10,1],[xPlastic+xSizePla/2,yPlastic+5.5]]"
                              },
                              {
                                "name": "LineColor",
                                "value": "\"Black\""
                              },
                              {
                                "name": "LineWidth",
                                "value": "3"
                              }
                            ]
                          },
                          {
                            "Name": "left_wire2",
                            "Type": "Polygon2D",
                            "Properties": [
                              {
                                "name": "Points",
                                "value": "[[10.5,6],[10,6],[10,8],[-10,8],[-10,1.5],[-5.5,1.5],[-5.5,-5],[xPlastic-xSizePla/2,yPlastic+0.7]]"
                              },
                              {
                                "name": "LineColor",
                                "value": "\"Black\""
                              },
                              {
                                "name": "LineWidth",
                                "value": "3"
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "Name": "rods",
                        "Type": "Group2D",
                        "Expanded": "true",
                        "Properties": [],
                        "Children": [
                          {
                            "Name": "plastic",
                            "Type": "Group2D",
                            "Expanded": "false",
                            "Properties": [
                              {
                                "name": "Visibility",
                                "value": "material==2"
                              }
                            ],
                            "Children": [
                              {
                                "Name": "plasticRod",
                                "Type": "Shape2D",
                                "Properties": [
                                  {
                                    "name": "FillColor",
                                    "value": "\"rgba(128,230,255,1)\""
                                  },
                                  {
                                    "name": "RelativePosition",
                                    "value": "\"SOUTH\""
                                  },
                                  {
                                    "name": "ShapeType",
                                    "value": "\"RECTANGLE\""
                                  },
                                  {
                                    "name": "OnDrag",
                                    "value": "if (yPlastic<=-10){\n  yPlastic=-10;\n  }\n"
                                  },
                                  {
                                    "name": "OnRelease",
                                    "value": "if (captured==false && open==false){\n  loginfo=loginfo + \"\\n\" + paperclipno + \"\\n\" + \"\\n\" +battNo + \"\\n\" +coilNo + \"\\n\" +materialType(material) + \"\\n\" +sizeType(sizeL);\n  ppclog = ppclog + \"\\n\" + paperclipno;\n  battlog = battlog + \"\\n\" + battNo + battType(battDef);\n  coillog = coillog + \"\\n\" + coilNo;\n  matlog = matlog + \"\\n\" + materialType(material);\n  sizelog = sizelog + \"\\n\" + sizeType(sizeL);\n  captured=true;\n}\n"
                                  },
                                  {
                                    "name": "Sensitivity",
                                    "value": "0"
                                  },
                                  {
                                    "name": "SizeX",
                                    "value": "xSizePla"
                                  },
                                  {
                                    "name": "X",
                                    "value": "xPlastic"
                                  },
                                  {
                                    "name": "LineColor",
                                    "value": "\"black\""
                                  },
                                  {
                                    "name": "Y",
                                    "value": "yPlastic"
                                  },
                                  {
                                    "name": "OnPress",
                                    "value": "_play();\n//speech (\"play\");\nopen=false;"
                                  },
                                  {
                                    "name": "SizeY",
                                    "value": "ySizePla"
                                  },
                                  {
                                    "name": "LineWidth",
                                    "value": "1.5"
                                  },
                                  {
                                    "name": "EnabledPosition",
                                    "value": "\"ENABLED_Y\""
                                  }
                                ]
                              },
                              {
                                "Name": "rodText3",
                                "Type": "Text2D",
                                "Properties": [
                                  {
                                    "name": "FillColor",
                                    "value": "\"rgb(248,140,123,1.0)\""
                                  },
                                  {
                                    "name": "X",
                                    "value": "xPlastic+8"
                                  },
                                  {
                                    "name": "Y",
                                    "value": "yPlastic+ySizePla/2"
                                  },
                                  {
                                    "name": "Text",
                                    "value": "\"plastic rod\""
                                  },
                                  {
                                    "name": "Font",
                                    "value": "\"normal normal 25px \\\"Comic Sans MS\\\", cursive, sans-serif\""
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "Name": "iron",
                            "Type": "Group2D",
                            "Expanded": "true",
                            "Properties": [
                              {
                                "name": "Visibility",
                                "value": "material==1"
                              }
                            ],
                            "Children": [
                              {
                                "Name": "ironRodL",
                                "Type": "Shape2D",
                                "Properties": [
                                  {
                                    "name": "FillColor",
                                    "value": "\"white\""
                                  },
                                  {
                                    "name": "SizeX",
                                    "value": "-0.75"
                                  },
                                  {
                                    "name": "ShapeType",
                                    "value": "\"RECTANGLE\""
                                  },
                                  {
                                    "name": "X",
                                    "value": "-1.5"
                                  },
                                  {
                                    "name": "LineColor",
                                    "value": "\"black\""
                                  },
                                  {
                                    "name": "Y",
                                    "value": "-2"
                                  },
                                  {
                                    "name": "Visibility",
                                    "value": "false"
                                  },
                                  {
                                    "name": "SizeY",
                                    "value": "7"
                                  },
                                  {
                                    "name": "LineWidth",
                                    "value": "3"
                                  }
                                ]
                              },
                              {
                                "Name": "imageIron",
                                "Type": "Image2D",
                                "Properties": [
                                  {
                                    "name": "OnRelease",
                                    "value": "if (captured==false && open==false){\n  loginfo=loginfo + \"\\n\" + paperclipno + \"\\n\" + \"\\n\" +battNo + \"\\n\" +coilNo + \"\\n\" +materialType(material) + \"\\n\" +sizeType(sizeL);\n  ppclog = ppclog + \"\\n\" + paperclipno;\n  battlog = battlog + \"\\n\" + battNo + battType(battDef);\n  coillog = coillog + \"\\n\" + coilNo;\n  matlog = matlog + \"\\n\" + materialType(material);\n  sizelog = sizelog + \"\\n\" + sizeType(sizeL);\n  captured=true;\n}\n"
                                  },
                                  {
                                    "name": "Sensitivity",
                                    "value": "0"
                                  },
                                  {
                                    "name": "SizeX",
                                    "value": "xSizeIron"
                                  },
                                  {
                                    "name": "RelativePosition",
                                    "value": "\"SOUTH\""
                                  },
                                  {
                                    "name": "X",
                                    "value": "xIron"
                                  },
                                  {
                                    "name": "ImageUrl",
                                    "value": "\"./EMStrength/102950672-iron-texture-pattern-the-metal-plate-with-scuffed.jpg\""
                                  },
                                  {
                                    "name": "Y",
                                    "value": "yIron"
                                  },
                                  {
                                    "name": "Visibility",
                                    "value": "material==1"
                                  },
                                  {
                                    "name": "OnPress",
                                    "value": "_play();\n//speech (\"play\");\nopen=false;"
                                  },
                                  {
                                    "name": "SizeY",
                                    "value": "ySizeIron"
                                  },
                                  {
                                    "name": "EnabledPosition",
                                    "value": "\"ENABLED_Y\""
                                  },
                                  {
                                    "name": "OnDrag",
                                    "value": "// Ensure yIron does not go below the container's top edge (Y = -10)\nyIron = Math.max(yIron, -10);\n\nif (open==false && voltage >=1.6){\n  if (yIron <=-10+dy[0]){ // Condition for initial pickup, using dy[0] as a reference height\n    // Pickup logic\n    var numAttracted = magnetism() + 1;\n    for (var i = 0; i < n; i++) { // Iterate through all possible paperclips (n is total number of paperclips)\n      if (i < numAttracted) {\n        // If this paperclip should be attracted\n        theta[i] = pi/2; // Set vertical orientation\n        if (i === 0) {\n          // First paperclip attaches to the rod\n          x[i] = xIron + (Math.random() - 0.5) * xSizeIron * 0.5; // Slight random horizontal offset from rod center\n          y[i] = yIron - (dy[i] * 0 ); // Position below the rod, adjusted by 0 * height\n        } else if (i === 4) { // For the 5th clip (index 4)\n          y[i] = y[0]; // Set its y to be the same as the first clip\n\n          // Define the horizontal bounds of the iron rod\n          var rodLeftEdge = xIron - xSizeIron / 2;\n          var rodRightEdge = xIron + xSizeIron / 2;\n          var minSeparation = xSizeIron * 0.5; // Minimum horizontal distance from x[0]\n\n          do {\n            // Generate a random x within the rod's horizontal bounds\n            // (Math.random() * range) + min_value\n            x[i] = rodLeftEdge + Math.random() * xSizeIron;\n          } while (Math.abs(x[i] - x[0]) < minSeparation); // Keep re-randomizing if too close to x[0]\n\n        } else {\n          // Subsequent paperclips attach to the one above\n          x[i] = x[i-1] + (Math.random() - 0.5) * dx[i] * 0.2; // Slight random horizontal offset from previous clip\n          y[i] = y[i-1] - (dy[i] * 0.9 * 2); // Position below the previous clip, adjusted by 0.9 * 2 * height\n        }\n      } else {\n        // If this paperclip is not attracted, reset its position to the bottom\n        x[i] = linspace(-3,0,n)[i]; // Reset to initial lying down position\n        y[i] = linspace(-9.5,-9.5,n)[i]; // Reset to initial lying down position\n        theta[i] = 0; // Reset rotation\n      }\n    }\n    pickupstate = true;\n  }\n\n  // Move up with clips and bar\n  if (yIron > y[0] - dy[0] && pickupstate == true){\n    var numAttracted = magnetism() + 1;\n    for (var i = 0; i < numAttracted; i++) {\n      if (i === 0) {\n        y[i] = yIron - (dy[i] * 0.9 ); // First paperclip follows the rod, adjusted by 0.9 * height\n      } else if (i === 4) { // For the 5th clip (index 4)\n        y[i] = y[0]; // Maintain y same as first clip\n        // x[i] will retain its value from the pickup logic, no change needed here\n      } else {\n        y[i] = y[i-1] - (dy[i] * 0.9 *2); // Subsequent paperclips follow the one above, adjusted by 0.9 * height\n      }\n    }\n  }\n}\n\nif(yIron > -2){ // Keep this line to prevent dragging too far up\n  yIron=-2;\n}"
                                  }
                                ]
                              },
                              {
                                "Name": "rodText",
                                "Type": "Text2D",
                                "Properties": [
                                  {
                                    "name": "FillColor",
                                    "value": "\"rgb(248,140,123,1.0)\""
                                  },
                                  {
                                    "name": "X",
                                    "value": "xIron+7"
                                  },
                                  {
                                    "name": "Y",
                                    "value": "yIron+ySizeIron/2"
                                  },
                                  {
                                    "name": "Text",
                                    "value": "\"iron rod\""
                                  },
                                  {
                                    "name": "Font",
                                    "value": "\"normal normal 25px \\\"Comic Sans MS\\\", cursive, sans-serif\""
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "Name": "groupfollowdrag",
                            "Type": "Group2D",
                            "Expanded": "true",
                            "Properties": [
                              {
                                "name": "X",
                                "value": "xIron"
                              },
                              {
                                "name": "Y",
                                "value": "yIron"
                              },
                              {
                                "name": "Visibility",
                                "value": "material==1"
                              }
                            ],
                            "Children": [
                              {
                                "Name": "displacey",
                                "Type": "Group2D",
                                "Expanded": "true",
                                "Properties": [
                                  {
                                    "name": "Y",
                                    "value": "5"
                                  }
                                ],
                                "Children": [
                                  {
                                    "Name": "coils",
                                    "Type": "SegmentSet2D",
                                    "Properties": [
                                      {
                                        "name": "NumberOfElements",
                                        "value": "coilNo"
                                      },
                                      {
                                        "name": "Sensitivity",
                                        "value": "0"
                                      },
                                      {
                                        "name": "MovesGroup",
                                        "value": "true"
                                      },
                                      {
                                        "name": "SizeX",
                                        "value": "xSizeCoil"
                                      },
                                      {
                                        "name": "X",
                                        "value": "xCoil"
                                      },
                                      {
                                        "name": "Y",
                                        "value": "yCoil"
                                      },
                                      {
                                        "name": "SizeY",
                                        "value": "0.25"
                                      },
                                      {
                                        "name": "LineWidth",
                                        "value": "3"
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "Name": "groupfollowdrag2",
                            "Type": "Group2D",
                            "Expanded": "true",
                            "Properties": [
                              {
                                "name": "X",
                                "value": "xPlastic"
                              },
                              {
                                "name": "Y",
                                "value": "yPlastic"
                              },
                              {
                                "name": "Visibility",
                                "value": "material==2"
                              }
                            ],
                            "Children": [
                              {
                                "Name": "displacey2",
                                "Type": "Group2D",
                                "Expanded": "true",
                                "Properties": [
                                  {
                                    "name": "Y",
                                    "value": "5"
                                  }
                                ],
                                "Children": [
                                  {
                                    "Name": "coils4",
                                    "Type": "SegmentSet2D",
                                    "Properties": [
                                      {
                                        "name": "NumberOfElements",
                                        "value": "coilNo"
                                      },
                                      {
                                        "name": "Sensitivity",
                                        "value": "0"
                                      },
                                      {
                                        "name": "MovesGroup",
                                        "value": "true"
                                      },
                                      {
                                        "name": "SizeX",
                                        "value": "xSizeCoil"
                                      },
                                      {
                                        "name": "X",
                                        "value": "xCoil"
                                      },
                                      {
                                        "name": "Y",
                                        "value": "yCoil"
                                      },
                                      {
                                        "name": "SizeY",
                                        "value": "0.25"
                                      },
                                      {
                                        "name": "LineWidth",
                                        "value": "3"
                                      }
                                    ]
                                  }
                                ]
                              }
                            ]
                          },
                          {
                            "Name": "drag_unicode_symbol",
                            "Type": "Text2D",
                            "Properties": [
                              {
                                "name": "FontSize",
                                "value": "\"3vw\""
                              },
                              {
                                "name": "RelativePosition",
                                "value": "\"WEST\""
                              },
                              {
                                "name": "X",
                                "value": "xIron"
                              },
                              {
                                "name": "Y",
                                "value": "yIron+ySizeIron/2"
                              },
                              {
                                "name": "Text",
                                "value": "\"\ud83e\udd0f\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "Name": "switch",
                        "Type": "Group2D",
                        "Expanded": "true",
                        "Properties": [],
                        "Children": [
                          {
                            "Name": "press",
                            "Type": "Shape2D",
                            "Properties": [
                              {
                                "name": "OnRelease",
                                "value": "open=true;"
                              },
                              {
                                "name": "FillColor",
                                "value": "\"white\""
                              },
                              {
                                "name": "Sensitivity",
                                "value": "0"
                              },
                              {
                                "name": "SizeX",
                                "value": "2"
                              },
                              {
                                "name": "ShapeType",
                                "value": "\"RECTANGLE\""
                              },
                              {
                                "name": "X",
                                "value": "10"
                              },
                              {
                                "name": "LineColor",
                                "value": "\"black\""
                              },
                              {
                                "name": "Y",
                                "value": "4"
                              },
                              {
                                "name": "OnPress",
                                "value": "open=false;"
                              },
                              {
                                "name": "Visibility",
                                "value": "false"
                              },
                              {
                                "name": "SizeY",
                                "value": "2"
                              },
                              {
                                "name": "EnabledPosition",
                                "value": "\"ENABLED_NONE\""
                              }
                            ]
                          },
                          {
                            "Name": "top",
                            "Type": "Shape2D",
                            "Properties": [
                              {
                                "name": "FillColor",
                                "value": "\"black\""
                              },
                              {
                                "name": "SizeX",
                                "value": "1"
                              },
                              {
                                "name": "ShapeType",
                                "value": "\"ELLIPSE\""
                              },
                              {
                                "name": "X",
                                "value": "10"
                              },
                              {
                                "name": "Y",
                                "value": "5"
                              },
                              {
                                "name": "Visibility",
                                "value": "false"
                              },
                              {
                                "name": "SizeY",
                                "value": "1"
                              }
                            ]
                          },
                          {
                            "Name": "bottom",
                            "Type": "Shape2D",
                            "Properties": [
                              {
                                "name": "FillColor",
                                "value": "\"black\""
                              },
                              {
                                "name": "SizeX",
                                "value": "1"
                              },
                              {
                                "name": "ShapeType",
                                "value": "\"ELLIPSE\""
                              },
                              {
                                "name": "X",
                                "value": "10"
                              },
                              {
                                "name": "Y",
                                "value": "3"
                              },
                              {
                                "name": "Visibility",
                                "value": "false"
                              },
                              {
                                "name": "SizeY",
                                "value": "1"
                              }
                            ]
                          },
                          {
                            "Name": "open",
                            "Type": "Segment2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "1"
                              },
                              {
                                "name": "X",
                                "value": "10"
                              },
                              {
                                "name": "Y",
                                "value": "5"
                              },
                              {
                                "name": "Visibility",
                                "value": "false"
                              },
                              {
                                "name": "SizeY",
                                "value": "-2"
                              },
                              {
                                "name": "LineWidth",
                                "value": "3"
                              }
                            ]
                          },
                          {
                            "Name": "close",
                            "Type": "Segment2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "0"
                              },
                              {
                                "name": "X",
                                "value": "10"
                              },
                              {
                                "name": "Y",
                                "value": "5"
                              },
                              {
                                "name": "Visibility",
                                "value": "false"
                              },
                              {
                                "name": "SizeY",
                                "value": "-2"
                              },
                              {
                                "name": "LineWidth",
                                "value": "3"
                              }
                            ]
                          },
                          {
                            "Name": "openS",
                            "Type": "Image2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "1.4"
                              },
                              {
                                "name": "Rotate",
                                "value": "pi/8"
                              },
                              {
                                "name": "X",
                                "value": "11.5"
                              },
                              {
                                "name": "ImageUrl",
                                "value": "\"./EMStrength/switch.png\""
                              },
                              {
                                "name": "Y",
                                "value": "4.5"
                              },
                              {
                                "name": "Visibility",
                                "value": "open==true"
                              },
                              {
                                "name": "OnPress",
                                "value": "open=false"
                              },
                              {
                                "name": "SizeY",
                                "value": "-4"
                              },
                              {
                                "name": "EnabledPosition",
                                "value": "\"ENABLED_NO_MOVE\""
                              }
                            ]
                          },
                          {
                            "Name": "closeS",
                            "Type": "Image2D",
                            "Properties": [
                              {
                                "name": "SizeX",
                                "value": "1.4"
                              },
                              {
                                "name": "X",
                                "value": "11"
                              },
                              {
                                "name": "ImageUrl",
                                "value": "\"./EMStrength/switch.png\""
                              },
                              {
                                "name": "Y",
                                "value": "4.25"
                              },
                              {
                                "name": "Visibility",
                                "value": "open==false"
                              },
                              {
                                "name": "OnPress",
                                "value": "if (y[0] > -9.6 && y[0] < -9.4) { // Check if the first paperclip is at or below the container's Y position\n  open=true;\n}\n//open=true"
                              },
                              {
                                "name": "SizeY",
                                "value": "-4"
                              },
                              {
                                "name": "EnabledPosition",
                                "value": "\"ENABLED_NO_MOVE\""
                              }
                            ]
                          }
                        ]
                      },
                      {
                        "Name": "batteries2",
                        "Type": "Group2D",
                        "Expanded": "false",
                        "Properties": [],
                        "Children": [
                          {
                            "Name": "batteries",
                            "Type": "TextSet2D",
                            "Properties": [
                              {
                                "name": "NumberOfElements",
                                "value": "battNo"
                              },
                              {
                                "name": "Rotate",
                                "value": "pi/2"
                              },
                              {
                                "name": "X",
                                "value": "xBatt"
                              },
                              {
                                "name": "Y",
                                "value": "yBatt"
                              },
                              {
                                "name": "Text",
                                "value": "\"\ud83d\udd0b\""
                              },
                              {
                                "name": "Visibility",
                                "value": "false"
                              },
                              {
                                "name": "Font",
                                "value": "\"normal normal 6vw \""
                              }
                            ]
                          },
                          {
                            "Name": "fullBatt",
                            "Type": "ImageSet2D",
                            "Properties": [
                              {
                                "name": "NumberOfElements",
                                "value": "battNo"
                              },
                              {
                                "name": "SizeX",
                                "value": "3.25"
                              },
                              {
                                "name": "X",
                                "value": "xBatt"
                              },
                              {
                                "name": "ImageUrl",
                                "value": "\"./EMStrength/batt.png\""
                              },
                              {
                                "name": "Y",
                                "value": "yBatt"
                              },
                              {
                                "name": "Visibility",
                                "value": "battDef==true"
                              },
                              {
                                "name": "SizeY",
                                "value": "2.5"
                              }
                            ]
                          },
                          {
                            "Name": "lowBatt",
                            "Type": "ImageSet2D",
                            "Properties": [
                              {
                                "name": "NumberOfElements",
                                "value": "battNo"
                              },
                              {
                                "name": "SizeX",
                                "value": "3.25"
                              },
                              {
                                "name": "X",
                                "value": "xBatt"
                              },
                              {
                                "name": "Y",
                                "value": "yBatt"
                              },
                              {
                                "name": "ImageUrl",
                                "value": "\"./EMStrength/lowbatt.png\""
                              },
                              {
                                "name": "Visibility",
                                "value": "battDef==false"
                              },
                              {
                                "name": "SizeY",
                                "value": "2.5"
                              }
                            ]
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "container2",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [],
                    "Children": [
                      {
                        "Name": "container",
                        "Type": "Tank",
                        "Properties": [
                          {
                            "name": "SizeX",
                            "value": "8"
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"SOUTH\""
                          },
                          {
                            "name": "X",
                            "value": "-1.5"
                          },
                          {
                            "name": "Y",
                            "value": "-10"
                          },
                          {
                            "name": "SizeY",
                            "value": "2"
                          },
                          {
                            "name": "LineWidth",
                            "value": "3"
                          }
                        ]
                      },
                      {
                        "Name": "paperclipslyingdown",
                        "Type": "ShapeSet2D",
                        "Properties": [
                          {
                            "name": "NumberOfElements",
                            "value": "n"
                          },
                          {
                            "name": "SizeX",
                            "value": "dx"
                          },
                          {
                            "name": "Rotate",
                            "value": "theta"
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"ROUND_RECTANGLE\""
                          },
                          {
                            "name": "X",
                            "value": "x"
                          },
                          {
                            "name": "Y",
                            "value": "y"
                          },
                          {
                            "name": "Visibility",
                            "value": "false"
                          },
                          {
                            "name": "SizeY",
                            "value": "dy"
                          }
                        ]
                      },
                      {
                        "Name": "paperclipscentre",
                        "Type": "ShapeSet2D",
                        "Properties": [
                          {
                            "name": "NumberOfElements",
                            "value": "n"
                          },
                          {
                            "name": "FillColor",
                            "value": "\"Red\""
                          },
                          {
                            "name": "SizeX",
                            "value": "5"
                          },
                          {
                            "name": "X",
                            "value": "x"
                          },
                          {
                            "name": "Y",
                            "value": "y"
                          },
                          {
                            "name": "Visibility",
                            "value": "false"
                          },
                          {
                            "name": "SizeY",
                            "value": "5"
                          },
                          {
                            "name": "PixelSize",
                            "value": "true"
                          }
                        ]
                      },
                      {
                        "Name": "imageSet2",
                        "Type": "ImageSet2D",
                        "Properties": [
                          {
                            "name": "NumberOfElements",
                            "value": "4"
                          },
                          {
                            "name": "SizeX",
                            "value": "dj"
                          },
                          {
                            "name": "X",
                            "value": "[-4,-2.5,-1,1]"
                          },
                          {
                            "name": "Y",
                            "value": "-9.5"
                          },
                          {
                            "name": "ImageUrl",
                            "value": "\"./EMStrength/copperclip.png\""
                          },
                          {
                            "name": "SizeY",
                            "value": "dk"
                          }
                        ]
                      },
                      {
                        "Name": "imageSet",
                        "Type": "ImageSet2D",
                        "Properties": [
                          {
                            "name": "NumberOfElements",
                            "value": "n"
                          },
                          {
                            "name": "SizeX",
                            "value": "dx"
                          },
                          {
                            "name": "Rotate",
                            "value": "theta"
                          },
                          {
                            "name": "X",
                            "value": "x"
                          },
                          {
                            "name": "Y",
                            "value": "y"
                          },
                          {
                            "name": "ImageUrl",
                            "value": "\"./EMStrength/paperclip.png\""
                          },
                          {
                            "name": "SizeY",
                            "value": "dy"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "table",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "Visibility",
                        "value": "false"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "shape",
                        "Type": "Shape2D",
                        "Properties": [
                          {
                            "name": "FillColor",
                            "value": "\"LightGray\""
                          },
                          {
                            "name": "SizeX",
                            "value": "25"
                          },
                          {
                            "name": "RelativePosition",
                            "value": "\"SOUTH_WEST\""
                          },
                          {
                            "name": "ShapeType",
                            "value": "\"RECTANGLE\""
                          },
                          {
                            "name": "X",
                            "value": "20"
                          },
                          {
                            "name": "LineColor",
                            "value": "\"black\""
                          },
                          {
                            "name": "Y",
                            "value": "-10"
                          },
                          {
                            "name": "SizeY",
                            "value": "20"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          }
                        ]
                      },
                      {
                        "Name": "segmentSet",
                        "Type": "SegmentSet2D",
                        "Properties": [
                          {
                            "name": "NumberOfElements",
                            "value": "6"
                          },
                          {
                            "name": "SizeX",
                            "value": "25"
                          },
                          {
                            "name": "X",
                            "value": "20"
                          },
                          {
                            "name": "Y",
                            "value": "[7,3.5,0,-3,-5.5,-8]"
                          },
                          {
                            "name": "SizeY",
                            "value": "0"
                          },
                          {
                            "name": "LineWidth",
                            "value": "2"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "datalog",
                "Type": "PlottingPanel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Gutters",
                    "value": "[0,0,0,0]"
                  },
                  {
                    "name": "SquareAspect",
                    "value": "true"
                  },
                  {
                    "name": "AxisXShow",
                    "value": "false"
                  },
                  {
                    "name": "MaximumY",
                    "value": "14"
                  },
                  {
                    "name": "MaximumX",
                    "value": "6"
                  },
                  {
                    "name": "GridYShow",
                    "value": "false"
                  },
                  {
                    "name": "MinimumX",
                    "value": "-5"
                  },
                  {
                    "name": "MinimumY",
                    "value": "-5"
                  },
                  {
                    "name": "AxisYShow",
                    "value": "false"
                  },
                  {
                    "name": "AutoScaleY",
                    "value": "false"
                  },
                  {
                    "name": "AutoScaleX",
                    "value": "false"
                  },
                  {
                    "name": "Height",
                    "value": "%changeOrientation()%"
                  },
                  {
                    "name": "GridXShow",
                    "value": "false"
                  },
                  {
                    "name": "Width",
                    "value": "Width2"
                  },
                  {
                    "name": "Display",
                    "value": "enableTable==true?\"inline-block\":\"none\""
                  },
                  {
                    "name": "Background",
                    "value": "\"#66e0f0\""
                  }
                ],
                "Children": [
                  {
                    "Name": "dividers",
                    "Type": "SegmentSet2D",
                    "Properties": [
                      {
                        "name": "NumberOfElements",
                        "value": "3"
                      },
                      {
                        "name": "SizeX",
                        "value": "0"
                      },
                      {
                        "name": "X",
                        "value": "[0.7,4.5,8.3]"
                      },
                      {
                        "name": "Y",
                        "value": "-7"
                      },
                      {
                        "name": "SizeY",
                        "value": "25"
                      },
                      {
                        "name": "LineWidth",
                        "value": "2"
                      }
                    ]
                  },
                  {
                    "Name": "divide",
                    "Type": "Segment2D",
                    "Properties": [
                      {
                        "name": "SizeX",
                        "value": "16"
                      },
                      {
                        "name": "X",
                        "value": "-7.5"
                      },
                      {
                        "name": "Y",
                        "value": "11"
                      },
                      {
                        "name": "SizeY",
                        "value": "0"
                      },
                      {
                        "name": "LineWidth",
                        "value": "2"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Black\""
                      }
                    ]
                  },
                  {
                    "Name": "titles",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [],
                    "Children": [
                      {
                        "Name": "ppc2",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "RelativePosition",
                            "value": "\"SOUTH\""
                          },
                          {
                            "name": "X",
                            "value": "-2"
                          },
                          {
                            "name": "Y",
                            "value": "11.5"
                          },
                          {
                            "name": "Text",
                            "value": "%ppctil%"
                          },
                          {
                            "name": "Font",
                            "value": "font2"
                          }
                        ]
                      },
                      {
                        "Name": "batt2",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "RelativePosition",
                            "value": "\"SOUTH\""
                          },
                          {
                            "name": "X",
                            "value": "2.5"
                          },
                          {
                            "name": "Y",
                            "value": "11.5"
                          },
                          {
                            "name": "Text",
                            "value": "%batttil%"
                          },
                          {
                            "name": "Font",
                            "value": "font2"
                          }
                        ]
                      },
                      {
                        "Name": "coil2",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "RelativePosition",
                            "value": "\"SOUTH\""
                          },
                          {
                            "name": "X",
                            "value": "6"
                          },
                          {
                            "name": "Y",
                            "value": "11.5"
                          },
                          {
                            "name": "Text",
                            "value": "%coiltil%"
                          },
                          {
                            "name": "Font",
                            "value": "font2"
                          }
                        ]
                      }
                    ]
                  },
                  {
                    "Name": "data",
                    "Type": "Group2D",
                    "Expanded": "true",
                    "Properties": [
                      {
                        "name": "Y",
                        "value": "0.5"
                      }
                    ],
                    "Children": [
                      {
                        "Name": "ppc",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "RelativePosition",
                            "value": "\"NORTH\""
                          },
                          {
                            "name": "X",
                            "value": "-2.25"
                          },
                          {
                            "name": "Y",
                            "value": "11"
                          },
                          {
                            "name": "Text",
                            "value": "%ppclog%"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      },
                      {
                        "Name": "batt",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "RelativePosition",
                            "value": "\"NORTH\""
                          },
                          {
                            "name": "X",
                            "value": "2.6"
                          },
                          {
                            "name": "Y",
                            "value": "11"
                          },
                          {
                            "name": "Text",
                            "value": "%battlog%"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      },
                      {
                        "Name": "coil",
                        "Type": "Text2D",
                        "Properties": [
                          {
                            "name": "RelativePosition",
                            "value": "\"NORTH\""
                          },
                          {
                            "name": "X",
                            "value": "6.4"
                          },
                          {
                            "name": "Y",
                            "value": "11"
                          },
                          {
                            "name": "Text",
                            "value": "%coillog%"
                          },
                          {
                            "name": "Font",
                            "value": "font"
                          }
                        ]
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "panel",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "CSS",
                    "value": "{\"text-align\": \"left\"}"
                  },
                  {
                    "name": "Width",
                    "value": "Width2"
                  },
                  {
                    "name": "Display",
                    "value": "\"none\""
                  }
                ],
                "Children": [
                  {
                    "Name": "textArea",
                    "Type": "TextArea",
                    "Properties": [
                      {
                        "name": "Value",
                        "value": "%loginfo%"
                      },
                      {
                        "name": "Editable",
                        "value": "false"
                      },
                      {
                        "name": "Height",
                        "value": "400"
                      },
                      {
                        "name": "Width",
                        "value": "\"100%\""
                      },
                      {
                        "name": "Display",
                        "value": "\"inline-block\""
                      }
                    ]
                  },
                  {
                    "Name": "label",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "\"label\""
                      },
                      {
                        "name": "Display",
                        "value": "\"none\""
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "Name": "html",
            "Type": "Panel",
            "Properties": [
              {
                "name": "Html",
                "value": "<h2>Learning Outcomes</h2>\n<p>Explore how varying different parameters affects the strength of an electromagnet. This simulation is designed to provide hands-on experience with electromagnetic principles, enabling learners to understand and visualize the impact of each variable on magnet strength.</p>\n<h2>Description</h2>\n<p>This interactive simulation allows users to experiment with a rod that attracts paper clips. Set within a controlled environment, the simulation features a rod suspended above a mix of copper and steel paper clips. At the start, the switch is open with only one battery connected, energizing the large iron rod.</p>\n<p>Users can manipulate the rod\u2019s position to optimize the magnetic effect on the paper clips below. Additionally, the data logger function captures and displays the effects of different settings, offering a practical insight into electromagnetic theory.</p>\n<h3>Controllable Variables:</h3>\n<ul>\n    <li><strong>Number of Coils:</strong> Increase or decrease the coils around the rod to determine their effect on the magnet\u2019s strength.</li>\n    <li><del><strong>Rod Material:</strong> Choose between iron and plastic to observe how material influences magnetic capability.</del></li>\n    <li><del><strong>Rod Size:</strong> Toggle between small and large to explore how size impacts magnetic field strength.</del></li>\n    <li><strong>Number of Batteries:</strong> Adjust the count from 1 to 5 to see how battery strength affects magnetism.</li>\n    <li><del><strong>Battery Power:</strong> Modify from low to full to test how power levels affect the magnetic force.</del></li>\n    <li><strong>Circuit Switch:</strong> Operate as a closed or open circuit to engage or disengage the magnetic field.</li>\n</ul>\n<h2>Controls</h2>\n<ul>\n    <li><strong>Play/Pause Button:</strong> This control toggles the switch, activating or deactivating the circuit and thus the electromagnetic effect.</li>\n    <li><strong>Reset Setup Button:</strong> Resets all variables to their default settings, allowing for a fresh start with each experiment.</li>\n    <li><strong>Reset Data Button:</strong> Clears all data collected in the data logger, preparing the tool for new data capture without previous influence.</li>\n</ul>\n<p>This simulation provides an excellent platform for students to engage in active learning about electromagnetism, offering a clear visualization of theoretical concepts through practical application.</p>\n\n\n<h2>Other Resources</h2>\n<ul>\n    <li><a href=\"https://iwant2study.org/ospsg/index.php/973\" target=\"_blank\">Need a full version?</a></li>\n    <li><a href=\"https://iwant2study.org/ospsg/index.php/1120\" target=\"_blank\">Need a scaled down version with just number of coils and number of batteries?</a></li>\n    <li><a href=\"https://iwant2study.org/ospsg/index.php/interactive-resources/physics/05-electricity-and-magnetism/08-electromagnetism\" target=\"_blank\">Visit this for the larger list</a></li>\n</ul>"
              }
            ]
          }
        ]
      }
    ],
    "RootProperties": []
  },
  "metadata": {
    "APP": "WebEJS",
    "CreatedWith": "WebEJS : The web version of Easy JavaScript Simulations",
    "MoreInfo": "WebEJS 1.2",
    "version": "https://www.um.es/fem/wikis/webejs/"
  }
}