Difference between revisions of "Tangents on circle"

From JSXGraph Wiki
Jump to navigationJump to search
Line 6: Line 6:
 
brd.options.point.fillOpacity = 0.8;
 
brd.options.point.fillOpacity = 0.8;
  
m = brd.createElement('point',[0.5,0.3]);
+
m = brd.create('point',[0.5,0.3]);
b = brd.createElement('point',[3,0]);
+
b = brd.create('point',[3,0]);
c = brd.createElement('circle',[m,b]);
+
c = brd.create('circle',[m,b]);
p = brd.createElement('point',[-4,2]);
+
p = brd.create('point',[-4,2]);
  
 
// If p is not on c, the tangent is the polar.
 
// If p is not on c, the tangent is the polar.
t = brd.createElement('tangent', [c,p], {name:'polar', withLabel:true});  
+
t = brd.create('tangent', [c,p], {name:'polar', withLabel:true});  
  
i1 = brd.createElement('intersection', [c,t,0],{visible:false});
+
i1 = brd.create('intersection', [c,t,0],{visible:false});
i2 = brd.createElement('intersection', [c,t,1],{visible:false});
+
i2 = brd.create('intersection', [c,t,1],{visible:false});
t1 = brd.createElement('tangent', [c,i1]);
+
t1 = brd.create('tangent', [c,i1]);
t2 = brd.createElement('tangent', [c,i2]);
+
t2 = brd.create('tangent', [c,i2]);
 
</jsxgraph>
 
</jsxgraph>
  
Line 28: Line 28:
 
brd.options.point.fillOpacity = 0.8;
 
brd.options.point.fillOpacity = 0.8;
  
m = brd.createElement('point',[0.5,0.3]);
+
m = brd.create('point',[0.5,0.3]);
b = brd.createElement('point',[3,0]);
+
b = brd.create('point',[3,0]);
c = brd.createElement('circle',[m,b]);
+
c = brd.create('circle',[m,b]);
p = brd.createElement('point',[-4,2]);
+
p = brd.create('point',[-4,2]);
  
 
// If p is not on c, the tangent is the polar.
 
// 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});  
  
i1 = brd.createElement('intersection', [c,t,0],{visible:false});
+
i1 = brd.create('intersection', [c,t,0],{visible:false});
i2 = brd.createElement('intersection', [c,t,1],{visible:false});
+
i2 = brd.create('intersection', [c,t,1],{visible:false});
t1 = brd.createElement('tangent', [c,i1]);
+
t1 = brd.create('tangent', [c,i1]);
t2 = brd.createElement('tangent', [c,i2]);
+
t2 = brd.create('tangent', [c,i2]);
 
</source>
 
</source>
  
 
[[Category:Examples]]
 
[[Category:Examples]]
 
[[Category:Geometry]]
 
[[Category:Geometry]]

Revision as of 17:27, 21 April 2010

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.create('point',[0.5,0.3]);
b = brd.create('point',[3,0]);
c = brd.create('circle',[m,b]);
p = brd.create('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.create('intersection', [c,t,0],{visible:false});
i2 = brd.create('intersection', [c,t,1],{visible:false});
t1 = brd.create('tangent', [c,i1]);
t2 = brd.create('tangent', [c,i2]);