<!-- This XML file has been created by Easy Java Simulations (Ejs). Visit http://www.um.es/fem/Ejs. -->
<!-- Please, save the file to your hard disk on your Ejs' user directory and open it with Ejs. -->
<Osejs version="4.2.7" password="">
<Osejs.Information>
<Title><![CDATA[]]></Title>
<Author><![CDATA[]]></Author>
<Keywords><![CDATA[]]></Keywords>
<Password><![CDATA[]]></Password>
<Level><![CDATA[]]></Level>
<Language><![CDATA[]]></Language>
<Abstract><![CDATA[]]></Abstract>
<ExecPassword><![CDATA[]]></ExecPassword>
<CaptureTools>true</CaptureTools>
<DataTools>true</DataTools>
<LanguageTools>true</LanguageTools>
<EmersionSupport>false</EmersionSupport>
<UseInterpreter>true</UseInterpreter>
<AdditionalLibraries>
</AdditionalLibraries>
<ImportStatements>
</ImportStatements>
<AuxiliaryFiles><![CDATA[]]></AuxiliaryFiles>
<DetectedFiles><![CDATA[]]></DetectedFiles>
</Osejs.Information>
<Osejs.Description>
<Osejs.Description.Page>
<Type>DESCRIPTION_EDITOR</Type>
<Name>Refraction - minimizing time</Name>
<Active>true</Active>
<Content>
<![CDATA[
<html>
  <head>
    
  </head>
  <body>
    <h1>
      Refraction and the travel time of light
    </h1>
    <p>
      Let's say you have two points, and you want light to travel from one 
      point to the other. In this simulation, by the way, the first point is 
      colored red and the other point is colored purple. If you want the light 
      to travel between the points in the smallest possible time, then the 
      light should travel along the straight line connecting the two points. 
      This is true, at least, if the light travels through just one medium 
      (air, for instance) between the two points.
    </p>
    <p>
      Things get a little more interesting if the light changes medium along 
      the way, however. In this simulation, there are two different media. 
      Point 1, where the light originates, is in medium 1 (air, for instance), 
      while point 2, where the light ends up, is in medium 2 (glass, for 
      instance). You can adjust the index of refraction of each medium, and 
      you can also adjust the position of points 1 and 2. You can also adjust 
      the position of a third point (colored green in the simulation) that is 
      on the interface (the boundary) between the two media, and through which 
      the light passes on its way from point 1 to point 2.
    </p>
    <p>
      Your goal is to adjust the position of the point on the boundary so that 
      the light takes the smallest possible time to travel from point 1 to 
      point 2, and then you have to think about how this relates to reality. 
      In other words, which of the many possible paths the light could take 
      does the light actually take?
    </p>
  </body>
</html>

]]>

</Content>
</Osejs.Description.Page>
<Osejs.Description.Page>
<Type>DESCRIPTION_EDITOR</Type>
<Name>Activities</Name>
<Active>true</Active>
<Content>
<![CDATA[
<html>
  <head>
    
  </head>
  <body>
    <h1>
      Activities
    </h1>
    <h1>
      <font size="4">The positions of the points on the screen are specified 
      in meters - if you right-click on any point on the screen, the 
      coordinates of that point will show up in yellow in the bottom left of 
      medium 2 (the lower medium). The travel times for light over the various 
      paths are given in nanoseconds - light is very fast! </font>
    </h1>
    <ol>
      <li>
        When you first start the simulation, the three points are all along a 
        vertical straight line. Without moving the points, adjust the index of 
        refraction of each medium. What effect does this have on the travel 
        time for the light? What does this tell you about the connection 
        between the index of refraction of a medium and the speed at which 
        light travels in that medium?
      </li>
      <li>
        Now, look at the graph (the graph of light travel time as a function 
        of the position of the point the light passes through on the interface 
        between the two media) as you click and drag the green point left and 
        right. Determine where the green point has to be to minimize the time 
        it takes for light to travel from point 1 (red) to point 2 (purple). 
        Explain why this location for the green point makes sense.
      </li>
      <li>
        Now, click and drag point 1 (red) to a location in the upper left of 
        medium 1, and move point 2 (purple) to a location in the lower right 
        of medium 2. Once again, move the green point left and right to 
        determine the path the light follows from point 1 to point 2 that 
        minimizes the travel time. Try this in three different situations: (a) 
        when the two media have the same index of refraction, (b) when medium 
        1 has a higher index of refraction than medium 2, and (c) when medium 
        1 has a lower index of refraction than medium 2. Is the minimum-time 
        path also the minimum-distance path? Explain.
      </li>
      <li>
        It turns out, when light travels from a point in one medium to a point 
        in another medium, that it actually follows the path that minimizes 
        the travel time. Based on your investigations with this simulation, 
        what are some implications of that?
      </li>
    </ol>
  </body>
</html>

]]>

