Watt curve

From JSXGraph Wiki
Revision as of 07:38, 16 March 2009 by Michael (talk | contribs) (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...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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}); // Angabe fester Koordinaten
p2 = board.createElement('point', [15, 8], {style:2,name:"",fixed:true}); // Angabe fester Koordinaten
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();
}