import java.applet.Applet;
import java.awt.Graphics;
import java.awt.Color;
public class SinusGKS extends Applet {
public void init() {
setBackground(Color.yellow);
} // init
public void paint(Graphics g) {
int xsize = getWidth();
int ysize = getHeight();
double x, y;
Vektor v = new Vektor();
GKS gks = new GKS(g, 0.0, -1.0,
2.0 * Math.PI, 1.0, xsize, ysize);
gks.postaviBoju(Color.red);
gks.idiNa(0.0, 0.0);
for(x = 0; x <= 2.0 * Math.PI + 0.1; x += 0.1) {
y = Math.sin(x);
gks.potegniDo(x, y);
}
} // paint
} // class SinusGKS