This diagram was generated by
<SCRIPT Language="JavaScript">
document.open();
var D=new Diagram();
D.SetFrame(80, 160, 540, 460);
D.SetBorder(0, eval(2*Math.PI), -1, 1);
D.SetText("", "", "<B>some functions</B>");
D.Draw("#DDDDDD", "#000000", false, "");
var i, j, x;
for (i=80; i<=540; i++)
{ x = D.RealX(i);
j= D.ScreenY(Math.sin(x));
new Pixel(i, j, "#FF0000");
j= D.ScreenY(Math.cos(x));
new Pixel(i, j, "#0000FF");
}
new Bar(560, 200, 680, 220, "#0000FF", "f(x)=cos(x)", "#FFFFFF");
new Bar(560, 260, 680, 280, "#FF0000", "f(x)=sin(x)", "#000000");
document.close();
</SCRIPT>
You can use the following methods:
- var P = new Pixel(theX, theY, theColor) //Constructor and Display
- P.SetVisibility(isVisible) //Show or Hide
- P.MoveTo(theX, theY) //Move
- P.Delete() //Delete DIV object of P from the document
- delete P //Destructor