public class Tube extends Shape {
	final int NSLATS;
	public Tube(int nslats) {
		NSLATS = nslats;
		init(2*NSLATS,NSLATS,4);
		for(int n = 0; n<NSLATS; ++n) {
			double th = 2*Math.PI*n/NSLATS,
					x = Math.cos(th),
					y = Math.sin(th);
			Vector3D outward = new Vector3D(x,y,0);
			vertices_[n]        = new PointyPoint(new Vector3D(x,y,1),outward);
			vertices_[n+NSLATS] = new PointyPoint(new Vector3D(x,y,-1),outward);
		}
		for(int n = 0; n<NSLATS; ++n) {
			faces_[n][0] = n;
			faces_[n][1] = (n+1)%NSLATS;
			faces_[n][2] = (n+1)%NSLATS+NSLATS;
			faces_[n][3] = n+NSLATS;
			//System.out.println("face " + face + " is " + faces_[face][0] + " " + faces_[face][1] + " " + faces_[face][2] + " " + faces_[face][3]);			
		}
	}
}
