Selasa, 15 Februari 2011

Tugas Animasi Radian

<html>
<table>

<p><strong>Geser</strong> titik D mengitari lingkaran (dengan radius 6) dan catat berapa sudut dalam radian. Panjang <strong>busur biru </strong> juga berubah ketika Anda menggeser mengitari lingkaran. Berlawanan arah jarum jam adalah positif.
</td>
</table>

<script src='http://www.intmath.com/includes/jsxgraphcore.js' type='text/javascript'></script></p>

<div id="jxgbox8" class="jxgbox" style="width:450px; height:470px;border:2px solid gray;padding:0;font-family:'Times New Roman', Times, serif;position:relative"></div>
<pre>
<script type="text/javascript">
//<![CDATA[
brd = JXG.JSXGraph.initBoard('jxgbox8',
{axis:true,originX: 200, originY: 250, unitX: 30, unitY: 30,showCopyright:false});
axT1 = brd.create('text',[0.1,6.7, 'α = π/2 = 1.57']);
axT2 = brd.create('text',[-5.8,0.4, 'α = π = 3.14']);
axT3 = brd.create('text',[0.1,-6.4, 'α = 3π/2 = 4.17']);
myRadius = 6;
var qr = [];
qr[5] = brd.create('point', [0,0], {fixed:true,visible:false});
qr[6] = brd.create('point', [1,0],{visible:false});
qr[7] = brd.create('point', [myRadius,0],{visible:false});
var circ = brd.create('circle',[qr[5], myRadius],{strokeColor:'#bfbfbf', strokeWidth:1});
gmm = brd.create('glider', [3,2.7,circ], {style:5,fillColor:'magenta',label:'P'});
ang1 = brd.create('angle', [qr[6],qr[5],gmm]);
arc1 = brd.create('arc', [qr[5],qr[7],gmm]);
var li1 = brd.createElement('segment',[qr[5],gmm],
{strokeWidth:2, strokeColor:'#dddddd'});
el2 = brd.create('text',[4,6.5,
function(x){
if(gmm.X()<0) {
myTheta = Math.round(100*(Math.PI+Math.atan(gmm.Y()/gmm.X())))/100;
}else if (gmm.Y() < 0){
myTheta = Math.round(100*(2*Math.PI+Math.atan(gmm.Y()/gmm.X())))/100;
} else {
myTheta = Math.round(100*Math.atan(gmm.Y()/gmm.X()))/100;
}
if (myTheta == 1) {
units = ' radian';
} else {
units = ' radians';
}
return "α = " + myTheta + units;
}
],{fontSize:16+'px'}
);
el3 = brd.create('text',[4,7.5,
function(x){
if(gmm.X()<0){
myLength = myRadius*Math.round(100*(Math.PI+Math.atan(gmm.Y()/gmm.X())))/100;
} else if (gmm.Y() < 0){
myLength = myRadius*Math.round(100*(2*Math.PI+Math.atan(gmm.Y()/gmm.X())))/100;
} else {
myLength = myRadius*Math.round(100*Math.atan(gmm.Y()/gmm.X()))/100;
}
return "Panjang Busur = " + myLength;
}
],{fontSize:14+'px'}
);
//]]>
</script>
</pre>

</html>

Tidak ada komentar:

Posting Komentar