{
  "information": {
    "Title": "Optical Resolution and  Rayleigh criterion",
    "Author": [
      "Fu-Kwun Hwang",
      "lookang"
    ],
    "AuthorLogo": [
      "",
      ""
    ],
    "Password": "",
    "Keywords": "optical resolution",
    "Abstract": "Adapted for Ejs 4.0 by Bobby Mohr at Davidson College.",
    "Copyright": "",
    "Level": "intermediate",
    "Language": "English",
    "Logo": [
      "./OpticalResolution/logo.png"
    ],
    "RunAlways": "true",
    "ModelTab": "",
    "ModelTabTitle": "",
    "ModelName": "",
    "FixedNavigationBar": "false",
    "CSSFile": "",
    "DetectedFiles": [
      "./OpticalResolution/OpticalResolution.gif",
      "./OpticalResolution/OpticalResolution.html",
      "./OpticalResolution/logo.png",
      "./OpticalResolution/resoltuion.gif"
    ],
    "AuxiliaryFiles": [
      "./OpticalResolution/"
    ],
    "HTMLHead": "<script \nasync=\"true\" src=\"https://www.googletagmanager.com/gtag/js?id=G-S9EWRY1CPJ\"></script>\n<script>\n  window.dataLayer = window.dataLayer || [];\n  function gtag(){dataLayer.push(arguments);}\n  gtag('js', new Date());\n\n  gtag('config', 'G-S9EWRY1CPJ');\n</script>\n\n<script data-ad-client=\"ca-pub-0121577198857509\" async=\"true\" src=\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\"></script>",
    "SaveInXMLFormat": "false",
    "IncludeSource": "true",
    "IncludeLibrary": "true",
    "UglifyJS": "false",
    "PreviewFullModel": "false",
    "UseInterpreter": "true",
    "UseDeltaForODE": "false"
  },
  "description": {
    "pages": [
      {
        "Name": "OpticalResolution",
        "Active": "true",
        "Internal": "false",
        "Type": "DESCRIPTION_EDITOR",
        "Locale": "_default_",
        "Title": "OpticalResolution",
        "External": "true",
        "Code": "./OpticalResolution/OpticalResolution.html"
      }
    ]
  },
  "model": {
    "variables": {
      "pages": [
        {
          "Name": "coordinate",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "range",
              "Value": "0.2",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xmin",
              "Value": "-range/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xmax",
              "Value": "range/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "ymin",
              "Value": "-range/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "ymax",
              "Value": "range/2",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "size",
              "Value": "range/40",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "language",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "l_play",
              "Value": "\"play\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "l_pause",
              "Value": "\"pause\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "l_init",
              "Value": "\"initialize\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "l_xd",
              "Value": "\"Separation between light sources d =\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "l_D",
              "Value": "\"Diameter of the optics aperture a =\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "l_show",
              "Value": "\"show curves\"",
              "Type": "String",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "Var Table",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "nx",
              "Value": "300",
              "Type": "int",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "ny",
              "Value": "300",
              "Type": "int",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "I",
              "Value": "0",
              "Type": "double",
              "Dimension": "[nx][ny]",
              "Comment": " intensity of light at each point in the grid (x, y). It's a 2D array that stores the calculated light intensity based on diffraction patterns.",
              "Domain": "public"
            },
            {
              "Name": "lambda",
              "Value": "1e-7",
              "Type": "double",
              "Dimension": "",
              "Comment": "wavelength",
              "Domain": "public"
            },
            {
              "Name": "Dr",
              "Value": "294.986",
              "Type": "double",
              "Dimension": "",
              "Comment": "dimensionless scaling factor related to the diameter of the aperture. It modifies the aperture size relative to the wavelength.",
              "Domain": "public"
            },
            {
              "Name": "L",
              "Value": "10",
              "Type": "double",
              "Dimension": "",
              "Comment": "distance from the aperture to the observation screen or the plane where the diffraction pattern is observed",
              "Domain": "public"
            },
            {
              "Name": "D",
              "Value": "Dr*lambda",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "XP",
              "Value": "",
              "Type": "double",
              "Dimension": "[nx]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "YP",
              "Value": "",
              "Type": "double",
              "Dimension": "[nx]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "YP1",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "[nx]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "YP2",
              "Value": "0.0",
              "Type": "double",
              "Dimension": "[nx]",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "xd",
              "Value": "0.05",
              "Type": "double",
              "Dimension": "",
              "Comment": "distance between the two point sources of light in the simulation. This is a key parameter in diffraction calculations as it influences the interference pattern",
              "Domain": "public"
            },
            {
              "Name": "cta",
              "Value": "0.01",
              "Type": "double",
              "Dimension": "",
              "Comment": "angular parameter used in the simulation (could be short for constant or an angle like theta). Its specific role depends on how it\u2019s used in the calculation, potentially related to the aperture\u2019s properties or diffraction conditions.",
              "Domain": "public"
            },
            {
              "Name": "n",
              "Value": "50",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "yscale",
              "Value": "9",
              "Type": "double",
              "Dimension": "",
              "Comment": "1.5",
              "Domain": "public"
            },
            {
              "Name": "showCurves",
              "Value": "true",
              "Type": "boolean",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "null",
              "Domain": "public"
            }
          ]
        },
        {
          "Name": "lookang",
          "Active": "true",
          "Internal": "false",
          "Type": "VARIABLE_EDITOR",
          "PageComment": "",
          "Variables": [
            {
              "Name": "t",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "dt",
              "Value": "0.05",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "vxd",
              "Value": "0.1",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "theta",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "theta_min",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": "public"
            },
            {
              "Name": "theta_min_scientific ",
              "Value": "theta_min.toExponential();",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "theta1",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "theta2",
              "Value": "0",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "resolveText",
              "Value": "\"\"",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            },
            {
              "Name": "",
              "Value": "",
              "Type": "double",
              "Dimension": "",
              "Comment": "",
              "Domain": ""
            }
          ]
        }
      ]
    },
    "initialization": {
      "pages": [
        {
          "Name": "Init Page 2",
          "Active": "false",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "// Initialize I as a 2D array\nlet I = new Array(nx);\nfor (let i = 0; i < nx; i++) {\n  I[i] = new Array(ny); // Ensure each I[i] is an array with ny elements\n}"
        },
        {
          "Name": "Init Page",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "let dx = (xmax - xmin) / (nx - 1);\nfor (let i = 0; i < nx; i++) {\n  XP[i] = xmin + i * dx;\n}\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": "xd",
              "rate": "vxd"
            },
            {
              "state": "",
              "rate": ""
            }
          ],
          "Method": "RungeKutta",
          "AbsoluteTolerance": "0.00001",
          "PreliminaryCode": {
            "Code": "",
            "Comment": "Code to be executed before rate equations are evaluated"
          },
          "EventMaximumStep": "",
          "Events": {
            "pages": [
              {
                "Type": "EVENT_EDITOR",
                "Name": "Event",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "return xd - 0.1;",
                "Action": "vxd = -0.1",
                "Comment": ""
              },
              {
                "Type": "EVENT_EDITOR",
                "Name": "Event 2",
                "Active": "true",
                "Internal": "false",
                "EventType": "CROSSING_EVENT",
                "Method": "BISECTION",
                "Iterations": "100",
                "Tolerance": "1.0e-5",
                "StopAtEvent": "true",
                "ZeroCondition": "return xd - 0;",
                "Action": "vxd = 0.1",
                "Comment": ""
              }
            ]
          },
          "ZenoEffect": {
            "Code": "",
            "Comment": "",
            "StopAfterEffect": "true"
          },
          "AccelerationIndependentOfVelocity": "false",
          "ForceSynchronization": "false",
          "UseBestInterpolation": "false",
          "EstimateFirstStep": "false",
          "MemoryLength": "",
          "InternalStep": "",
          "MaximumStep": "",
          "MaximumNumberOfSteps": "10000",
          "RelativeTolerance": "",
          "DelayList": "",
          "DelayMaximum": "",
          "DelayAddDiscont": "",
          "DelayInitialCondition": {
            "Code": "",
            "Comment": ""
          },
          "DirectIncidenceMatrix": "",
          "Discontinuities": {
            "pages": []
          },
          "ErrorHandling": {
            "pages": []
          }
        }
      ]
    },
    "fixed_relations": {
      "pages": [
        {
          "Name": "Cons Page",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "let cst, alpha1, ratio1, ratio2, alpha2;\nlet dx = (xmax - xmin) / (nx - 1);\nlet dy = (ymax - ymin) / (ny - 1);\nlet x, y, r1, r2;\ncst = Math.PI * D / lambda;\nD = Dr * lambda;\n\n\n\n\n\n\n\n;\n// Rayleigh criterion: minimum angular separation\n//theta_min = 1.22 / Dr;\ntheta_min = 1.22 * lambda / (Dr *lambda);\ntheta_min_scientific  = theta_min.toExponential(3);\n\nvar factor = 5\nfor (let i = 0; i < nx; i++) {\n  x = XP[i];\n  for (let j = 0; j < ny; j++) {\n    y = ymin + j * dy;\n    r1 = Math.sqrt((x - xd) * (x - xd) + y * y);\n    r2 = Math.sqrt((x + xd) * (x + xd) + y * y);\n    alpha1 = cst * r1 / L;\n    ratio1 = Math.sin(alpha1) / alpha1;\n    alpha2 = cst * r2 / L;\n    ratio2 = Math.sin(alpha2) / alpha2;\n    I[i][j] = (ratio1 * ratio1 + ratio2 * ratio2) * yscale/factor;\n    \n    if (j === Math.floor(ny / 2)) {\n      YP[i] = ymin + I[i][j] * xmax;\n      YP1[i] = ymin + ratio1 * ratio1 * yscale * xmax/ factor;\n      YP2[i] = ymin + ratio2 * ratio2 * yscale * xmax/ factor;\n    }\n  }\n}\n\n//lookang\n//theta = xd / L\n// Calculate angles for the two sources\ntheta1 = r1 / L; // Angle for the first source\ntheta2 = r2 / L; // Angle for the second source\n// Calculate total angular separation\ntheta = Math.abs(theta1 - theta2);\n\n// Compare with Rayleigh criterion's minimum angular separation\nif (theta >= theta_min) {\n  resolveText =  \"The two sources are resolvable since \u03b8 > \u03b8min\"\n} else {\n  resolveText =  \"The two sources are not resolvable since \u03b8 < \u03b8min\"\n}"
        },
        {
          "Name": "lookang",
          "Active": "true",
          "Internal": "false",
          "Type": "CODE_EDITOR",
          "Comment": "",
          "Code": "// lookang\n"
        }
      ]
    },
    "custom": {
      "pages": []
    },
    "elements": {
      "list": []
    }
  },
  "view": {
    "Tree": [
      {
        "Name": "singlePlotPanel",
        "Type": "Panel",
        "Expanded": "true",
        "Properties": [],
        "Children": [
          {
            "Name": "labelPanel",
            "Type": "Panel",
            "Expanded": "true",
            "Properties": [
              {
                "name": "Display",
                "value": "\"grid:2,0,0,0\""
              }
            ],
            "Children": [
              {
                "Name": "checkBox",
                "Type": "CheckBox",
                "Properties": [
                  {
                    "name": "Checked",
                    "value": "showCurves"
                  },
                  {
                    "name": "Text",
                    "value": "\"showCurves\""
                  }
                ]
              },
              {
                "Name": "d",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Display",
                    "value": "\"inline-block\""
                  }
                ],
                "Children": [
                  {
                    "Name": "topLabel",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "%l_xd%"
                      }
                    ]
                  },
                  {
                    "Name": "slider",
                    "Type": "Slider",
                    "Properties": [
                      {
                        "name": "Minimum",
                        "value": "0.00"
                      },
                      {
                        "name": "Maximum",
                        "value": "0.10"
                      },
                      {
                        "name": "Value",
                        "value": "xd"
                      },
                      {
                        "name": "Step",
                        "value": "0.01"
                      }
                    ]
                  },
                  {
                    "Name": "parsedField_d",
                    "Type": "ParsedField",
                    "Properties": [
                      {
                        "name": "Width",
                        "value": "\"10%\""
                      },
                      {
                        "name": "Value",
                        "value": "xd"
                      },
                      {
                        "name": "Format",
                        "value": "\"0.000\""
                      }
                    ]
                  },
                  {
                    "Name": "m_2",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "\" m\""
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "Dr_2",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Display",
                    "value": "\"inline-block\""
                  }
                ],
                "Children": [
                  {
                    "Name": "topLabel2",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "%l_D%"
                      }
                    ]
                  },
                  {
                    "Name": "slider2",
                    "Type": "Slider",
                    "Properties": [
                      {
                        "name": "Value",
                        "value": "Dr"
                      },
                      {
                        "name": "OnChange",
                        "value": "//D = Dr * lambda;\n//Dr = D / lambda;"
                      },
                      {
                        "name": "Minimum",
                        "value": "50"
                      },
                      {
                        "name": "Maximum",
                        "value": "1000"
                      }
                    ]
                  },
                  {
                    "Name": "parsedField_d_2",
                    "Type": "ParsedField",
                    "Properties": [
                      {
                        "name": "Width",
                        "value": "\"10%\""
                      },
                      {
                        "name": "Value",
                        "value": "Dr"
                      },
                      {
                        "name": "Format",
                        "value": "\"0.000\""
                      },
                      {
                        "name": "Tooltip",
                        "value": "\"in terms of number of lambda\""
                      }
                    ]
                  },
                  {
                    "Name": "lambda",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "\"\u03bb\""
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "L",
                "Type": "Panel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Display",
                    "value": "\"inline-block\""
                  }
                ],
                "Children": [
                  {
                    "Name": "topLabel_2",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "\" L =\""
                      }
                    ]
                  },
                  {
                    "Name": "slider_2",
                    "Type": "Slider",
                    "Properties": [
                      {
                        "name": "Minimum",
                        "value": "1"
                      },
                      {
                        "name": "Maximum",
                        "value": "40"
                      },
                      {
                        "name": "Value",
                        "value": "L"
                      },
                      {
                        "name": "Step",
                        "value": "1"
                      }
                    ]
                  },
                  {
                    "Name": "parsedField_d_3",
                    "Type": "ParsedField",
                    "Properties": [
                      {
                        "name": "Width",
                        "value": "\"10%\""
                      },
                      {
                        "name": "Value",
                        "value": "L"
                      },
                      {
                        "name": "Format",
                        "value": "\"0\""
                      }
                    ]
                  },
                  {
                    "Name": "m_2_2",
                    "Type": "Label",
                    "Properties": [
                      {
                        "name": "Text",
                        "value": "\" m\""
                      }
                    ]
                  }
                ]
              },
              {
                "Name": "topLabel22",
                "Type": "Label",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"Intensity = \""
                  }
                ]
              },
              {
                "Name": "intensitySlider",
                "Type": "Slider",
                "Properties": [
                  {
                    "name": "Minimum",
                    "value": "0.1"
                  },
                  {
                    "name": "Maximum",
                    "value": "10"
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Controls the light source intensity.\""
                  },
                  {
                    "name": "Value",
                    "value": "yscale"
                  }
                ]
              },
              {
                "Name": "playPauseButton",
                "Type": "TwoStateButton",
                "Properties": [
                  {
                    "name": "OffClick",
                    "value": "//text=\"paused\";\n_pause();"
                  },
                  {
                    "name": "TextOn",
                    "value": "\"Play\u25ba\""
                  },
                  {
                    "name": "State",
                    "value": "_isPaused"
                  },
                  {
                    "name": "Tooltip",
                    "value": "\"Play/Pause\""
                  },
                  {
                    "name": "TextOff",
                    "value": "\"Pause||\""
                  },
                  {
                    "name": "Width",
                    "value": "\"10%\""
                  },
                  {
                    "name": "OnClick",
                    "value": "_play();\n//text=\"playing\";"
                  },
                  {
                    "name": "Display",
                    "value": "\"inline-block\""
                  }
                ]
              },
              {
                "Name": "resetButton2",
                "Type": "Button",
                "Properties": [
                  {
                    "name": "Text",
                    "value": "\"Reset\u21bb\""
                  },
                  {
                    "name": "Width",
                    "value": "\"10%\""
                  },
                  {
                    "name": "OnClick",
                    "value": "//showBannerAd();\n_reset();\n"
                  }
                ]
              }
            ]
          },
          {
            "Name": "wrappedPanel",
            "Type": "WrappedPanel",
            "Expanded": "true",
            "Properties": [
              {
                "name": "CSS",
                "value": "{ \"display\":\"block\"}"
              }
            ],
            "Children": [
              {
                "Name": "plottingPanel",
                "Type": "PlottingPanel",
                "Expanded": "true",
                "Properties": [
                  {
                    "name": "Gutters",
                    "value": "[0,0,0,50]"
                  },
                  {
                    "name": "YScalePrecision",
                    "value": "2"
                  },
                  {
                    "name": "XFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "SquareAspect",
                    "value": "true"
                  },
                  {
                    "name": "MaximumY",
                    "value": "ymax"
                  },
                  {
                    "name": "MaximumX",
                    "value": "xmax"
                  },
                  {
                    "name": "YFixedTick",
                    "value": "0"
                  },
                  {
                    "name": "YAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "MinimumX",
                    "value": "xmin"
                  },
                  {
                    "name": "MinimumY",
                    "value": "ymin"
                  },
                  {
                    "name": "XTickStep",
                    "value": "0.01"
                  },
                  {
                    "name": "YTickStep",
                    "value": "0.01"
                  },
                  {
                    "name": "XAutoTicks",
                    "value": "false"
                  },
                  {
                    "name": "Height",
                    "value": "\"90vh\""
                  },
                  {
                    "name": "XScalePrecision",
                    "value": "2"
                  },
                  {
                    "name": "Width",
                    "value": "\"100%\""
                  },
                  {
                    "name": "TLMessage",
                    "value": "\"\u03bb = \"+ lambda+\" m \" +\"\\n \u03b8min = \"+theta_min_scientific+\" \\n\u03b8 = | \u03b81- \u03b82 | = \" + (theta).toExponential(3)"
                  },
                  {
                    "name": "TRMessage",
                    "value": "resolveText"
                  }
                ],
                "Children": [
                  {
                    "Name": "scalarField",
                    "Type": "ScalarField2D",
                    "Properties": [
                      {
                        "name": "ZData",
                        "value": "I"
                      },
                      {
                        "name": "Palette",
                        "value": "\"BLACK\""
                      },
                      {
                        "name": "SizeX",
                        "value": "xmax-xmin"
                      },
                      {
                        "name": "MinimumZ",
                        "value": "0"
                      },
                      {
                        "name": "AutoUpdate",
                        "value": "true"
                      },
                      {
                        "name": "SizeY",
                        "value": "ymax-ymin"
                      },
                      {
                        "name": "MaximumZ",
                        "value": "2"
                      }
                    ]
                  },
                  {
                    "Name": "polygon",
                    "Type": "Polygon2D",
                    "Properties": [
                      {
                        "name": "PointsY",
                        "value": "YP1"
                      },
                      {
                        "name": "Points",
                        "value": "nx"
                      },
                      {
                        "name": "PointsX",
                        "value": "XP"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Green\""
                      },
                      {
                        "name": "Visibility",
                        "value": "showCurves"
                      },
                      {
                        "name": "LineWidth",
                        "value": "3"
                      },
                      {
                        "name": "PixelSize",
                        "value": "false"
                      }
                    ]
                  },
                  {
                    "Name": "polygon2",
                    "Type": "Polygon2D",
                    "Properties": [
                      {
                        "name": "PointsY",
                        "value": "YP2"
                      },
                      {
                        "name": "Points",
                        "value": "nx"
                      },
                      {
                        "name": "PointsX",
                        "value": "XP"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Green\""
                      },
                      {
                        "name": "Visibility",
                        "value": "showCurves"
                      },
                      {
                        "name": "LineWidth",
                        "value": "3"
                      }
                    ]
                  },
                  {
                    "Name": "polygon22",
                    "Type": "Polygon2D",
                    "Properties": [
                      {
                        "name": "PointsY",
                        "value": "YP"
                      },
                      {
                        "name": "Points",
                        "value": "nx"
                      },
                      {
                        "name": "PointsX",
                        "value": "XP"
                      },
                      {
                        "name": "LineColor",
                        "value": "\"Red\""
                      },
                      {
                        "name": "Visibility",
                        "value": "showCurves"
                      },
                      {
                        "name": "LineWidth",
                        "value": "3"
                      }
                    ]
                  }
                ]
              }
            ]
          },
          {
            "Name": "narrativePanel",
            "Type": "Panel",
            "Properties": [
              {
                "name": "Html",
                "value": "<h2>Optical Resolution Simulation Narrative</h2>\n<p>The Optical Resolution Model simulates how two point sources of light appear through a circular aperture, such as those used in telescopes or microscopes. By adjusting parameters such as the aperture diameter, wavelength of light, and the distance between the sources, the simulation demonstrates the diffraction patterns that arise due to wave interference. The model calculates the intensity of light at each point on the observation screen, providing a visual representation of the Airy disk pattern, and allows users to explore the Rayleigh criterion for optical resolution.</p>\n\n<p>The Rayleigh criterion provides the minimum angular separation (<code>&theta;</code>) at which two light sources can still be resolved, and is given by the formula:</p>\n\n<p><code>&theta;_{\\text{min}} = 1.22 &times; (\u03bb / a)</code></p>\n\n<p>where <code>\u03bb</code> (lambda) is the wavelength of the light, and <code>a</code> is the diameter of the aperture. This formula is crucial for understanding the diffraction limit of optical systems. By comparing the actual angular separation of the sources with this criterion, users can assess whether the sources are resolvable.</p>\n\n<p>The actual angular separation <code>&theta;</code> between the two sources is calculated based on their distances from the center of the aperture and the distance to the observation screen. First, we calculate the distances <code>r1</code> and <code>r2</code> of the two sources from the center of the aperture:</p>\n\n<p><code>r1 = \u221a((x - xd)\u00b2 + y\u00b2)</code> and <code>r2 = \u221a((x + xd)\u00b2 + y\u00b2)</code></p>\n\n<p>where <code>xd or d in the slider</code> is the horizontal distance between the two sources, and <code>x</code> and <code>y</code> are the coordinates of the observation point on the screen. <code>r1</code> and <code>r2</code> represent the distances from the aperture's center to the two light sources at the observation screen.</p>\n\n<p>The angles for each source are then calculated as:</p>\n\n<p><code>&theta;1 = r1 / L</code> and <code>&theta;2 = r2 / L</code></p>\n\n<p>where <code>L</code> is the distance from the aperture to the observation screen. The total angular separation <code>&theta;</code> is the absolute difference between these two angles:</p>\n\n<p><code>&theta; = |&theta;1 - &theta;2|</code></p>\n\n<p>By comparing this angular separation <code>&theta;</code> to the Rayleigh criterion's minimum value <code>&theta;_{\\text{min}}</code>, the simulation determines whether the two sources are resolvable. If <code>&theta; &ge; &theta;_{\\text{min}}</code>, the two sources are resolvable, otherwise, they are not.</p>\n\n<p>Users can modify variables like the wavelength (<code>\u03bb</code>), aperture diameter (<code>a</code>), and source separation (<code>xd</code>) to see how diffraction limits impact the clarity and separation of the two light sources. The interactive nature of the model makes it an effective tool for studying optical phenomena such as interference and diffraction.</p>\n\n<p>The simulation was originally developed in Java and later converted to JavaScript to improve accessibility on modern platforms. In addition, the new scalar field element introduced in EJS 6.1 allows for a more accurate representation of the intensity fields, enhancing the simulation's educational value.</p>"
              }
            ]
          }
        ]
      }
    ],
    "RootProperties": []
  },
  "metadata": {
    "APP": "WebEJS",
    "CreatedWith": "WebEJS : The web version of Easy JavaScript Simulations",
    "MoreInfo": "WebEJS 1.1",
    "version": "https://www.um.es/fem/wikis/webejs/"
  }
}