<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://jsxgraph.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=132.180.198.123</id>
	<title>JSXGraph Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://jsxgraph.org/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=132.180.198.123"/>
	<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Special:Contributions/132.180.198.123"/>
	<updated>2026-04-06T15:17:23Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Main_Page&amp;diff=180</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Main_Page&amp;diff=180"/>
		<updated>2008-09-17T11:51:53Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== JSXGraph Wiki ==&lt;br /&gt;
Welcome to the JSXGraph Wiki. This Wiki provides information and examples about the use of JSXGraph. &lt;br /&gt;
&lt;br /&gt;
* [[Howto include JSXGraph into web pages]]&lt;br /&gt;
* [[Displaying GEONExT constructions]]&lt;br /&gt;
* [[Displaying Intergeo constructions]]&lt;br /&gt;
* [[Create your own constructions/visualizations using JavaScript]]&lt;br /&gt;
* [[Contributions]]&lt;br /&gt;
&lt;br /&gt;
To learn more about creating constructions with JSXGraph from the scratch visit the the examples category: [[:Category:Examples]]&lt;br /&gt;
&lt;br /&gt;
[http://jsxgraph.org Homepage of the JSXGraph project]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Main_Page&amp;diff=179</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Main_Page&amp;diff=179"/>
		<updated>2008-09-17T11:51:13Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== JSXGraph Wiki ==&lt;br /&gt;
Welcome to the JSXGraph Wiki. This Wiki provides information and examples about the use of JSXGraph. &lt;br /&gt;
&lt;br /&gt;
* [[Howto include JSXGraph into web pages]]&lt;br /&gt;
* [[Displaying GEONExT constructions]]&lt;br /&gt;
* [[Displaying Intergeo constructions]]&lt;br /&gt;
* [[Create your own constructions/visualizations using JavaScript]]&lt;br /&gt;
* [[Contributions]]&lt;br /&gt;
&lt;br /&gt;
Visit the the examples category: [[:Category:Examples]]&lt;br /&gt;
&lt;br /&gt;
[http://jsxgraph.org Homepage of the JSXGraph project]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Main_Page&amp;diff=178</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Main_Page&amp;diff=178"/>
		<updated>2008-09-17T11:50:54Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== JSXGraph Wiki ==&lt;br /&gt;
Welcome to the JSXGraph Wiki. This Wiki provides information and examples about the use of JSXGraph. &lt;br /&gt;
&lt;br /&gt;
* [[Howto include JSXGraph into web pages]]&lt;br /&gt;
* [[Displaying GEONExT constructions]]&lt;br /&gt;
* [[Displaying Intergeo constructions]]&lt;br /&gt;
* [[Create your own constructions/visualizations using JavaScript]]&lt;br /&gt;
* [[Contributions]]&lt;br /&gt;
&lt;br /&gt;
Visit the the examples category: [[Category:Examples]]&lt;br /&gt;
&lt;br /&gt;
[http://jsxgraph.org Homepage of the JSXGraph project]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Main_Page&amp;diff=177</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Main_Page&amp;diff=177"/>
		<updated>2008-09-17T11:50:28Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== JSXGraph Wiki ==&lt;br /&gt;
Welcome to the JSXGraph Wiki. This Wiki provides information and examples about the use of JSXGraph. &lt;br /&gt;
&lt;br /&gt;
* [[Howto include JSXGraph into web pages]]&lt;br /&gt;
* [[Displaying GEONExT constructions]]&lt;br /&gt;
* [[Displaying Intergeo constructions]]&lt;br /&gt;
* [[Create your own constructions/visualizations using JavaScript]]&lt;br /&gt;
* [[Contributions]]&lt;br /&gt;
&lt;br /&gt;
Visit the the examples category: [[Examples]]&lt;br /&gt;
&lt;br /&gt;
[http://jsxgraph.org Homepage of the JSXGraph project]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Change_Equation_of_a_Graph&amp;diff=154</id>
		<title>Change Equation of a Graph</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Change_Equation_of_a_Graph&amp;diff=154"/>
		<updated>2008-09-17T11:07:22Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: /* JavaScript Part */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This example shows how you can change the equation of a graph without creating the whole construction again. Dependend elements are updated automatically.&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;link rel=&amp;quot;stylesheet&amp;quot; type=&amp;quot;text/css&amp;quot; href=&amp;quot;http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://jsxgraph.uni-bayreuth.de/distrib/prototype.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:960px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;jxgbox&amp;quot; class=&amp;quot;jxgbox&amp;quot; style=&amp;quot;width:600px; height:400px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;eingabe&amp;quot; value=&amp;quot;Math.sin(x)*Math.cos(x)&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;set&amp;quot; onClick=&amp;quot;doIt()&amp;quot; style=&#039;margin:1em&#039;&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;debug&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
    /* &amp;lt;![CDATA[ */&lt;br /&gt;
&lt;br /&gt;
        board = JXG.JSXGraph.initBoard(&#039;jxgbox&#039;, {originX: 250, originY: 250, unitX: 40, unitY: 20});&lt;br /&gt;
        b1axisx = board.createElement(&#039;axis&#039;, [[1,0], [0,0]], {});&lt;br /&gt;
        b1axisy = board.createElement(&#039;axis&#039;, [[0,1], [0,0]], {});&lt;br /&gt;
		&lt;br /&gt;
	eval(&amp;quot;function f(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}&amp;quot;);&lt;br /&gt;
	graph = board.createElement(&#039;curve&#039;, [&amp;quot;x&amp;quot;, function(x){ return f(x); }, &amp;quot;x&amp;quot;, -10, 10],{curveType:&#039;plot&#039;});						&lt;br /&gt;
	//graph = eval(&amp;quot;board.createElement(&#039;curve&#039;, [&#039;x&#039;, function(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}, &#039;x&#039;, -10, 10])&amp;quot;,{curveType:&#039;plot&#039;});&lt;br /&gt;
        p1 = board.createElement(&#039;glider&#039;, [0,0,graph], {style:6, name:&#039;P&#039;});&lt;br /&gt;
        p2 = board.createElement(&#039;point&#039;, [function() { return p1.X()+1;}, function() {return p1.Y()+board.algebra.D(graph.Y)(p1.X());}], {style:1, name:&#039;&#039;});&lt;br /&gt;
        l1 = board.createElement(&#039;line&#039;, [p1,p2],{});&lt;br /&gt;
        p3 = board.createElement(&#039;point&#039;, [function() { return p2.X();}, function() {return p1.Y();}],{style:1, name:&#039;&#039;});&lt;br /&gt;
        pol = board.createElement(&#039;polygon&#039;, [p1,p2,p3], {});&lt;br /&gt;
        t = board.createElement(&#039;text&#039;, [function(){return p1.X()+1.1;},function(){return p1.Y()+(p2.Y()-p3.Y())/2;},function(){ return &amp;quot;m=&amp;quot;+(board.round(p2.Y()-p3.Y(),2));}]); &lt;br /&gt;
            &lt;br /&gt;
        function doIt(){&lt;br /&gt;
        	eval(&amp;quot;function f(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}&amp;quot;);&lt;br /&gt;
        	graph.Y = function(x){ return f(x); };&lt;br /&gt;
    		graph.updateCurve();&lt;br /&gt;
    		board.update();&lt;br /&gt;
        } &lt;br /&gt;
        &lt;br /&gt;
  /* ]]&amp;gt; */&lt;br /&gt;
  &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Create this Construction ==&lt;br /&gt;
&lt;br /&gt;
=== HTML Part ===&lt;br /&gt;
&#039;&#039;&#039;Adding a text input field somewhere on the page together with a button&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;eingabe&amp;quot; value=&amp;quot;Math.sin(x)*Math.cos(x)&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;set&amp;quot; onClick=&amp;quot;doIt()&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Part ===&lt;br /&gt;
&#039;&#039;&#039;Setting up the board&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
board = JXG.JSXGraph.initBoard(&#039;jxgbox&#039;, {originX: 250, originY: 250, unitX: 40, unitY: 20});&lt;br /&gt;
// Axes&lt;br /&gt;
b1axisx = board.createElement(&#039;axis&#039;, [[1,0], [0,0]], {});&lt;br /&gt;
b1axisy = board.createElement(&#039;axis&#039;, [[0,1], [0,0]], {});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create a JavaScript Function f(x) From the Text Field&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
eval(&amp;quot;function f(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Use f(x) for defining the Graph&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
graph = board.createElement(&#039;curve&#039;, [&amp;quot;x&amp;quot;, function(x){ return f(x); }, &amp;quot;x&amp;quot;, -10, 10],{curveType:&#039;plot&#039;});						&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Define Further Elements&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
//glider on the curve&lt;br /&gt;
p1 = board.createElement(&#039;glider&#039;, [0,0,graph], {style:6, name:&#039;P&#039;});&lt;br /&gt;
//define the derivative of f&lt;br /&gt;
g = board.algebra.D(f);&lt;br /&gt;
//a point on the tangent&lt;br /&gt;
//                                 variable x coordinate           variable y coordinate depending on the derivative of f at point p1.X()&lt;br /&gt;
p2 = board.createElement(&#039;point&#039;, [function() { return p1.X()+1;}, function() {return p1.Y()+board.algebra.D(graph.Y)(p1.X());}], {style:1, name:&#039;&#039;});&lt;br /&gt;
//the tangent &lt;br /&gt;
l1 = board.createElement(&#039;line&#039;, [p1,p2],{}); &lt;br /&gt;
//a third point fpr the slope triangle&lt;br /&gt;
p3 = board.createElement(&#039;point&#039;, [function() { return p2.X();}, function() {return p1.Y();}],{style:1, name:&#039;&#039;});&lt;br /&gt;
//the slope triangle&lt;br /&gt;
pol = board.createElement(&#039;polygon&#039;, [p1,p2,p3], {});&lt;br /&gt;
//a text for displaying slope&#039;s value&lt;br /&gt;
//                               variable x coordinate          variable y coordinate                        variable value&lt;br /&gt;
t = board.createElement(&#039;text&#039;, [function(){return p1.X()+1.1;},function(){return p1.Y()+(p2.Y()-p3.Y())/2;},function(){ return &amp;quot;m=&amp;quot;+(board.round(p2.Y()-p3.Y(),2));}],{color:ff0000}); &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Define JavaScript Function doIt() for Reacting on User Input&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function doIt(){&lt;br /&gt;
  //redefine function f according to the current text field value&lt;br /&gt;
  eval(&amp;quot;function f(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}&amp;quot;);&lt;br /&gt;
  //change the Y attribute of the graph to the new function &lt;br /&gt;
  graph.Y = function(x){ return f(x); };&lt;br /&gt;
  //update the graph&lt;br /&gt;
  graph.updateCurve();&lt;br /&gt;
  //update the whole board&lt;br /&gt;
  board.update();&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
The doIt() function is only responsible for updating the graph. All other dependend objects are self-updating, especially the object p2 which depends on the derivative of function f. This is all done by aononymous functions of JavaScript.&lt;br /&gt;
[[Category:Examples]]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Layer_Model&amp;diff=95</id>
		<title>Layer Model</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Layer_Model&amp;diff=95"/>
		<updated>2008-09-16T20:01:47Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This illustrationshows the layer model of JSXGraph and dependend applications.&lt;br /&gt;
&lt;br /&gt;
[[Image:Layermodel.png|550px]]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Layer_Model&amp;diff=94</id>
		<title>Layer Model</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Layer_Model&amp;diff=94"/>
		<updated>2008-09-16T20:01:14Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This illustrationshows the layer model of JSXGraph and dependend applications.&lt;br /&gt;
&lt;br /&gt;
[[Image:Layermodel.png|400px]]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Layer_Model&amp;diff=93</id>
		<title>Layer Model</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Layer_Model&amp;diff=93"/>
		<updated>2008-09-16T19:58:57Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This illustrationshows the layer model of JSXGraph and dependend applications.&lt;br /&gt;
&lt;br /&gt;
[[Image:Layermodel.png]]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Layer_Model&amp;diff=92</id>
		<title>Layer Model</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Layer_Model&amp;diff=92"/>
		<updated>2008-09-16T19:58:43Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: New page: This illustrationshows the layer model of JSXGraph and dependend applications Image:Layermodel.png&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This illustrationshows the layer model of JSXGraph and dependend applications&lt;br /&gt;
[[Image:Layermodel.png]]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
	<entry>
		<id>https://jsxgraph.org/wiki/index.php?title=Change_Equation_of_a_Graph&amp;diff=90</id>
		<title>Change Equation of a Graph</title>
		<link rel="alternate" type="text/html" href="https://jsxgraph.org/wiki/index.php?title=Change_Equation_of_a_Graph&amp;diff=90"/>
		<updated>2008-09-16T11:57:11Z</updated>

		<summary type="html">&lt;p&gt;132.180.198.123: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This example shows how you can change the equation of a graph without creating the whole construction again. Dependend elements are updated automatically.&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://jsxgraph.uni-bayreuth.de/distrib/prototype.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://jsxgraph.uni-bayreuth.de/distrib/loadjsxgraphXML.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://jsxgraph.uni-bayreuth.de/distrib/jsxgraphcore.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;div style=&amp;quot;width:960px&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;jxgbox&amp;quot; class=&amp;quot;jxgbox&amp;quot; style=&amp;quot;width:600px; height:400px; float:left; &amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;p style=&amp;quot;float:right&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;eingabe&amp;quot; value=&amp;quot;Math.sin(x)*Math.cos(x)&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;set&amp;quot; onClick=&amp;quot;doIt()&amp;quot; style=&#039;margin:1em&#039;&amp;gt; &lt;br /&gt;
&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br clear=all&amp;gt;&lt;br /&gt;
&amp;lt;div id=&amp;quot;debug&amp;quot; style=&amp;quot;display:none;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
   &amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;
    /* &amp;lt;![CDATA[ */&lt;br /&gt;
&lt;br /&gt;
        board = JXG.JSXGraph.initBoard(&#039;jxgbox&#039;, {originX: 250, originY: 250, unitX: 40, unitY: 20});&lt;br /&gt;
		// Axes&lt;br /&gt;
        b1axisx = board.createElement(&#039;axis&#039;, [[1,0], [0,0]], {});&lt;br /&gt;
        b1axisy = board.createElement(&#039;axis&#039;, [[0,1], [0,0]], {});&lt;br /&gt;
		&lt;br /&gt;
		eval(&amp;quot;function f(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}&amp;quot;);&lt;br /&gt;
		graph = board.createElement(&#039;curve&#039;, [function(x){ return x; }, function(x){ return f(x); }, &amp;quot;x&amp;quot;, -10, 10]);						&lt;br /&gt;
		//graph = eval(&amp;quot;board.createElement(&#039;curve&#039;, [function(x){ return x; }, function(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}, &#039;x&#039;, -10, 10])&amp;quot;);&lt;br /&gt;
		//graph.curveType = &amp;quot;graph&amp;quot;;&lt;br /&gt;
        p1 = board.createElement(&#039;glider&#039;, [graph], {style:6, name:&#039;P&#039;});&lt;br /&gt;
        p2 = board.createElement(&#039;point&#039;, [function() { return p1.X()+1;}, function() {return p1.Y()+board.algebra.D(graph.Y)(p1.X());}], {style:1, name:&#039;&#039;});&lt;br /&gt;
        l1 = board.createElement(&#039;line&#039;, [p1,p2],{});&lt;br /&gt;
        p3 = board.createElement(&#039;point&#039;, [function() { return p2.X();}, function() {return p1.Y();}],{style:1, name:&#039;&#039;});&lt;br /&gt;
        pol = board.createElement(&#039;polygon&#039;, [p1,p2,p3], {});&lt;br /&gt;
        t = board.createElement(&#039;text&#039;, [function(){return p1.X()+1.1;},function(){return p1.Y()+(p2.Y()-p3.Y())/2;},function(){ return &amp;quot;m=&amp;quot;+(board.round(p2.Y()-p3.Y(),2));}]); &lt;br /&gt;
            &lt;br /&gt;
        function doIt(){&lt;br /&gt;
        	eval(&amp;quot;function f(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}&amp;quot;);&lt;br /&gt;
        	graph.Y = function(x){ return f(x); };&lt;br /&gt;
    		graph.updateCurve();&lt;br /&gt;
    		board.update();&lt;br /&gt;
        } &lt;br /&gt;
        &lt;br /&gt;
  /* ]]&amp;gt; */&lt;br /&gt;
  &amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== How to Create this Construction ==&lt;br /&gt;
&lt;br /&gt;
=== HTML Part ===&lt;br /&gt;
&#039;&#039;&#039;Adding a text input field somewhere on the page together with a button&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;text&amp;quot; id=&amp;quot;eingabe&amp;quot; value=&amp;quot;Math.sin(x)*Math.cos(x)&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;button&amp;quot; value=&amp;quot;set&amp;quot; onClick=&amp;quot;doIt()&amp;quot;&amp;gt; &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== JavaScript Part ===&lt;br /&gt;
&#039;&#039;&#039;Setting up the board&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
board = JXG.JSXGraph.initBoard(&#039;jxgbox&#039;, {originX: 250, originY: 250, unitX: 40, unitY: 20});&lt;br /&gt;
// Axes&lt;br /&gt;
b1axisx = board.createElement(&#039;axis&#039;, [[1,0], [0,0]], {});&lt;br /&gt;
b1axisy = board.createElement(&#039;axis&#039;, [[0,1], [0,0]], {});&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Create a JavaScript Function f(x) From the Text Field&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
eval(&amp;quot;function f(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}&amp;quot;);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Use f(x) for defining the Graph&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
graph = board.createElement(&#039;curve&#039;, [function(x){ return x; }, function(x){ return f(x); }, &amp;quot;x&amp;quot;, -10, 10]);&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Define Further Elements&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
//glider on the curve&lt;br /&gt;
p1 = board.createElement(&#039;glider&#039;, [graph], {style:6, name:&#039;P&#039;});&lt;br /&gt;
//define the derivative of f&lt;br /&gt;
g = board.algebra.D(f);&lt;br /&gt;
//a point on the tangent&lt;br /&gt;
//                                 variable x coordinate           variable y coordinate depending on the derivative of f at point p1.X()&lt;br /&gt;
p2 = board.createElement(&#039;point&#039;, [function() { return p1.X()+1;}, function() {return p1.Y()+board.algebra.D(graph.Y)(p1.X());}], {style:1, name:&#039;&#039;});&lt;br /&gt;
//the tangent &lt;br /&gt;
l1 = board.createElement(&#039;line&#039;, [p1,p2],{}); &lt;br /&gt;
//a third point fpr the slope triangle&lt;br /&gt;
p3 = board.createElement(&#039;point&#039;, [function() { return p2.X();}, function() {return p1.Y();}],{style:1, name:&#039;&#039;});&lt;br /&gt;
//the slope triangle&lt;br /&gt;
pol = board.createElement(&#039;polygon&#039;, [p1,p2,p3], {});&lt;br /&gt;
//a text for displaying slope&#039;s value&lt;br /&gt;
//                               variable x coordinate          variable y coordinate                        variable value&lt;br /&gt;
t = board.createElement(&#039;text&#039;, [function(){return p1.X()+1.1;},function(){return p1.Y()+(p2.Y()-p3.Y())/2;},function(){ return &amp;quot;m=&amp;quot;+(board.round(p2.Y()-p3.Y(),2));}],{color:ff0000}); &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Define JavaScript Function doIt() for Reacting on User Input&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;javascript&amp;quot;&amp;gt;&lt;br /&gt;
function doIt(){&lt;br /&gt;
  //redefine function f according to the current text field value&lt;br /&gt;
  eval(&amp;quot;function f(x){ return &amp;quot;+document.getElementById(&amp;quot;eingabe&amp;quot;).value+&amp;quot;;}&amp;quot;);&lt;br /&gt;
  //change the Y attribute of the graph to the new function &lt;br /&gt;
  graph.Y = function(x){ return f(x); };&lt;br /&gt;
  //update the graph&lt;br /&gt;
  graph.updateCurve();&lt;br /&gt;
  //update the whole board&lt;br /&gt;
  board.update();&lt;br /&gt;
} &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Remarks ==&lt;br /&gt;
The doIt() function is only responsible for updating the graph. All other dependend objects are self-updating, especially the object p2 which depends on the derivative of function f. This is all done by aononymous functions of JavaScript.&lt;br /&gt;
[[Category:Examples]]&lt;/div&gt;</summary>
		<author><name>132.180.198.123</name></author>
	</entry>
</feed>