int[][][] SAT_SUBS; void getSAT_SUBS(){ BufferedReader reader; String singleline; SAT_SUBS = new int[6][5][12]; reader = createReader("SATdetail.txt"); for(int i=0;i<6;i++){ for(int j=0;j<5;j++){ try { singleline = reader.readLine(); }catch (IOException e) { singleline = null; e.printStackTrace(); } if(singleline!=null){ String[] pieces = split(singleline, TAB); for(int k=0;k<12;k++){ SAT_SUBS[i][j][k] = int(pieces[k]); } } } } } void detailSAT(){ int maxSub = max(SAT_SUBS[pos_x][0]); float ratio = 250.f / maxSub; strokeWeight(8); for(int i = 0;i < 5; i++){ stroke(subColor[i]); for(int j = 0;j < 12;j++){ float revlength = 250.f - SAT_SUBS[pos_x][i][j] * (ratio - 0.2); float angle = PI/6 * (j - 3) + PI / 30 * i ; line(250*cos(angle),250*sin(angle),revlength*cos(angle),revlength*sin(angle)); float d = dist(mouseX,mouseY,trancenter_x,trancenter_y); if(d >= revlength - 2.f && d <= 252.f){ if(abs(sin(angle)*(mouseX-trancenter_x)-cos(angle)*(mouseY-trancenter_y)) <= 3 && samesign(250*cos(angle),mouseX-trancenter_x) && samesign(250*sin(angle),mouseY-trancenter_y)){ textFont(f2); fill(255); text(SAT_SUBS[pos_x][i][j] + "",mouseX - trancenter_x, mouseY - trancenter_y - 5); } } } } translate(-trancenter_x,-trancenter_y); textFont(f2); textAlign(RIGHT); noStroke(); int wx = 1110; for(int j = 4;j >= 0;j--){ fill(subColor[j]); text(subNameSAT[j],wx, 40); wx -= (textWidth(subNameSAT[j]) + 50); } }