import java.applet.Applet;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Image;

public class Descartes extends Applet {
	
	int AppletWidth,AppletHeight;
	Image        OffScreen;
	Graphics     drawOffScreen;

	public void init()
	{
		setBackground(Color.black);


		AppletWidth = getSize().width;
		AppletHeight = getSize().height;


		OffScreen     = createImage(AppletWidth,AppletHeight);
		drawOffScreen = OffScreen.getGraphics();
	}

	public void paint(Graphics g)
	{
		drawOffScreen.clearRect(0,0,AppletWidth,AppletHeight);
		drawOffScreen.setColor(Color.white);

		int i,j;
		double x,y,r;

		for ( i = 0; i <= 90; i++ )
			for ( j = 0; j <= 90; j++ )
			{

				r=Math.PI/45*i*(1-Math.sin(Math.PI/45*j))*18;
				x=r*Math.cos(Math.PI/45*j)*Math.sin(Math.PI/45*i)
				+AppletWidth/2;
				y=-r*Math.sin(Math.PI/45*j)+AppletHeight/4;


				drawOffScreen.fillOval((int)x,(int)y,2,2);
			}

		g.drawImage(OffScreen,0,0,this);
	}
}

 


阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6