Circle with ticks: Difference between revisions
From JSXGraph Wiki
A WASSERMANN (talk | contribs) No edit summary |
A WASSERMANN (talk | contribs) No edit summary |
||
Line 18: | Line 18: | ||
this.dataY = []; | this.dataY = []; | ||
for (i = 0; i < steps; i++) { | for (i = 0; i < steps; i++) { | ||
this.dataX.push( cx + 0.95 * Math.cos(i * alpha) ); | this.dataX.push( cx + 0.95 * r * Math.cos(i * alpha) ); | ||
this.dataY.push( cx + 0.95 * Math.sin(i * alpha) ); | this.dataY.push( cx + 0.95 * r * Math.sin(i * alpha) ); | ||
this.dataX.push( cx + 1.05 * Math.cos(i * alpha) ); | this.dataX.push( cx + 1.05 * r * Math.cos(i * alpha) ); | ||
this.dataY.push( cx + 1.05 * Math.sin(i * alpha) ); | this.dataY.push( cx + 1.05 * r * Math.sin(i * alpha) ); | ||
} | } | ||