import java.awt.*; import java.awt.event.*; import java.applet.Applet; import java.lang.*; public class anim2 extends Applet implements ActionListener{ int [] xkodar=new int[50]; int [] ykodar=new int[50]; int kodaraid=15; double knurk=Math.toRadians(360/kodaraid); double kmuut=Math.toRadians(2); double klisa=0; int kaike=0; int kiirus=2; TextField tfkiirus=new TextField(""+2); TextField tfy=new TextField(""); TextField tft=new TextField("käike: "+kaike); Button nupp=new Button("tehke"); Button stopnupp=new Button("stop"); int rattaraadius=50; int r1keskx=400; int r1kesky=400; int r2keskx=100; int r2kesky=400; boolean tehke=true; public void taidamas(int i, double klisa){ xkodar[i]=(int)(Math.sin(knurk*i-klisa)*rattaraadius); ykodar[i]=(int)(Math.cos(knurk*i-klisa)*rattaraadius); } void liigutakodarad(Graphics g){ g.setColor(Color.black); for(int i=0; i