<meta charset="utf-8" />
<script src="http://spelprogrammering.nu/simple.js">
function start() 
{
    scale(2,2);
    translate(-totalWidth/2.8, -totalHeight/4);
    math.unitCircle();
    math.point(cos(pi/3), sin(pi/3), 5);
    math.point(0, 0, 3);
    math.line(0, 0, cos(pi/3), sin(pi/3), "brown");
    math.line(0, 0, cos(pi/3), 0, "red");
    math.line(cos(pi/3), 0, cos(pi/3), sin(pi/3), "red");
    math.arcRadians(0.2, pi/3, 2, "green");

    math.text(0.2, 0.46,  7, "1");
    math.text(0.2, 0.08,  7, "π/3");
    math.text(0.1, -0.08, 7, "cos(π/3)");
    math.text(0.52, 0.24, 7, "sin(π/3)");
    math.text(cos(pi/3)+0.05, sin(pi/3)+0.05,  15,
              "(cos(π/3), sin(π/3))");
}
</script>
        
Gå tillbaka