Circles on circles: Difference between revisions

From JSXGraph Wiki
No edit summary
No edit summary
Line 31: Line 31:


$("#sliderc2").slider({
$("#sliderc2").slider({
orientation: "horizontal",range: "min",min: 0,max: 100,value: 30,
orientation: "horizontal",range: "min",min: 0,max: 100,value: 0,
slide: function(event, ui) {
slide: function(event, ui) {
$("#c2").val(ui.value*0.01);
$("#c2").val(ui.value*0.01);
Line 70: Line 70:
<script language="JavaScript">
<script language="JavaScript">
  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);
var c1 = 0.6;
var c1 = 0.6;
var c2 = 0.3;  
var c2 = 0.0;  
var f1 = 7;  
var f1 = 7;  
var f2 = 17;
var f2 = 17;
Line 78: Line 77:
               function(t) { return Math.cos(t)+ c1*Math.cos(f1*t)+ c2*Math.cos(f2*t);},
               function(t) { return Math.cos(t)+ c1*Math.cos(f1*t)+ c2*Math.cos(f2*t);},
               function(t) { return Math.sin(t)+ c1*Math.sin(f1*t)+ c2*Math.sin(f2*t);},
               function(t) { return Math.sin(t)+ c1*Math.sin(f1*t)+ c2*Math.sin(f2*t);},
               0,2*Math.PI]);
               0,2.2*Math.PI]);
</script>
</script>
</html>
</html>

Revision as of 11:09, 29 June 2009