Construction of a constrained point: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 6: Line 6:
var b = JXG.JSXGraph.initBoard('jxgbox1', {originX: 40, originY: 100, unitX: 40, unitY: 40});
var b = JXG.JSXGraph.initBoard('jxgbox1', {originX: 40, originY: 100, unitX: 40, unitY: 40});
var free = b.createElement('point',[0,0], {name:'A', style:5});
var free = b.createElement('point',[0,0], {name:'A', style:5});
var dep = b.createElement('point',["X(A)",1], {name:'B, style:8});
var dep = b.createElement('point',["X(A)",1], {name:'B', style:8});
</source>
</source>
<html>
<html>
Line 16: Line 16:
var b = JXG.JSXGraph.initBoard('jxgbox1', {originX: 40, originY: 100, unitX: 40, unitY: 40});
var b = JXG.JSXGraph.initBoard('jxgbox1', {originX: 40, originY: 100, unitX: 40, unitY: 40});
var free = b.createElement('point',[0,0], {name:'A', style:5});
var free = b.createElement('point',[0,0], {name:'A', style:5});
var dep = b.createElement('point',["X(A)",1], {name:'B, style:8});
var dep = b.createElement('point',["X(A)",1], {name:'B', style:8});
</script>
</script>
<br clear=all>
<br clear=all>

Revision as of 09:58, 17 September 2008

A point can depend on another geometric object. This dependence can be given by using JavaScript syntax or by using GEONExT syntax. Here is an example using GEONExT syntax. The point A is draggable. The point B depends on point A: Its y-coordinate is set to 1 and its x-coordinate is set to the x-coordinate of A.

var b = JXG.JSXGraph.initBoard('jxgbox1', {originX: 40, originY: 100, unitX: 40, unitY: 40});
var free = b.createElement('point',[0,0], {name:'A', style:5});
var dep = b.createElement('point',["X(A)",1], {name:'B', style:8});