class Lathe extends Solid{ float[][][] bezierSegments; float rho=-PI*0.8, t=0; int segment=0; //----------- Lathe(){ super(); } //----------- void parse(String[] strs, int s){ Vector vector = new Vector(); for( ; sTWO_PI) rho = random(-0.1,0); if(t>1){ segment++; t = random(0,0.1); } if(segment>=bezierSegments.length){ segment = 0; rho += 0.01; } bx = bezierPoint(b[0][0], b[1][0], b[2][0], b[3][0], t); by = bezierPoint(b[0][1], b[1][1], b[2][1], b[3][1], t); x = bx * cos(rho);// + cos(rho)*10*cos(rho*4); y = by; z = bx * sin(rho);// + sin(rho)*10*cos(rho*4); return new Vector3D( x, y, z ); } }