Tangents on circle: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 21: | Line 21: | ||
===The underlying JavaScript code=== | ===The underlying JavaScript code=== | ||
<source lang="javascript"> | <source lang="javascript"> | ||
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]); | |||
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]); | |||
</source> | </source> | ||
[[Category:Examples]] | [[Category:Examples]] | ||
[[Category:Geometry]] | [[Category:Geometry]] |
Revision as of 13:45, 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]);
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]);