Difference between revisions of "Circles on circles"

From JSXGraph Wiki
Jump to navigationJump to search
Line 20: Line 20:
 
orientation: "horizontal",range: "min",min: 1,max: 100,value: 7,
 
orientation: "horizontal",range: "min",min: 1,max: 100,value: 7,
 
slide: function(event, ui) {
 
slide: function(event, ui) {
$("#f1").val(ui.value*0.01);
+
$("#f1").val(ui.value);
 +
                                f1 = ui.value;
 +
                                board.update();
 
}
 
}
 
});
 
});
Line 63: Line 65:
 
  board = JXG.JSXGraph.initBoard('jsxgbox', {originX: 250, originY: 250, unitX: 100, unitY: 100});
 
  board = JXG.JSXGraph.initBoard('jsxgbox', {originX: 250, originY: 250, unitX: 100, unitY: 100});
 
alert($("#c1").value);
 
alert($("#c1").value);
var c = board.createElement('curve', [
+
var c1 = 1;
 +
var c2 = 0.5;
 +
var f1 = 7;
 +
var f2 = 17;
 +
var c = board.createElement('curve', [
 
               function(t) { return Math.cos(t)+ 0.5*Math.cos(t);},
 
               function(t) { return Math.cos(t)+ 0.5*Math.cos(t);},
 
               function(t) { return Math.sin(t)+ 0.5*Math.sin(3*t);},
 
               function(t) { return Math.sin(t)+ 0.5*Math.sin(3*t);},

Revision as of 13:05, 29 June 2009