//
// FB 201003265
// Create a curve that passes thru N randomly selected points.
import java.applet.Applet;
import java.awt.*;
import java.awt.image.*;
import java.util.Random;
public class Curve extends Applet
{
Image img;
int w,h,x,y,pix[],red,green,blue,alpha;
Random rng=new Random();
int n=rng.nextInt(10)+5; // n random points
int[] arx=new int[n];
int[] ary=new int[n];
public void init()
{
w=getSize().width;
h=getSize().height;
alpha=255;
pix=new int[w*h];
img = createImage(new MemoryImageSource(w, h, pix, 0, w));
// n random points
for(int i=0;i