Tangents on circle: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 11: Line 11:
p = brd.createElement('point',[-4,2]);
p = brd.createElement('point',[-4,2]);


// If p is not on c, the tangent is the polar.
t = brd.createElement('tangent', [c,p], {name:'polar', withLabel:true});  
t = brd.createElement('tangent', [c,p], {name:'polar', withLabel:true});  


Line 32: Line 33:
p = brd.createElement('point',[-4,2]);
p = brd.createElement('point',[-4,2]);


// If p is not on c, the tangent is the polar.
t = brd.createElement('tangent', [c,p], {name:'polar', withLabel:true});  
t = brd.createElement('tangent', [c,p], {name:'polar', withLabel:true});  



Revision as of 13:54, 22 September 2009

The underlying JavaScript code

brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5]});
brd.options.point.strokeColor = 'red';
brd.options.point.fillColor = 'red';
brd.options.point.strokeOpacity = 0.8;
brd.options.point.fillOpacity = 0.8;

m = brd.createElement('point',[0.5,0.3]);
b = brd.createElement('point',[3,0]);
c = brd.createElement('circle',[m,b]);
p = brd.createElement('point',[-4,2]);

// If p is not on c, the tangent is the polar.
t = brd.createElement('tangent', [c,p], {name:'polar', withLabel:true}); 

i1 = brd.createElement('intersection', [c,t,0],{visible:false});
i2 = brd.createElement('intersection', [c,t,1],{visible:false});
t1 = brd.createElement('tangent', [c,i1]);
t2 = brd.createElement('tangent', [c,i2]);