Click here to go to the applet.

This java applet is a simulation that demonstrates electromagnetic waves in two dimensions.

When the applet starts up you will see a line (called the "source") emitting red and green plane waves. The color indicates the magnetic field; green areas are positive (towards you) and the red areas are negative (away from you). (In this applet, the magnetic field is always perpendicular to the plane of the screen.)

In addition to the red and green color, you will see arrows which indicate the direction of the electric field (which is always in the plane of the screen).

Conductors will show up as gray. They may also show yellow or white arrows, indicating current, and a yellow or blue color, indicating charge. (Yellow means positive charge, and blue means negative charge.)

These are electromagnetic waves, so in real life they would be moving at the speed of light.

This is the TE version of the applet. There is also a TM version.


The Setup popup can be used to view some interesting pre-defined experiments. Once an experiment is selected, you may modify it all you want. The choices are:

  • Plane Wave: this demonstrates a simple plane wave source.
  • Intersecting Planes: this demonstrates two plane waves intersecting at right angles.
  • Reflection At Conductor: this shows wave packets being reflected by a perfect conductor.
  • Oscillating Dipole: this shows an oscillating electric dipole radiator.
  • Half Wave Antenna: this shows a linear antenna whose length is equal to half the wavelength of the radiation it is emitting.
  • Full Wave Antenna (End-Driven): this shows a linear antenna whose length is equal to the wavelength of the radiation it is emitting. It is driven at one end (the yellow end).
  • Full Wave Antenna (Center-Driven): this shows a linear antenna whose length is equal to the wavelength of the radiation it is emitting. It is driven in the center.
  • Current Loop: this shows a loop of wire with an oscillating current.
  • Big TE01 Mode: this creates a small perfectly conducting cavity with a standing wave inside it. The electric field is 90 degrees out of phase with the magnetic field. The field in the cavity is oscillating in its TE01 mode.
  • Big TE10 Mode: this creates a small cavity with a TE10 mode.
  • Big TE10+TE01 Mode: this creates a small cavity with TE10 and TE01 modes superposed.
  • Big TE10+TE01i Mode: this creates a small cavity with TE10 mode and TE01 modes superposed out of phase.
  • Big TE11 Mode: this creates a small cavity with a TE11 mode.
  • TE10 Modes: this creates a set of small superconducting cavities with TE10 standing waves inside them.
  • TEn0 Modes: this creates a set of small superconducting cavities with TE10, TE20, TE30, and TE40 standing waves inside them. (If the resolution is set higher then more cavities are present with higher modes.)
  • TEn1 Modes: this creates a set of small superconducting cavities with TE11 and TE21 standing waves.
  • TEnn Modes: this creates a set of small superconducting cavities with various TE modes inside them.
  • Waveguides: This creates a series of waveguides of different widths.
  • Capacitor: this shows a small cavity with a capacitor connecting the two sides.
  • Resonant Cavities 1: This creates a series of rectangular cavities being driven by a plane wave from above. As you change the frequency you will see the response of each cavity change. Each cavity has a different resonant frequency so it will respond differently. After changing the frequency you may want to wait a bit for things to settle down (or turn the simulation speed way up).
  • Single Slit: this demonstrates diffraction of waves travelling through a slit.
  • Double Slit: this demonstrates diffraction of waves travelling through a double slit.
  • Triple Slit.
  • Obstacle: this demonstrates diffraction of waves travelling around an obstacle.
  • Half Plane: this demonstrates diffraction of waves around the edge of a plane.
  • Lloyd's Mirror: This shows an interferometer which consists of a point source close to a mirror (at the bottom of the window). The waves coming from the source interfere with the waves coming from its mirror image.

The Source popup controls the wave sources (oscillating currents). It has the following settings:

  • No Sources: there will be no sources of wave motion.
  • 1 Plane Src: there will be a single plane source of waves. The source consists of an oscillating current that does not vary along the length of the source. The ends of the plane source can be dragged anywhere on the screen with the mouse.
  • 2 Plane Src: there will be two plane sources.
  • 1 Plane Src (Packets): the plane source will emit wave packets periodically.
  • 1 Antenna Src: there will be a single antenna emitting waves. The antenna is driven at the yellow end. The current at the white end is zero.
  • 2 Antenna Src: there will be two antennas emitting waves.
  • 1 Loop Src: there will be a current loop emitting waves.
  • 1 Loop Src (Packets): there will be a current loop emitting wave packets periodically.

The Mouse popup controls what happens when the mouse is clicked. The following settings are possible:

  • Mouse = Add Perf. Conductor: Clicking on a point will create a perfect conductor there. Clicking on an existing conductor will erase it.
  • Mouse = Clear: Clicking on a point will remove whatever is there.

The Show popup determines which fields or other quantities to display, and how to display them.

  • Show Electric Field (E): Show the electric field as arrows.
  • Show E lines: Show the electric field as lines. The color of the lines go from dark green to light green and then to white as the field gets stronger. The density of the lines is kept fairly constant, so in order to determine the field strength you need to look at the color of the lines rather than how far apart they are.
  • Show Magnetic Field (B): Show the magnetic field as green (positive, toward you) or red (negative, away from you).
  • Show Current (rho): Show the charge density as yellow (positive) or blue (negative).
  • Show Current (j): Show the current density as arrows.
  • Show E/B: Show both the electric field arrows and the magnetic field.
  • Show E lines/B: Show both electric field lines and the magnetic field.
  • Show E/B/rho/j: In space, show both the electric field arrows and the magnetic field; in conductors, show the current density and charge.
  • Show E lines/B/rho/j: In space, show both the electric field lines and the magnetic field; in conductors, show the current density and charge.
  • Show E/rho: Show the electric field and charge.
  • Show E lines/rho: Show the electric field lines and charge.
  • Show E/B/j: Show the electric field, magnetic field, and current.
  • Show E lines/B/j: Show the electric field lines, magnetic field, and current.
  • Show Poynting Vector: Show the Poynting vector, which indicates the direction of energy transfer. For waves, it is in the direction of wave motion.
  • Show Energy Density: Show the energy density as shades of yellow.
  • Show Poynting/Energy: Show both the energy density and the Poynting vector.
  • Show Disp Current: Show the displacement current.
  • Show Disp + j: Show the displacement and conduction currents.
  • Show Disp + j/B: Show the displacement and conduction currents and magnetic field.

The Clear Fields button magically clears out any fields but does not remove any currents, sources, or materials. The Clear All button clears out everything.

The Stopped checkbox stops the applet, in case you want to take a closer look at something, or if you want to work on something with the mouse without worrying about it changing out from under you.

The Simulation Speed slider controls how far the waves move between frames. If you slide this to the left, the applet will go faster but the motion will be choppier.

The Resolution slider allows you to speed up or slow down the applet by adjusting the resolution; a higher resolution is slower but looks better.

The Brightness slider controls the brightness, just like on a TV set. This can be used to view faint waves more easily.

The E Field Brightness slider controls the relative brightness of the electric field.




Click here to go to the applet.

java@falstad.com