package graphics; public class Bottle extends Shape { BezierCurve curve; public Bottle() { super(50, 30); createCurve(); } public Bottle(int newM, int newN) { super(newM, newN); createCurve(); } private void createCurve() { curve = new BezierCurve(0.2, 0.2, 0.7, 0.5); } //convert u/v pair to xyz point protected double[] calculatePoint(double u, double v) { //point-normal pair double[] vertex = {0,0,0, 0,0,0, 0,0}; double theta = 2 * Math.PI * u; vertex[0] = curve.get(v) * Math.cos(theta); //x vertex[1] = curve.get(v) * Math.sin(theta); //y vertex[2] = v; //z //vertex[3] = Math.cos(theta); //nx //vertex[4] = Math.sin(theta); //ny //vertex[5] = 0; //nz vertex[6] = u; vertex[7] = v; return vertex; } //gotta overwrite this b/c of casting issues :-/ public Object clone() { Bottle newBottle = new Bottle(M, N); for (int i=0; i