class Tentacle{ int numSegments = 3; float[] x;// = new float[numSegments]; float[] y;// = new float[numSegments]; float[] z;// = new float[numSegments]; float[] angle;// = new float[numSegments]; float[] zangle;// = new float[numSegments]; float segLength = 2; float targetX, targetY, targetZ; float counter = 0; int alpha = 255; color c = color(255,255,255,alpha); int INCREASING = 0; int DECREASING = 1; int EYE = 2; int TYPE = INCREASING; Tentacle(float nx, float ny, float nz, int nseg, float nseglength){ numSegments = nseg; segLength = nseglength; x = new float[numSegments]; y = new float[numSegments]; z = new float[numSegments]; angle = new float[numSegments]; zangle = new float[numSegments]; x[x.length-1] = nx; // Set base x-coordinate y[x.length-1] = ny; // Set base y-coordinate z[x.length-1] = nz; } void setBase(float nx, float ny, float nz){ x[x.length-1] = nx; // Set base x-coordinate y[x.length-1] = ny; // Set base y-coordinate z[x.length-1] = nz; } float getX(){ return x[0]; } float getY(){ return y[0]; } float getZ(){ return z[0]; } void setTarget(float nx, float ny, float nz){ targetX = nx; targetY = ny; targetZ = nz; } void drawMe(){ float sw = 20; reachSegment(0, targetX, targetY, targetZ); for(int i=1; i=1; i--) { positionSegment(i, i-1); } if(TYPE == INCREASING){ for(int i=0; i