</Content>
</Osejs.Description.Page>
</Osejs.Description>
<Osejs.Model>
<Osejs.Model.FramesPerSecond>25</Osejs.Model.FramesPerSecond>
<Osejs.Model.StepsPerDisplay>1</Osejs.Model.StepsPerDisplay>
<Osejs.Model.Autostart>false</Osejs.Model.Autostart>
<Osejs.Model.Variables>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>variables</Name>
<Active>true</Active>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[helpFlag]]></Name>
<Value><![CDATA[false]]></Value>
<Type><![CDATA[boolean]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[helpLabel]]></Name>
<Value><![CDATA["Show Help"]]></Value>
<Type><![CDATA[String]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[x1]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[x coordinate of point 1]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[x2]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[x coordinate of point 2]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[y1]]></Name>
<Value><![CDATA[3.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[y coordinate of point 1]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[y2]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[y coordinate of point 2]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[x3]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[x coordinate of point 3]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[y3]]></Name>
<Value><![CDATA[-3.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[y coordinate of point 3]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[zeroval]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[Always zero]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[c]]></Name>
<Value><![CDATA[0.3]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[speed of light, in meters per nanosecond]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[t]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[time it takes light to travel from point 1 to point 3]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[t1]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[time to travel from point 1 to point 2]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[t2]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[time to travel from point 2 to point 3]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>

</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>calculations</Name>
<Active>true</Active>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[n1]]></Name>
<Value><![CDATA[1.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[index of refraction of medium 1]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[n2]]></Name>
<Value><![CDATA[1.49995]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[index of refraction of medium 2]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[d1]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[distance from point 1 to point 2]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[d2]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[distance from point 2 to point 3]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[val1]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[value of n1 sin(theta1)]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[val2]]></Name>
<Value><![CDATA[0.0]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[value of n2 sin(theta2)]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>

</Content>
</Osejs.Model.Variables.Page>
<Osejs.Model.Variables.Page>
<Type>VARIABLE_EDITOR</Type>
<Name>color variables</Name>
<Active>true</Active>
<Content>
<PageComment><![CDATA[]]></PageComment>
<Variable>
<Name><![CDATA[redness]]></Name>
<Value><![CDATA[255]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[greenness]]></Name>
<Value><![CDATA[255]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[blueness]]></Name>
<Value><![CDATA[255]]></Value>
<Type><![CDATA[int]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[colorMedium1]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[Object]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[colorMedium2]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[Object]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>
<Variable>
<Name><![CDATA[]]></Name>
<Value><![CDATA[]]></Value>
<Type><![CDATA[double]]></Type>
<Dimension><![CDATA[]]></Dimension>
<Comment><![CDATA[]]></Comment>
</Variable>

</Content>
</Osejs.Model.Variables.Page>
</Osejs.Model.Variables>
<Osejs.Model.Initialization>
<Osejs.Model.Initialization.Page>
<Type>CODE_EDITOR</Type>
<Name>Init Page</Name>
<Active>true</Active>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
redness = 255;
greenness = 255;
blueness = 255;
colorMedium1 = new java.awt.Color(redness,greenness,blueness);

redness = 255 - (int)(160*(n2 - 1.0));
greenness = redness;
colorMedium2 = new java.awt.Color(redness,greenness,blueness);

_view.resetTraces();

]]></Code>

</Content>
</Osejs.Model.Initialization.Page>
</Osejs.Model.Initialization>
<Osejs.Model.Evolution>
</Osejs.Model.Evolution>
<Osejs.Model.Constraints>
<Osejs.Model.Constraints.Page>
<Type>CODE_EDITOR</Type>
<Name>FixRel Page</Name>
<Active>true</Active>
<Content>
<Comment><![CDATA[]]></Comment>
<Code><![CDATA[
d1 = Math.sqrt((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1));
d2 = Math.sqrt((x3-x2)*(x3-x2)+(y3-y2)*(y3-y2));
val1 = n1*Math.abs(x2-x1)/d1;
val2 = n2*Math.abs(x3-x2)/d2;
t1 = n1*d1/c;
t2 = n2*d2/c;
t = t1 + t2;
]]></Code>

</Content>
</Osejs.Model.Constraints.Page>
</Osejs.Model.Constraints>
<Osejs.Model.Library>
</Osejs.Model.Library>
</Osejs.Model>
<Osejs.View>
<Osejs.View.Creation>
<Osejs.View.Creation.Element>
<Expanded>true</Expanded>
<Type>Elements.Frame</Type>
<Property name="name">MainWindow</Property>
<Property name="_ejs_mainWindow">true</Property>
<Property name="title"><![CDATA["Refraction - minimizing time"]]></Property>
<Property name="layout"><![CDATA[border]]></Property>
<Property name="visible"><![CDATA[true]]></Property>
<Property name="location"><![CDATA["0,0"]]></Property>
<Property name="size"><![CDATA["853,488"]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Expanded>true</Expanded>
<Type>Elements.Panel</Type>
<Property name="name">RightPanel</Property>
<Property name="parent">MainWindow</Property>
<Property name="position">east</Property>
<Property name="layout"><![CDATA[border]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Expanded>true</Expanded>
<Type>Elements.Panel</Type>
<Property name="name">ButtonsPanel</Property>
<Property name="parent">RightPanel</Property>
<Property name="position">north</Property>
<Property name="layout"><![CDATA[grid:0,1,0,0]]></Property>
<Property name="size"><![CDATA["170,360"]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Button</Type>
<Property name="name">clear</Property>
<Property name="parent">ButtonsPanel</Property>
<Property name="text"><![CDATA["Clear Graph"]]></Property>
<Property name="action"><![CDATA[_view.resetTraces()]]></Property>
<Property name="background"><![CDATA[ORANGE]]></Property>
<Property name="foreground"><![CDATA[BLUE]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Slider</Type>
<Property name="name">n1</Property>
<Property name="parent">ButtonsPanel</Property>
<Property name="variable"><![CDATA[n1]]></Property>
<Property name="minimum"><![CDATA[1.0]]></Property>
<Property name="maximum"><![CDATA[2.5]]></Property>
<Property name="format"><![CDATA["n1 = 0.#"]]></Property>
<Property name="ticks"><![CDATA[16]]></Property>
<Property name="closest"><![CDATA[true]]></Property>
<Property name="dragaction"><![CDATA[_view.resetTraces();
redness = 255 - (int)(160*(n1 - 1.0));
greenness = redness;
colorMedium1 = new java.awt.Color(redness,greenness,blueness);]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Slider</Type>
<Property name="name">n2</Property>
<Property name="parent">ButtonsPanel</Property>
<Property name="variable"><![CDATA[n2]]></Property>
<Property name="value"><![CDATA[1.49995]]></Property>
<Property name="minimum"><![CDATA[1.0]]></Property>
<Property name="maximum"><![CDATA[2.5]]></Property>
<Property name="format"><![CDATA["n2 = 0.#"]]></Property>
<Property name="ticks"><![CDATA[16]]></Property>
<Property name="closest"><![CDATA[true]]></Property>
<Property name="dragaction"><![CDATA[_view.resetTraces();
redness = 255 - (int)(160*(n2 - 1.0));
greenness = redness;
colorMedium2 = new java.awt.Color(redness,greenness,blueness);]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Button</Type>
<Property name="name">reset</Property>
<Property name="parent">ButtonsPanel</Property>
<Property name="text"><![CDATA[Reset Simulation]]></Property>
<Property name="action"><![CDATA[_reset()]]></Property>
<Property name="background"><![CDATA[BLACK]]></Property>
<Property name="foreground"><![CDATA[RED]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Button</Type>
<Property name="name">instructions</Property>
<Property name="parent">ButtonsPanel</Property>
<Property name="text"><![CDATA[%helpLabel%]]></Property>
<Property name="action"><![CDATA[if (helpFlag)
{
helpFlag = false;
helpLabel = "Show Help";
}
else
{
helpFlag = true;
helpLabel = "Hide Help";
}]]></Property>
<Property name="background"><![CDATA[BLUE]]></Property>
<Property name="foreground"><![CDATA[YELLOW]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Expanded>true</Expanded>
<Type>Elements.Panel</Type>
<Property name="name">output</Property>
<Property name="parent">MainWindow</Property>
<Property name="position">south</Property>
<Property name="layout"><![CDATA[GRID:0,1,0,0]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">heading</Property>
<Property name="parent">output</Property>
<Property name="value"><![CDATA["Travel time of light, in nanoseconds"]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Arial,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.ParsedField</Type>
<Property name="name">timedisplay1</Property>
<Property name="parent">output</Property>
<Property name="position">north</Property>
<Property name="variable"><![CDATA[t1]]></Property>
<Property name="format"><![CDATA["Time from point 1 (red) to point 2 (green) = 0.###"]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Arial,BOLD,14]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.ParsedField</Type>
<Property name="name">timedisplay2</Property>
<Property name="parent">output</Property>
<Property name="position">south</Property>
<Property name="variable"><![CDATA[t2]]></Property>
<Property name="format"><![CDATA["Time from point 2 (green) to point 3 (purple) = 0.###"]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Arial,BOLD,14]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.ParsedField</Type>
<Property name="name">timedisplay</Property>
<Property name="parent">output</Property>
<Property name="position">center</Property>
<Property name="variable"><![CDATA[t]]></Property>
<Property name="format"><![CDATA["Total time from point 1 to point 3 = 0.###"]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Arial,BOLD,14]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Expanded>false</Expanded>
<Type>Elements.DrawingPanel</Type>
<Property name="name">drawingPanel</Property>
<Property name="parent">MainWindow</Property>
<Property name="position">west</Property>
<Property name="autoscaleX"><![CDATA[false]]></Property>
<Property name="autoscaleY"><![CDATA[false]]></Property>
<Property name="minimumX"><![CDATA[-5.0]]></Property>
<Property name="maximumX"><![CDATA[5.0]]></Property>
<Property name="minimumY"><![CDATA[-5.0]]></Property>
<Property name="maximumY"><![CDATA[5.0]]></Property>
<Property name="size"><![CDATA["350,350"]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Particle</Type>
<Property name="name">medium1</Property>
<Property name="parent">drawingPanel</Property>
<Property name="x"><![CDATA[0.0]]></Property>
<Property name="y"><![CDATA[0.0]]></Property>
<Property name="sizex"><![CDATA[10.0]]></Property>
<Property name="sizey"><![CDATA[5.0]]></Property>
<Property name="enabled"><![CDATA[false]]></Property>
<Property name="style"><![CDATA[RECTANGLE]]></Property>
<Property name="elementposition"><![CDATA[SOUTH]]></Property>
<Property name="color"><![CDATA[colorMedium1]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Particle</Type>
<Property name="name">medium2</Property>
<Property name="parent">drawingPanel</Property>
<Property name="x"><![CDATA[0.0]]></Property>
<Property name="y"><![CDATA[0.0]]></Property>
<Property name="sizex"><![CDATA[10.0]]></Property>
<Property name="sizey"><![CDATA[5.0]]></Property>
<Property name="enabled"><![CDATA[false]]></Property>
<Property name="style"><![CDATA[RECTANGLE]]></Property>
<Property name="elementposition"><![CDATA[NORTH]]></Property>
<Property name="color"><![CDATA[colorMedium2]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Arrow</Type>
<Property name="name">ray1</Property>
<Property name="parent">drawingPanel</Property>
<Property name="x"><![CDATA[x1]]></Property>
<Property name="y"><![CDATA[y1]]></Property>
<Property name="sizex"><![CDATA[x2-x1]]></Property>
<Property name="sizey"><![CDATA[y2-y1]]></Property>
<Property name="enabledSecondary"><![CDATA[false]]></Property>
<Property name="enabled"><![CDATA[false]]></Property>
<Property name="style"><![CDATA[ARROW]]></Property>
<Property name="color"><![CDATA[RED]]></Property>
<Property name="secondaryColor"><![CDATA[RED]]></Property>
<Property name="stroke"><![CDATA[2]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Arrow</Type>
<Property name="name">ray2</Property>
<Property name="parent">drawingPanel</Property>
<Property name="x"><![CDATA[x2]]></Property>
<Property name="y"><![CDATA[y2]]></Property>
<Property name="sizex"><![CDATA[x3-x2]]></Property>
<Property name="sizey"><![CDATA[y3-y2]]></Property>
<Property name="enabledSecondary"><![CDATA[false]]></Property>
<Property name="enabled"><![CDATA[false]]></Property>
<Property name="style"><![CDATA[ARROW]]></Property>
<Property name="color"><![CDATA[RED]]></Property>
<Property name="secondaryColor"><![CDATA[RED]]></Property>
<Property name="stroke"><![CDATA[2]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Particle</Type>
<Property name="name">point1</Property>
<Property name="parent">drawingPanel</Property>
<Property name="x"><![CDATA[x1]]></Property>
<Property name="y"><![CDATA[y1]]></Property>
<Property name="sizex"><![CDATA[0.2]]></Property>
<Property name="sizey"><![CDATA[0.2]]></Property>
<Property name="enabled"><![CDATA[true]]></Property>
<Property name="dragaction"><![CDATA[if (y1 < 0.0)
{
  y1 = 0.0;
}
_view.resetTraces();]]></Property>
<Property name="color"><![CDATA[RED]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Particle</Type>
<Property name="name">point2</Property>
<Property name="parent">drawingPanel</Property>
<Property name="x"><![CDATA[x2]]></Property>
<Property name="y"><![CDATA[y2]]></Property>
<Property name="sizex"><![CDATA[0.2]]></Property>
<Property name="sizey"><![CDATA[0.2]]></Property>
<Property name="enabled"><![CDATA[true]]></Property>
<Property name="dragaction"><![CDATA[y2 = zeroval]]></Property>
<Property name="color"><![CDATA[GREEN]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Particle</Type>
<Property name="name">point3</Property>
<Property name="parent">drawingPanel</Property>
<Property name="x"><![CDATA[x3]]></Property>
<Property name="y"><![CDATA[y3]]></Property>
<Property name="sizex"><![CDATA[0.2]]></Property>
<Property name="sizey"><![CDATA[0.2]]></Property>
<Property name="enabled"><![CDATA[true]]></Property>
<Property name="dragaction"><![CDATA[if (y3 > 0.0)
 {
   y3 = 0.0;
 }
 _view.resetTraces();]]></Property>
<Property name="color"><![CDATA[MAGENTA]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Expanded>false</Expanded>
<Type>Elements.PlottingPanel</Type>
<Property name="name">plottingPanel</Property>
<Property name="parent">MainWindow</Property>
<Property name="position">center</Property>
<Property name="autoscaleX"><![CDATA[true]]></Property>
<Property name="autoscaleY"><![CDATA[true]]></Property>
<Property name="minimumX"><![CDATA[-5.0]]></Property>
<Property name="maximumX"><![CDATA[5.0]]></Property>
<Property name="minimumY"><![CDATA[20.0]]></Property>
<Property name="maximumY"><![CDATA[40.0]]></Property>
<Property name="title"><![CDATA["Travel time for light"]]></Property>
<Property name="titleX"><![CDATA["position (m)"]]></Property>
<Property name="titleY"><![CDATA["time (ns)"]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Trace</Type>
<Property name="name">plot</Property>
<Property name="parent">plottingPanel</Property>
<Property name="x"><![CDATA[x2]]></Property>
<Property name="y"><![CDATA[t]]></Property>
<Property name="norepeat"><![CDATA[true]]></Property>
<Property name="connected"><![CDATA[true]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.Particle</Type>
<Property name="name">current</Property>
<Property name="parent">plottingPanel</Property>
<Property name="x"><![CDATA[x2]]></Property>
<Property name="y"><![CDATA[t]]></Property>
<Property name="sizex"><![CDATA[0.5]]></Property>
<Property name="sizey"><![CDATA[1.0]]></Property>
<Property name="enabled"><![CDATA[false]]></Property>
<Property name="color"><![CDATA[RED]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Expanded>false</Expanded>
<Type>Elements.Frame</Type>
<Property name="name">helpBox</Property>
<Property name="title"><![CDATA[Help]]></Property>
<Property name="layout"><![CDATA[grid:0,1,0,0]]></Property>
<Property name="visible"><![CDATA[helpFlag]]></Property>
<Property name="onClosing"><![CDATA[helpFlag = false;
helpLabel = "Show Help";]]></Property>
<Property name="location"><![CDATA["0,0"]]></Property>
<Property name="size"><![CDATA["705,343"]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">line1</Property>
<Property name="parent">helpBox</Property>
<Property name="value"><![CDATA["Use the sliders to set the index of refraction of each medium."]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">line2</Property>
<Property name="parent">helpBox</Property>
<Property name="value"><![CDATA["Light travels from the red point in medium 1 to the purple point in medium 2."]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">line3</Property>
<Property name="parent">helpBox</Property>
<Property name="value"><![CDATA["The light travels via the green point on the interface (the boundary) between the media."]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">line4</Property>
<Property name="parent">helpBox</Property>
<Property name="value"><![CDATA["You can click-and-drag any of the three points to move them around."]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">line5</Property>
<Property name="parent">helpBox</Property>
<Property name="value"><![CDATA["The red point stays in medium 1 (at top), the purple point stays in medium 2 (on the bottom)."]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">line6</Property>
<Property name="parent">helpBox</Property>
<Property name="value"><![CDATA["The table at the bottom shows the travel time for the light."]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">line8</Property>
<Property name="parent">helpBox</Property>
<Property name="value"><![CDATA["The time graph shows light travel time as a function of the green point's position."]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">line10</Property>
<Property name="parent">helpBox</Property>
<Property name="value"><![CDATA["Use the Clear Graph button to clear the trace from the graph."]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
<Osejs.View.Creation.Element>
<Type>Elements.TextField</Type>
<Property name="name">line11</Property>
<Property name="parent">helpBox</Property>
<Property name="value"><![CDATA["You can completely reset the simulation, if necessary, with the Reset Simulation button."]]></Property>
<Property name="editable"><![CDATA[false]]></Property>
<Property name="font"><![CDATA[Dialog,BOLD,16]]></Property>
</Osejs.View.Creation.Element>
</Osejs.View.Creation>
</Osejs.View>
<Osejs.Experiment>
</Osejs.Experiment>
</Osejs>
