Slight Improvement of Java Ring of People
The code is only a little bit more complicated. (The improvement is
that the lines are thicker!!!)
import java.awt.*;
import java.applet.*;
public class fatL extends Applet {
public void init() {
setBackground(Color.cyan);
}
public void paint(Graphics g) {
int x,y,hx,hy;
for(int i=0;i < 360;i+=18)
{
x=(int)(90*Math.cos(i*Math.PI/180)+size().width/2);
y=(int)(90*Math.sin(i*Math.PI/180)+size().height/2-10);
for(int head=0;head < 360;head+=6)
{
hx=(int)(5*Math.cos(head*Math.PI/180)+x);
hy=(int)(5*Math.sin(head*Math.PI/180)+y);
g.fillOval(hx,hy,2,2);
}
for(int spine=y+5;spine < y+12;spine++) g.fillOval(x,spine,2,2);
for(int arms=x-7;arms < x+7;arms++) g.fillOval(arms,y+7,2,2);
for(int LX=x, LY=y+12;LX > x-10;LX--,LY++) g.fillOval(LX,LY,2,2);
for(int RX=x, RY=y+12;RX < x+10;RX++,RY++) g.fillOval(RX,RY,2,2);
}
}
}