Difference between revisions of "Circle inversion"

From JSXGraph Wiki
Jump to: navigation, search
Line 1: Line 1:
 
The point <math>P'</math> is the result of a circle inversion of <math>P</math> on circle <math>c</math> (black circle line).
 
The point <math>P'</math> is the result of a circle inversion of <math>P</math> on circle <math>c</math> (black circle line).
 
<jsxgraph width="600" height="600">
 
<jsxgraph width="600" height="600">
brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5]});
+
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5]});
 
var m = brd.create('point',[0.5,0.3],{name:'M'});
 
var m = brd.create('point',[0.5,0.3],{name:'M'});
 
var b = brd.create('point',[3,0]);
 
var b = brd.create('point',[3,0]);
var c = brd.create('circle',[m,b],{strokeColor:'black'name:'c'});
+
var c = brd.create('circle',[m,b],{strokeColor:'black',name:'c'});
 
var m1 = brd.create('point',[-4,2],{name:'M_1'});
 
var m1 = brd.create('point',[-4,2],{name:'M_1'});
 
var b1 = brd.create('point',[-4,3],{name:'C_1'});
 
var b1 = brd.create('point',[-4,3],{name:'C_1'});
Line 10: Line 10:
 
var p = brd.create('glider',[-4,1,c1],{name:'P'});
 
var p = brd.create('glider',[-4,1,c1],{name:'P'});
  
// If p is not on c, the tangent is the polar.
+
var t = brd.create('polar', [c,p], {name:'polar', withLabel:true, strokeColor:'gray', dash:2});  
var t = brd.create('tangent', [c,p], {name:'polar', withLabel:true, strokeColor:'gray', dash:2});  
 
 
var l = brd.create('line', [m,p], {name:'', withLabel:false, strokeColor:'gray', dash:2});  
 
var l = brd.create('line', [m,p], {name:'', withLabel:false, strokeColor:'gray', dash:2});  
 
var s = brd.create('intersection', [l,t,0], {name:"P'", withLabel:true, trace:true});  
 
var s = brd.create('intersection', [l,t,0], {name:"P'", withLabel:true, trace:true});  
Line 18: Line 17:
 
===The underlying JavaScript code===
 
===The underlying JavaScript code===
 
<source lang="javascript">
 
<source lang="javascript">
 +
var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5]});
 +
var m = brd.create('point',[0.5,0.3],{name:'M'});
 +
var b = brd.create('point',[3,0]);
 +
var c = brd.create('circle',[m,b],{strokeColor:'black',name:'c'});
 +
var m1 = brd.create('point',[-4,2],{name:'M_1'});
 +
var b1 = brd.create('point',[-4,3],{name:'C_1'});
 +
var c1 = brd.create('circle',[m1,b1]);
 +
var p = brd.create('glider',[-4,1,c1],{name:'P'});
 +
 +
var t = brd.create('polar', [c,p], {name:'polar', withLabel:true, strokeColor:'gray', dash:2});
 +
var l = brd.create('line', [m,p], {name:'', withLabel:false, strokeColor:'gray', dash:2});
 +
var s = brd.create('intersection', [l,t,0], {name:"P'", withLabel:true, trace:true});
 
</source>
 
</source>
  
 
[[Category:Geometry]]
 
[[Category:Geometry]]
 
[[Category:Examples]]
 
[[Category:Examples]]

Revision as of 17:38, 21 April 2010

The point [math]P'[/math] is the result of a circle inversion of [math]P[/math] on circle [math]c[/math] (black circle line).

The underlying JavaScript code

var brd = JXG.JSXGraph.initBoard('jxgbox',{boundingbox:[-5,5,5,-5]});
var m = brd.create('point',[0.5,0.3],{name:'M'});
var b = brd.create('point',[3,0]);
var c = brd.create('circle',[m,b],{strokeColor:'black',name:'c'});
var m1 = brd.create('point',[-4,2],{name:'M_1'});
var b1 = brd.create('point',[-4,3],{name:'C_1'});
var c1 = brd.create('circle',[m1,b1]);
var p = brd.create('glider',[-4,1,c1],{name:'P'});

var t = brd.create('polar', [c,p], {name:'polar', withLabel:true, strokeColor:'gray', dash:2}); 
var l = brd.create('line', [m,p], {name:'', withLabel:false, strokeColor:'gray', dash:2}); 
var s = brd.create('intersection', [l,t,0], {name:"P'", withLabel:true, trace:true});