class GraphLine { int thick; int[] start = new int[3]; int[] end = new int[3]; int c; int lengthX, lengthY, lengthZ; GraphLine(int glThick, int glColor, int x1, int y1, int z1, int x2, int y2, int z2) { thick = glThick; c = glColor; start[0] = x1; start[1] = y1; start[2] = z1; end[0] = x2; end[1] = y2; end[2] = z2; lengthX = abs(start[0]-end[0]); lengthY = abs(start[1]-end[1]); lengthZ = abs(start[2]-end[2]); } void display() { fill(c); // set the fill color to be whatever is store in this object's circleColor property pushMatrix(); translate((start[0]+end[0])/2, (start[1]+end[1])/2, (start[2]+end[2])/2); box(thick+lengthX, thick+lengthY, thick+lengthZ); popMatrix(); } }