Skip to content

Interactive 2D wave optics simulator. Turn any image into a refractive scene, add sources, watch waves refract, diffract and interfere. Probes, intensity maps, video export.

C#
13.7 KB
Raw Blame
{
  "format_version": 1,
  "project_name": "Example5_Small_incoherent_source",
  "created": "2026-09-23T12:44:50Z",
  "modified": "2026-10-02T13:11:02Z",
  "scene": {
    "mode": "user_defined",
    "image_file": "scene_images/spherrical_mirror_small_central_aperture.png",
    "user_width": 1920,
    "user_height": 1080,
    "damping_edge_enabled": true,
    "damping_edge_size_px": 64,
    "use_sources": false,
    "image_source_scale": 1,
    "use_object_sources": true,
    "background_refractive_index": 1,
    "use_probes": true
  },
  "simulation": {
    "steps": 8000,
    "visualize_every": 2,
    "export_field": false,
    "export_intensity": false,
    "preview_field": true,
    "preview_intensity": true,
    "field_color_scheme": "Orange_symmetry",
    "intensity_color_scheme": "Purple_rain",
    "field_brightness": 50,
    "intensity_brightness": 50,
    "field_black_level": -0.05,
    "intensity_black_level": 0,
    "source_frequency_scale": 2,
    "video_fps": 60,
    "video_quality": 70,
    "use_gpu": false,
    "wave_speed_c": 0.563,
    "use_4th_order_laplacian": true,
    "time_decay_factor": 10,
    "intensity_scale": 1
  },
  "probes": {
    "count": 2,
    "items": [
      {
        "active": true,
        "place_on": "field",
        "measurement": "amplitude",
        "probe_type": "point",
        "ax": 695,
        "ay": 530,
        "bx": 300,
        "by": 100,
        "box_size": "extra_large",
        "box_x": 14,
        "box_y": 14,
        "scale_mode": "running",
        "auto_scale_x": true,
        "auto_scale_y": false,
        "y_min": -0.02,
        "y_max": 0.02,
        "running_window": 500,
        "use_start_after_step": false,
        "start_after_step": 0
      },
      {
        "active": true,
        "place_on": "intensity",
        "measurement": "intensity",
        "probe_type": "line",
        "ax": 693,
        "ay": 530,
        "bx": 1690,
        "by": 530,
        "box_size": "extra_large",
        "box_x": 16,
        "box_y": 13,
        "scale_mode": "running",
        "auto_scale_x": true,
        "auto_scale_y": false,
        "y_min": 0,
        "y_max": 0.0001,
        "running_window": 500,
        "use_start_after_step": false,
        "start_after_step": 3000
      }
    ]
  },
  "object_sources": {
    "count": 1,
    "items": [
      {
        "name": "Source 1",
        "main_type": "composite",
        "x": 542,
        "y": 532,
        "has_position": true,
        "source_on": true,
        "detach_source": true,
        "detach_after_steps": 2000,
        "frequency": 100,
        "amplitude": 100,
        "phase_deg": 0,
        "mode": "pulsed",
        "pulse_shape": "gaussian",
        "pulse_width_cycles": 5,
        "off_state_cycles": 20,
        "array_size_x": 5,
        "array_size_y": 5,
        "spacing_x": 3,
        "spacing_y": 3,
        "composite_mode": "randomize",
        "randomize_frequency": true,
        "randomize_frequency_amount": 50,
        "randomize_phase": true,
        "randomize_phase_amount": 90,
        "randomize_off_width": true,
        "randomize_off_width_amount": 19,
        "randomize_position": true,
        "randomize_position_amount": 1,
        "elements": [
          {
            "x": 537,
            "y": 527,
            "level": 123,
            "amplitude": 1,
            "phase_rad": 1.0471975511965976,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 31,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 538,
            "y": 525,
            "level": 136,
            "amplitude": 1,
            "phase_rad": 1.4486232791552935,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 34,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 542,
            "y": 527,
            "level": 69,
            "amplitude": 1,
            "phase_rad": -0.75049157835756164,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 26,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 544,
            "y": 526,
            "level": 74,
            "amplitude": 1,
            "phase_rad": -0.17453292519943295,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 35,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 547,
            "y": 527,
            "level": 132,
            "amplitude": 1,
            "phase_rad": -0.55850536063818546,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 11,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 535,
            "y": 529,
            "level": 63,
            "amplitude": 1,
            "phase_rad": -1.2391837689159739,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 1,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 540,
            "y": 529,
            "level": 123,
            "amplitude": 1,
            "phase_rad": -1.2217304763960306,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 37,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 541,
            "y": 528,
            "level": 52,
            "amplitude": 1,
            "phase_rad": -1.1868238913561442,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 37,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 545,
            "y": 529,
            "level": 55,
            "amplitude": 1,
            "phase_rad": -1.0471975511965976,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 10,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 547,
            "y": 528,
            "level": 127,
            "amplitude": 1,
            "phase_rad": 0.87266462599716477,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 4,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 536,
            "y": 533,
            "level": 73,
            "amplitude": 1,
            "phase_rad": 0.017453292519943295,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 20,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 540,
            "y": 531,
            "level": 90,
            "amplitude": 1,
            "phase_rad": 0.19198621771937624,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 19,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 542,
            "y": 531,
            "level": 125,
            "amplitude": 1,
            "phase_rad": 1.4137166941154069,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 38,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 546,
            "y": 531,
            "level": 58,
            "amplitude": 1,
            "phase_rad": -0.50614548307835561,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 22,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 547,
            "y": 532,
            "level": 62,
            "amplitude": 1,
            "phase_rad": 0.017453292519943295,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 13,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 537,
            "y": 536,
            "level": 115,
            "amplitude": 1,
            "phase_rad": -1.3264502315156903,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 7,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 538,
            "y": 536,
            "level": 86,
            "amplitude": 1,
            "phase_rad": -1.53588974175501,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 14,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 541,
            "y": 534,
            "level": 72,
            "amplitude": 1,
            "phase_rad": 0.38397243543875248,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 6,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 544,
            "y": 535,
            "level": 97,
            "amplitude": 1,
            "phase_rad": 0.43633231299858238,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 16,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 548,
            "y": 536,
            "level": 60,
            "amplitude": 1,
            "phase_rad": -0.95993108859688125,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 13,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 535,
            "y": 539,
            "level": 93,
            "amplitude": 1,
            "phase_rad": -0.83775804095727813,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 37,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 538,
            "y": 538,
            "level": 123,
            "amplitude": 1,
            "phase_rad": -1.0122909661567112,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 32,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 543,
            "y": 538,
            "level": 82,
            "amplitude": 1,
            "phase_rad": -0.3490658503988659,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 10,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 546,
            "y": 538,
            "level": 124,
            "amplitude": 1,
            "phase_rad": 0.33161255787892258,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 33,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          },
          {
            "x": 549,
            "y": 539,
            "level": 96,
            "amplitude": 1,
            "phase_rad": -0.92502450355699462,
            "mode": "pulsed",
            "pulse_shape": "gaussian",
            "on_width_cycles": 5,
            "off_width_cycles": 20,
            "off_width_base": 20,
            "randomize_off_width_amount": 19,
            "detach_after_step": 2000
          }
        ]
      }
    ]
  },
  "description": "Simulation features a small (5x5 composite) source using randomized \"off\"-time and source frequency.  "
}