Feynman diagrams

A Feynman diagram describes a reaction of elementary particles. For example, two electrons scattering by exchanging a photon. The new feature required here is that the aximation is not continuous, but splits into different parts: two electrons coming in, one emitting a photon, the other absorbing it, two electrons going out.

This division of the aximation can be achieved with the interval option as follows: the movie is always 100 time units (let's call them axoseconds) long. interval specifies in which time slot an object should evolve from its start to its end, the so-called active interval.

The scattering reaction mentioned above can then be represented as follows:

    $plu = point({"type" => "empty",
		  "coordinates" => [[-100,-50]]});
    $plo = point({"type" => "empty",
		  "coordinates" => [[-100,50]]});
    $p1 = point({"type" => "empty",
		 "coordinates" => [[-20,20]]});
    $p2 = point({"type" => "empty",
		 "coordinates" => [[20,-20]]});
    $pro = point({"type" => "empty",
		 "coordinates" => [[100,50]]});
    $pru = point({"type" => "empty",
		  "coordinates" => [[100,-50]]});
    line({"foot" => [${$plo}{"coordinates"}],
	  "head" => [${$plo}{"coordinates"},${$p1}{"coordinates"}],
	  "text" => "\$e^-\$",
	  "textpos" => [[.5,15]],
	  "color" => "Blue",
	  "staythere" => 1,
	  "interval" => [0,40]});
    line({"foot" => [${$plu}{"coordinates"}],
	  "head" => [${$plu}{"coordinates"},${$p2}{"coordinates"}],
	  "textpos" => [[.5,15]],
	  "text" => '$e^-$',
	  "color" => "Green",
	  "staythere" => 1,
	  "interval" => [0,60]});
    line({"foot" => [${$p2}{"coordinates"}],
	  "head" => [${$p2}{"coordinates"},${$pru}{"coordinates"}],
	  "staythere" => 1,
	    "fixedwiggles" => 0,
	    "text" => '$e^-$',
	    "textpos" => [[.5,15]],
	    "wiggles" => 25,
	    "color" => "Green",
	  "interval" => [60,100]});
    line({"foot" => [${$p1}{"coordinates"}],
	  "staythere" => 1,
	  "text" => '$e^-$',
	  "textpos" => [[.5,15]],
	  "color" => "Blue",
	  "head" => [${$p1}{"coordinates"},${$pro}{"coordinates"}],
	  "interval" => [40,100]});
    photon({"foot" => [${$p1}{"coordinates"}],
	    "head" => [${$p1}{"coordinates"},${$p2}{"coordinates"}],
	    "color" => "Red",
	    "fixedwiggles" => 0,
	    "text" => '$\gamma$',
	    "textpos" => [[.5,20]],
	    "wiggles" => 25,
	    "staythere" => 1,
	    "interval" => [40,60]});
	 
    point({"coordinates" => [${$plo}{"coordinates"},
			     ${$p1}{"coordinates"}],
	   "type" => "ccirc",
	   "interval" => [0,40]});
    point({"coordinates" => [${$plu}{"coordinates"},
			     ${$p2}{"coordinates"}],
	   "type" => "ccirc",
	   "interval" => [0,60]});
    point({"coordinates" => [${$p1}{"coordinates"},
			     ${$p2}{"coordinates"}],
	   "type" => "ccirc",
	   "interval" => [40,60]});
    point({"coordinates" => [${$p1}{"coordinates"},
			     ${$pro}{"coordinates"}],
	   "type" => "ccirc",
	   "interval" => [40,100]});
    point({"coordinates" => [${$p2}{"coordinates"},
			     ${$pru}{"coordinates"}],
	   "type" => "ccirc",
	   "interval" => [60,100]});
Note also the options bethere/staythere which determine whether the object is already visible before/after its active interval or not (0 or 1).
main