Difference between revisions of "Watt curve"

From JSXGraph Wiki
Jump to: navigation, search
(New page: With JSXGraph elements can be traced to visualize construced loci. <html> <link rel="stylesheet" type="text/css" href="http://jsxgraph.uni-bayreuth.de/distrib/jsxgraph.css" /> <script typ...)
 
m
Line 11: Line 11:
 
xax = board.createElement('axis', [[0,0],[1,0]]);
 
xax = board.createElement('axis', [[0,0],[1,0]]);
 
yax = board.createElement('axis', [[0,0],[0,1]]);
 
yax = board.createElement('axis', [[0,0],[0,1]]);
p1 = board.createElement('point', [7, 8], {style:2,name:"",fixed:true}); // Angabe fester Koordinaten
+
p1 = board.createElement('point', [7, 8], {style:2,name:"",fixed:true});
p2 = board.createElement('point', [15, 8], {style:2,name:"",fixed:true}); // Angabe fester Koordinaten
+
p2 = board.createElement('point', [15, 8], {style:2,name:"",fixed:true});
 
c1 = board.createElement('circle', [p1, 4.5]);
 
c1 = board.createElement('circle', [p1, 4.5]);
 
c2 = board.createElement('circle', [p2, 4.5]);
 
c2 = board.createElement('circle', [p2, 4.5]);
Line 39: Line 39:
 
xax = board.createElement('axis', [[0,0],[1,0]]);
 
xax = board.createElement('axis', [[0,0],[1,0]]);
 
yax = board.createElement('axis', [[0,0],[0,1]]);
 
yax = board.createElement('axis', [[0,0],[0,1]]);
p1 = board.createElement('point', [7, 8], {style:2,name:"",fixed:true}); // Angabe fester Koordinaten
+
p1 = board.createElement('point', [7, 8], {style:2,name:"",fixed:true});
p2 = board.createElement('point', [15, 8], {style:2,name:"",fixed:true}); // Angabe fester Koordinaten
+
p2 = board.createElement('point', [15, 8], {style:2,name:"",fixed:true});
 
c1 = board.createElement('circle', [p1, 4.5]);
 
c1 = board.createElement('circle', [p1, 4.5]);
 
c2 = board.createElement('circle', [p2, 4.5]);
 
c2 = board.createElement('circle', [p2, 4.5]);

Revision as of 08:39, 16 March 2009

With JSXGraph elements can be traced to visualize construced loci.

References

The underlying JavaScript code

board = JXG.JSXGraph.initBoard('jxgbox', {originX: 50, originY: 400, unitX: 25, unitY: 25, axis: false, grid: false});
xax = board.createElement('axis', [[0,0],[1,0]]);
yax = board.createElement('axis', [[0,0],[0,1]]);
p1 = board.createElement('point', [7, 8], {style:2,name:"",fixed:true});
p2 = board.createElement('point', [15, 8], {style:2,name:"",fixed:true});
c1 = board.createElement('circle', [p1, 4.5]);
c2 = board.createElement('circle', [p2, 4.5]);
g1 = board.createElement('glider', [0, 0, c1], {style:5,name:"Drag me"});
c3 = board.createElement('circle', [g1, 8]);
g2 = board.createElement('point', [board.intersectionFunc(c2,c3,0)], {style:5, name: ""});
g3 = board.createElement('point', [board.intersectionFunc(c2,c3,1)], {style:5, name: ""});
m1 = board.createElement('midpoint', [g1,g2], {style:8,name:"",trace:true});
m2 = board.createElement('midpoint', [g1,g3], {style:8,name:"",trace:true,strokeColor:'green'});

function clearTrace() {
    m1.clearTrace();
    m2.clearTrace();
}