gst_example_dynamic_range.xml 1.32 KB
Newer Older
1 2 3 4 5
<vertical>
    <graphical_slider_tool>
      <render>
        <h2>Graphic slider tool: Dynamic range and implicit functions.</h2>

6
        <p>You can make x range (not ticks of x axis) of functions to depend on
7 8
          parameter value. This can be useful when function domain depends
          on parameter.</p>
9
        <p>Also implicit functons like circle can be plotted as 2 separate
10 11 12 13 14 15 16 17 18 19 20 21
            functions of same color.</p>
         <div style="height:50px;">
         <slider var='a' style="width:400px;float:left;"/>
         <textbox var='a' style="float:left;width:60px;margin-left:15px;"/>
       </div>
        <plot style="margin-top:15px;margin-bottom:15px;"/>
      </render>
      <configuration>
        <parameters>
            <param var="a" min="5" max="25" step="0.5" initial="12.5" />
        </parameters>
        <functions>
22 23
          <function color="red">Math.sqrt(a * a - x * x)</function>
          <function color="red">-Math.sqrt(a * a - x * x)</function>
24 25 26 27
        </functions>
        <plot>
          <xrange>
            <!-- dynamic range -->
28 29
              <min>-a</min>
              <max>a</max>
30 31 32 33 34 35 36 37
          </xrange>
          <num_points>1000</num_points>
          <xticks>-30, 6, 30</xticks>
          <yticks>-30, 6, 30</yticks>
        </plot>
      </configuration>
    </graphical_slider_tool>
</vertical>