Oh! I didn't know that
max() &
min() were able to compare whole arrays!
I don't have access to your CSV file. So I'm debugging your code blindly!
Line #26 -> I believe
pieces[] contains all elements present in the current line, right?
Lines #27 - #30 -> you have already decided you wanna pick 2nd + 3rd + 4th elements from
pieces[] .
So, why is this
for loop block for, since you're grabbing a big bite outta
pieces[] at once?
Generally,
for loops are used to interact w/ one element at a time, repeating this procedure until all elements are dealt with.
My advice is to just get rid of this
for (int i = 0; i < pieces.length; i++) . That lone
for (int k = 1; k < lines.length; k++) is enough! (Warning: UNTESTED!)
for (int k = 1; k = lines.length;) {
String[] pieces = split(lines[k++], ',');
float AX = float( pieces[1] );
float AY = float( pieces[2] );
float AZ = float( pieces[3] );
float MX = max(AX);
float MY = max(AY);
float MZ = max(AZ);
float mX = min(AX);
float mY = min(AY);
float mZ = min(AZ);
point(100, MX);
point(100, mX);
point(250, MY);
point(250, mY);
point(400, MZ);
point(400, mZ);
}