Difference between revisions of "Circle approximation"

From JSXGraph Wiki
Jump to navigationJump to search
Line 8: Line 8:
 
var rot = brd.createElement('transform', [function() {return Math.PI*2.0/n.Value();},p0], {type:'rotate'});  // angle, rotation center
 
var rot = brd.createElement('transform', [function() {return Math.PI*2.0/n.Value();},p0], {type:'rotate'});  // angle, rotation center
 
var ptmp = brd.createElement('point',[0,0],{visible:false,withLabel:false});  // dummy point for the rotation
 
var ptmp = brd.createElement('point',[0,0],{visible:false,withLabel:false});  // dummy point for the rotation
var cOut = brd.createElement('curve',[[],[]],{fillColor:'#0033ff',highlightFillColor:'#0033ff',fillOpacity:0.5});
+
var cOut = brd.createElement('curve',[[],[]],{fillColor:'#0033ff',highlightFillColor:'#0033ff',fillOpacity:0.5,highlightFillOpacity:0.5});
var cIn = brd.createElement('curve',[[],[]],{fillColor:'#ff3300',highlightFillColor:'#ff3300',fillOpacity:0.5});
+
var cIn = brd.createElement('curve',[[],[]],{fillColor:'#ff3300',highlightFillColor:'#ff3300',fillOpacity:0.5,highlightFillOpacity:0.5});
  
 
cIn.updateDataArray = function() {
 
cIn.updateDataArray = function() {

Revision as of 11:37, 24 June 2009

The underlying JavaScript code