Yhtälön ratkaisun harjoittelu
Yhtälön ratkaisun harjoittelu
Tämä simulaatio havainnollistaa muotoa ax + b = cx + d olevan yhtälön ratkaisun vaiheittain. Ensimmäinen liukupalkki on a, toinen liukupalkki on b, kolmas liukupalkki on c ja neljäs liukupalkki on d. Viidennellä liukupalkilla määrätään yhtälön ratkaisun vaihe (1 = alussa, 7 = lopussa). Simulaatiota kannattaa käyttää yhtälön ratkaisun harjoitteluun. Muodosta ensin yhtälö neljän ensimmäisen liukupalkin avulla. Kirjoita sitten oma ratkaisu paperille. Lopuksi tarkista oma ratkaisu nostamalla viidennen liukupalkin arvo yhdestä seitsemään. Kopioi alla oleva koodi ja suorita ohjelma. Älä tee koodiin muutoksia.
// Ohjelman tehnyt e-Oppi Oy
// 20.2.2018
float a = 165; // Laskurin alkuarvo
float b = 220; // Laskurin alkuarvo
float c = 385; // Laskurin alkuarvo
float d = 412; // Laskurin alkuarvo
float e = 1;
void setup () {
size(600,700); // ikkunan koko
}
void draw() {
background(255); // Tyhjennä tausta
stroke(0); // Musta viivan väri
strokeWeight(3);
textSize(30);
fill(0);
int x1 = mouseX; // Selvitä hiiren vaakakoordinaatti
int y1 = mouseY;
if (mousePressed == true) {
if ((y1 > 0) && (y1 < 30)) {
if ((x1>a) && (a < 550)) { // Jos hiiri on oikealla puolen
a++; // niin kasvata laskuria
}
if ((x1<a) && ( a >= 0)) { // Jos hiiri on vasemmalla puolen
a--; // niin pienennä laskuria
}
}
if ((y1 > 30) && (y1 < 60)) {
if ((x1>b) && (b < 550)) { // Jos hiiri on oikealla puolen
b++; // niin kasvata laskuria
}
if ((x1<b) && ( b >= 0)) { // Jos hiiri on vasemmalla puolen
b--; // niin pienennä laskuria
}
}
if ((y1 > 60) && (y1 < 90)) {
if ((x1>c) && (c < 550)) { // Jos hiiri on oikealla puolen
c++; // niin kasvata laskuria
}
if ((x1<c) && ( c >= 0)){ // Jos hiiri on vasemmalla puolen
c--; // niin pienennä laskuria
}
}
if ((y1 > 90) && (y1 < 120)) {
if ((x1>d) && (d < 550)) { // Jos hiiri on oikealla puolen
d++; // niin kasvata laskuria
}
if ((x1<d) && ( d >= 0)) { // Jos hiiri on vasemmalla puolen
d--; // niin pienennä laskuria
}
}
if ((y1 > 120) && (y1 < 150)) {
if ((x1>e) && (e < 550)) { // Jos hiiri on oikealla puolen
e++; // niin kasvata laskuria
}
if ((x1<e) && ( e >= 0)) { // Jos hiiri on vasemmalla puolen
e--; // niin pienennä laskuria
}
}
}
fill(0); // Musta tekstin väri
float a2 = round(map(a,0,550,-10,10));
float b2 = round(map(b,0,550,-10,10));
float c2 = round(map(c,0,550,-10,10));
float d2 = round(map(d,0,550,-10,10));
float e2 = round(map(e,0,550,1,7));
stroke(0); // Musta viivan väri
strokeWeight(3);
fill(255,255,0); // Keltainen täyttöväri
rect(0,0,599,30); // Piirrä keltainen suorakulmio
rect(0,30,599,30); // Piirrä keltainen suorakulmio
rect(0,60,599,30); // Piirrä keltainen suorakulmio
rect(0,90,599,30); // Piirrä keltainen suorakulmio
rect(0,120,599,30); // Piirrä keltainen suorakulmio
fill(255,100,100); // Punainen täyttöväri
rect(a,0,45,30); // Piirrä punainen neliö
rect(b,30,45,30); // Piirrä punainen neliö
rect(c,60,45,30); // Piirrä punainen neliö
rect(d,90,45,30); // Piirrä punainen neliö
rect(e,120,45,30); // Piirrä punainen neliö
if (e2 == 3) {
noStroke();
fill(186);
// rect(80,215,100,30);
// rect(260,215,100,30);
rect(155,500,140,150);
rect(425,500,140,150);
stroke(0);
}
if (e2 == 5) {
noStroke();
fill(186);
// rect(10,295,140,30);
// rect(170,295,120,30);
rect(85,500,145,150);
rect(300,500,135,150);
stroke(0);
}
textSize(30);
fill(0);
if (e2 == 1) {
if ((b2 > 0) && (d2 > 0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x +"+round(b2)+" = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x +"+round(d2),20,200);
} else {
text(""+round(a2)+"x +"+round(b2)+" = "+round(c2)+"x +"+round(d2),20,200);
}
}
if ((b2 == 0) && (d2 >0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x +"+round(d2),20,200);
} else {
text(""+round(a2)+"x = "+round(c2)+"x +"+round(d2),20,200);
}
}
if ((b2 > 0) && (d2 == 0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x +"+round(b2)+" = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x",20,200);
} else {
text(""+round(a2)+"x +"+round(b2)+" = "+round(c2)+"x",20,200);
}
}
if ((b2 == 0) && (d2 == 0)) {
if ((a2 == 0) && (c2 == 0)) {
text(" 0 = 0",20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+" = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x",20,200);
} else {
text(""+round(a2)+"x = "+round(c2)+"x",20,200);
}
}
if ((b2 < 0) && (d2 >0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x "+round(b2)+" = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x +"+round(d2),20,200);
} else {
text(""+round(a2)+"x "+round(b2)+" = "+round(c2)+"x +"+round(d2),20,200);
}
}
if ((b2 < 0) && (d2 ==0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x "+round(b2)+" = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x",20,200);
} else {
text(""+round(a2)+"x "+round(b2)+" = "+round(c2)+"x",20,200);
}
}
if ((b2 > 0) && (d2 < 0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x +"+round(b2)+" = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x "+round(d2),20,200);
} else {
text(""+round(a2)+"x +"+round(b2)+" = "+round(c2)+"x "+round(d2),20,200);
}
}
if ((b2 == 0) && (d2 < 0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x "+round(d2),20,200);
} else {
text(""+round(a2)+"x = "+round(c2)+"x "+round(d2),20,200);
}
}
if ((b2 < 0) && (d2 <0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x "+round(b2)+" = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x "+round(d2),20,200);
} else {
text(""+round(a2)+"x "+round(b2)+" = "+round(c2)+"x "+round(d2),20,200);
}
}
}
if (e2 > 1) {
if ((b2 > 0) && (d2 > 0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2)+" || "+(-round(b2)),20,200);
text(""+round(b2)+"-"+round(b2)+" = "+round(d2)+"-"+round(b2),20,240);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x +"+round(b2)+" = "+round(d2)+" || "+(-round(b2)),20,200);
text(""+round(a2)+"x +"+round(b2)+" -"+round(b2)+" = "+round(d2)+" -"+round(b2),20,240);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x +"+round(d2)+" || "+(-round(b2)),20,200);
text(""+round(b2)+" -"+round(b2)+" = "+round(c2)+"x +"+round(d2)+" -"+round(b2),20,240);
} else {
text(""+round(a2)+"x +"+round(b2)+" = "+round(c2)+"x +"+round(d2)+" || "+(-round(b2)),20,200);
text(""+round(a2)+"x +"+round(b2)+" -"+round(b2)+" = "+round(c2)+"x +"+round(d2)+" -"+round(b2),20,240);
}
}
if ((b2 == 0) && (d2 > 0)) {
if ((a2 == 0) && (c2 == 0)) {
text("0 = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text("0 = "+round(c2)+"x +"+round(d2),20,200);
} else {
text(""+round(a2)+"x = "+round(c2)+"x +"+round(d2),20,200);
}
}
if ((b2 > 0) && (d2 ==0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = 0 || "+(-round(b2)),20,200);
text(""+round(b2)+"-"+round(b2)+" = 0 -"+round(b2),20,240);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x +"+round(b2)+" = 0 || "+(-round(b2)),20,200);
text(""+round(a2)+"x +"+round(b2)+" -"+round(b2)+" = 0 -"+round(b2),20,240);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x || "+(-round(b2)),20,200);
text(""+round(b2)+" -"+round(b2)+" = "+round(c2)+"x -"+round(b2),20,240);
} else {
text(""+round(a2)+"x +"+round(b2)+" = "+round(c2)+"x || "+(-round(b2)),20,200);
text(""+round(a2)+"x +"+round(b2)+" -"+round(b2)+" = "+round(c2)+"x -"+round(b2),20,240);
}
}
if ((b2 == 0) && (d2 ==0)) {
if ((a2 == 0) && (c2 == 0)) {
text("0 = 0",20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x = 0",20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text("0 = "+round(c2)+"x",20,200);
} else {
text(""+round(a2)+"x = "+round(c2)+"x",20,200);
}
}
if ((b2 < 0) && (d2 >0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2)+" || +"+(-round(b2)),20,200);
text(""+round(b2)+"+"+round(-b2)+" = "+round(d2)+"+"+round(-b2),20,240);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x "+round(b2)+" = "+round(d2)+" || +"+(-round(b2)),20,200);
text(""+round(a2)+"x "+round(b2)+" +"+(-round(b2))+" = "+round(d2)+" +"+(-round(b2)),20,240);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x +"+round(d2)+" || +"+(-round(b2)),20,200);
text(""+round(b2)+" +"+(-round(b2))+" = "+round(c2)+"x +"+round(d2)+" +"+(-round(b2)),20,240);
} else {
text(""+round(a2)+"x "+round(b2)+" = "+round(c2)+"x +"+round(d2)+" || +"+(-round(b2)),20,200);
text(""+round(a2)+"x "+round(b2)+" +"+(-round(b2))+" = "+round(c2)+"x +"+round(d2)+" +"+(-round(b2)),20,240);
}
}
if ((b2 < 0) && (d2 ==0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = 0 || +"+(-round(b2)),20,200);
text(""+round(b2)+"+"+round(-b2)+" = 0+"+round(-b2),20,240);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x "+round(b2)+" = 0 || +"+(-round(b2)),20,200);
text(""+round(a2)+"x "+round(b2)+" +"+(-round(b2))+" = 0 +"+(-round(b2)),20,240);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x || +"+(-round(b2)),20,200);
text(""+round(b2)+" +"+(-round(b2))+" = "+round(c2)+"x +"+(-round(b2)),20,240);
} else {
text(""+round(a2)+"x "+round(b2)+" = "+round(c2)+"x || +"+(-round(b2)),20,200);
text(""+round(a2)+"x "+round(b2)+" +"+(-round(b2))+" = "+round(c2)+"x +"+(-round(b2)),20,240);
}
}
if ((b2 > 0) && (d2 < 0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2)+" || "+(-round(b2)),20,200);
text(""+round(b2)+"-"+round(b2)+" = "+round(d2)+"-"+round(b2),20,240);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x +"+round(b2)+" = "+round(d2)+" || "+(-round(b2)),20,200);
text(""+round(a2)+"x +"+round(b2)+" -"+round(b2)+" = "+round(d2)+" -"+round(b2),20,240);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x "+round(d2)+" || "+(-round(b2)),20,200);
text(""+round(b2)+" -"+round(b2)+" = "+round(c2)+"x "+round(d2)+" -"+round(b2),20,240);
} else {
text(""+round(a2)+"x +"+round(b2)+" = "+round(c2)+"x "+round(d2)+" || "+(-round(b2)),20,200);
text(""+round(a2)+"x +"+round(b2)+" -"+round(b2)+" = "+round(c2)+"x "+round(d2)+" -"+round(b2),20,240);
}
}
if ((b2 == 0) && (d2 < 0)) {
if ((a2 == 0) && (c2 == 0)) {
text("0 = "+round(d2),20,200);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x = "+round(d2),20,200);
} else if ((a2 == 0) && (c2 != 0)) {
text("0 = "+round(c2)+"x "+round(d2),20,200);
} else {
text(""+round(a2)+"x = "+round(c2)+"x "+round(d2),20,200);
}
}
if ((b2 < 0) && (d2 < 0)) {
if ((a2 == 0) && (c2 == 0)) {
text(""+round(b2)+" = "+round(d2)+" || +"+(-round(b2)),20,200);
text(""+round(b2)+"+"+round(-b2)+" = "+round(d2)+"+"+round(-b2),20,240);
} else if((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x "+round(b2)+" = "+round(d2)+" || +"+(-round(b2)),20,200);
text(""+round(a2)+"x "+round(b2)+" +"+(-round(b2))+" = "+round(d2)+" +"+(-round(b2)),20,240);
} else if ((a2 == 0) && (c2 != 0)) {
text(""+round(b2)+" = "+round(c2)+"x "+round(d2)+" || +"+(-round(b2)),20,200);
text(""+round(b2)+" +"+(-round(b2))+" = "+round(c2)+"x "+round(d2)+" +"+(-round(b2)),20,240);
} else {
text(""+round(a2)+"x "+round(b2)+" = "+round(c2)+"x "+round(d2)+" || +"+(-round(b2)),20,200);
text(""+round(a2)+"x "+round(b2)+" +"+(-round(b2))+" = "+round(c2)+"x "+round(d2)+" +"+(-round(b2)),20,240);
}
}
}
if (e2 > 3) {
// if ((c2 > 0) && (d2 > 0)) {
if ((d2-b2) > 0) {
if ((a2 == 0) && (c2 == 0)) {
text("0 = "+round(d2-b2),20,280);
text("Yhtälöllä ei ole ratkaisua",20,320);
} else if ((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x = "+round(d2-b2),20,280);
} else if ((a2 == 0) && (c2 > 0)) {
text("0 = "+round(c2)+"x +"+round(d2-b2)+" || "+(-round(c2))+"x",20,280);
text("0 "+(-round(c2))+"x = "+round(c2)+"x "+(-round(c2))+"x +"+round(d2-b2),20,320);
} else if ((a2 == 0) && (c2 < 0)) {
text("0 = "+round(c2)+"x +"+round(d2-b2)+" || +"+(-round(c2))+"x",20,280);
text("0 +"+(-round(c2))+"x = "+round(c2)+"x +"+(-round(c2))+"x +"+round(d2-b2),20,320);
} else {
if (c2 > 0 ) {
text(""+round(a2)+"x = "+round(c2)+"x +"+round(d2-b2)+" || "+(-round(c2))+"x",20,280);
text(""+round(a2)+"x "+(-round(c2))+"x = "+round(c2)+"x "+(-round(c2))+"x +"+round(d2-b2),20,320);
} else {
text(""+round(a2)+"x = "+round(c2)+"x +"+round(d2-b2)+" || +"+(-round(c2))+"x",20,280);
text(""+round(a2)+"x +"+(-round(c2))+"x = "+round(c2)+"x +"+(-round(c2))+"x +"+round(d2-b2),20,320);
}
}
}
if ((d2-b2) < 0) {
if ((a2 == 0) && (c2 == 0)) {
text("0 = "+round(d2-b2),20,280);
text("Yhtälöllä ei ole ratkaisua",20,320);
} else if ((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x = "+round(d2-b2),20,280);
} else if ((a2 == 0) && (c2 > 0)) {
text("0 = "+round(c2)+"x "+round(d2-b2)+" || "+(-round(c2))+"x",20,280);
text("0 "+(-round(c2))+"x = "+round(c2)+"x "+(-round(c2))+"x "+round(d2-b2),20,320);
} else if ((a2 == 0) && (c2 < 0)) {
text("0 = "+round(c2)+"x "+round(d2-b2)+" || +"+(-round(c2))+"x",20,280);
text("0 +"+(-round(c2))+"x = "+round(c2)+"x +"+(-round(c2))+"x "+round(d2-b2),20,320);
} else {
if (c2 >= 0 ) {
text(""+round(a2)+"x = "+round(c2)+"x "+round(d2-b2)+" || "+(-round(c2))+"x",20,280);
text(""+round(a2)+"x "+(-round(c2))+"x = "+round(c2)+"x "+(-round(c2))+"x "+round(d2-b2),20,320);
} else {
text(""+round(a2)+"x = "+round(c2)+"x "+round(d2-b2)+" || +"+(-round(c2))+"x",20,280);
text(""+round(a2)+"x +"+(-round(c2))+"x = "+round(c2)+"x +"+(-round(c2))+"x "+round(d2-b2),20,320);
}
}
}
if ((d2-b2) == 0) {
if ((a2 == 0) && (c2 == 0)) {
text("0 = 0",20,280);
text("Yhtälöllä ääretön määrä ratkaisuja",20,320);
} else if ((a2 != 0) && (c2 == 0)) {
text(""+round(a2)+"x = "+round(d2-b2),20,280);
} else if ((a2 == 0) && (c2 > 0)) {
text("0 = "+round(c2)+"x || "+(-round(c2))+"x",20,280);
text("0 "+(-round(c2))+"x = "+round(c2)+"x "+(-round(c2))+"x",20,320);
} else if ((a2 == 0) && (c2 < 0)) {
text("0 = "+round(c2)+"x || +"+(-round(c2))+"x",20,280);
text("0 +"+(-round(c2))+"x = "+round(c2)+"x +"+(-round(c2))+"x",20,320);
} else {
if (c2 > 0) {
text(""+round(a2)+"x = "+round(c2)+"x || "+(-round(c2))+"x",20,280);
text(""+round(a2)+"x "+(-round(c2))+"x = "+round(c2)+"x "+(-round(c2))+"x",20,320);
} else {
text(""+round(a2)+"x = "+round(c2)+"x || +"+(-round(c2))+"x",20,280);
text(""+round(a2)+"x +"+(-round(c2))+"x = "+round(c2)+"x +"+(-round(c2))+"x",20,320);
}
}
}
}
if (e2 > 5) {
if ((a2 -c2) > 0) {
text(""+round(a2-c2)+"x = "+round(d2-b2)+" || :"+(round(a2-c2)),20,360);
}
if ((a2 -c2) < 0) {
text(""+round(a2-c2)+"x = "+round(d2-b2)+" || :("+(round(a2-c2))+")",20,360);
}
if (((a2 -c2) == 0) && (a2!=0) && (c2!=0)){
text("0 = "+round(d2-b2),20,360);
if (b2 == d2) {
text("Yhtälöllä on ääretön määrä ratkaisuja",20,400);
} else {
text("Yhtälöllä ei ole ratkaisua",20,400);
}
}
if (e2 > 6) {
if ((a2-c2) != 0) {
text("x = ",20,420);
text(round(d2-b2),100,400);
text(round(a2-c2),100,440);
line(90,410,140,410);
text(" = "+(d2-b2)/(a2-c2),160,420);
}
}
}
fill(255,0,255);
triangle(300,660,280,699,320,699);
rect(30,650,540,10);
if ((e2 == 1) || (e2 == 2) || (e2 == 3)) {
if (a2 > 0) {
fill(0,0,255);
if (a2 >= 1) { rect(100,650-25*1,20,20); }
if (a2 >= 2) { rect(100,650-25*2,20,20); }
if (a2 >= 3) { rect(100,650-25*3,20,20); }
if (a2 >= 4) { rect(100,650-25*4,20,20); }
if (a2 >= 5) { rect(100,650-25*5,20,20); }
if (a2 >= 6) { rect(130,650-25*1,20,20); }
if (a2 >= 7) { rect(130,650-25*2,20,20); }
if (a2 >= 8) { rect(130,650-25*3,20,20); }
if (a2 >= 9) { rect(130,650-25*4,20,20); }
if (a2 >= 10) { rect(130,650-25*5,20,20); }
}
if (a2 < 0) {
fill(255,0,0);
if (a2 <= -1) { rect(100,650-25*1,20,20); }
if (a2 <= -2) { rect(100,650-25*2,20,20); }
if (a2 <= -3) { rect(100,650-25*3,20,20); }
if (a2 <= -4) { rect(100,650-25*4,20,20); }
if (a2 <= -5) { rect(100,650-25*5,20,20); }
if (a2 <= -6) { rect(130,650-25*1,20,20); }
if (a2 <= -7) { rect(130,650-25*2,20,20); }
if (a2 <= -8) { rect(130,650-25*3,20,20); }
if (a2 <= -9) { rect(130,650-25*4,20,20); }
if (a2 <= -10) { rect(130,650-25*5,20,20); }
}
if (b2 > 0) {
fill(0,255,0);
if (b2 >= 1) { rect(170,650-25*1,20,20); }
if (b2 >= 2) { rect(170,650-25*2,20,20); }
if (b2 >= 3) { rect(170,650-25*3,20,20); }
if (b2 >= 4) { rect(170,650-25*4,20,20); }
if (b2 >= 5) { rect(170,650-25*5,20,20); }
if (b2 >= 6) { rect(200,650-25*1,20,20); }
if (b2 >= 7) { rect(200,650-25*2,20,20); }
if (b2 >= 8) { rect(200,650-25*3,20,20); }
if (b2 >= 9) { rect(200,650-25*4,20,20); }
if (b2 >= 10) { rect(200,650-25*5,20,20); }
}
if (b2 < 0) {
fill(255,255,0);
if (b2 <= -1) { rect(170,650-25*1,20,20); }
if (b2 <= -2) { rect(170,650-25*2,20,20); }
if (b2 <= -3) { rect(170,650-25*3,20,20); }
if (b2 <= -4) { rect(170,650-25*4,20,20); }
if (b2 <= -5) { rect(170,650-25*5,20,20); }
if (b2 <= -6) { rect(200,650-25*1,20,20); }
if (b2 <= -7) { rect(200,650-25*2,20,20); }
if (b2 <= -8) { rect(200,650-25*3,20,20); }
if (b2 <= -9) { rect(200,650-25*4,20,20); }
if (b2 <= -10) { rect(200,650-25*5,20,20); }
}
if (c2 > 0) {
fill(0,0,255);
if (c2 >= 1) { rect(310,650-25*1,20,20); }
if (c2 >= 2) { rect(310,650-25*2,20,20); }
if (c2 >= 3) { rect(310,650-25*3,20,20); }
if (c2 >= 4) { rect(310,650-25*4,20,20); }
if (c2 >= 5) { rect(310,650-25*5,20,20); }
if (c2 >= 6) { rect(340,650-25*1,20,20); }
if (c2 >= 7) { rect(340,650-25*2,20,20); }
if (c2 >= 8) { rect(340,650-25*3,20,20); }
if (c2 >= 9) { rect(340,650-25*4,20,20); }
if (c2 >= 10) { rect(340,650-25*5,20,20); }
}
if (c2 < 0) {
fill(255,0,0);
if (c2 <= -1) { rect(310,650-25*1,20,20); }
if (c2 <= -2) { rect(310,650-25*2,20,20); }
if (c2 <= -3) { rect(310,650-25*3,20,20); }
if (c2 <= -4) { rect(310,650-25*4,20,20); }
if (c2 <= -5) { rect(310,650-25*5,20,20); }
if (c2 <= -6) { rect(340,650-25*1,20,20); }
if (c2 <= -7) { rect(340,650-25*2,20,20); }
if (c2 <= -8) { rect(340,650-25*3,20,20); }
if (c2 <= -9) { rect(340,650-25*4,20,20); }
if (c2 <= -10) { rect(340,650-25*5,20,20); }
}
if (d2 > 0) {
fill(0,255,0);
if (d2 >= 1) { rect(440,650-25*1,20,20); }
if (d2 >= 2) { rect(440,650-25*2,20,20); }
if (d2 >= 3) { rect(440,650-25*3,20,20); }
if (d2 >= 4) { rect(440,650-25*4,20,20); }
if (d2 >= 5) { rect(440,650-25*5,20,20); }
if (d2 >= 6) { rect(470,650-25*1,20,20); }
if (d2 >= 7) { rect(470,650-25*2,20,20); }
if (d2 >= 8) { rect(470,650-25*3,20,20); }
if (d2 >= 9) { rect(470,650-25*4,20,20); }
if (d2 >= 10) { rect(470,650-25*5,20,20); }
}
if (d2 < 0) {
fill(255,255,0);
if (d2 <= -1) { rect(440,650-25*1,20,20); }
if (d2 <= -2) { rect(440,650-25*2,20,20); }
if (d2 <= -3) { rect(440,650-25*3,20,20); }
if (d2 <= -4) { rect(440,650-25*4,20,20); }
if (d2 <= -5) { rect(440,650-25*5,20,20); }
if (d2 <= -6) { rect(470,650-25*1,20,20); }
if (d2 <= -7) { rect(470,650-25*2,20,20); }
if (d2 <= -8) { rect(470,650-25*3,20,20); }
if (d2 <= -9) { rect(470,650-25*4,20,20); }
if (d2 <= -10) { rect(470,650-25*5,20,20); }
}
}
if ((e2 == 2) || (e2 == 3)) {
if (b2 > 0) {
fill(255,255,0);
if (b2 >= 1) { rect(240,650-25*1,20,20); }
if (b2 >= 2) { rect(240,650-25*2,20,20); }
if (b2 >= 3) { rect(240,650-25*3,20,20); }
if (b2 >= 4) { rect(240,650-25*4,20,20); }
if (b2 >= 5) { rect(240,650-25*5,20,20); }
if (b2 >= 6) { rect(270,650-25*1,20,20); }
if (b2 >= 7) { rect(270,650-25*2,20,20); }
if (b2 >= 8) { rect(270,650-25*3,20,20); }
if (b2 >= 9) { rect(270,650-25*4,20,20); }
if (b2 >= 10) { rect(270,650-25*5,20,20); }
}
if (b2 < 0) {
fill(0,255,0);
if (b2 <= -1) { rect(240,650-25*1,20,20); }
if (b2 <= -2) { rect(240,650-25*2,20,20); }
if (b2 <= -3) { rect(240,650-25*3,20,20); }
if (b2 <= -4) { rect(240,650-25*4,20,20); }
if (b2 <= -5) { rect(240,650-25*5,20,20); }
if (b2 <= -6) { rect(270,650-25*1,20,20); }
if (b2 <= -7) { rect(270,650-25*2,20,20); }
if (b2 <= -8) { rect(270,650-25*3,20,20); }
if (b2 <= -9) { rect(270,650-25*4,20,20); }
if (b2 <= -10) { rect(270,650-25*5,20,20); }
}
if (b2 > 0) {
fill(255,255,0);
if (b2 >= 1) { rect(510,650-25*1,20,20); }
if (b2 >= 2) { rect(510,650-25*2,20,20); }
if (b2 >= 3) { rect(510,650-25*3,20,20); }
if (b2 >= 4) { rect(510,650-25*4,20,20); }
if (b2 >= 5) { rect(510,650-25*5,20,20); }
if (b2 >= 6) { rect(540,650-25*1,20,20); }
if (b2 >= 7) { rect(540,650-25*2,20,20); }
if (b2 >= 8) { rect(540,650-25*3,20,20); }
if (b2 >= 9) { rect(540,650-25*4,20,20); }
if (b2 >= 10) { rect(540,650-25*5,20,20); }
}
if (b2 < 0) {
fill(0,255,0);
if (b2 <= -1) { rect(510,650-25*1,20,20); }
if (b2 <= -2) { rect(510,650-25*2,20,20); }
if (b2 <= -3) { rect(510,650-25*3,20,20); }
if (b2 <= -4) { rect(510,650-25*4,20,20); }
if (b2 <= -5) { rect(510,650-25*5,20,20); }
if (b2 <= -6) { rect(540,650-25*1,20,20); }
if (b2 <= -7) { rect(540,650-25*2,20,20); }
if (b2 <= -8) { rect(540,650-25*3,20,20); }
if (b2 <= -9) { rect(540,650-25*4,20,20); }
if (b2 <= -10) { rect(540,650-25*5,20,20); }
}
}
if ((e2 == 4) || (e2 == 5)) {
if (a2 > 0) {
fill(0,0,255);
if (a2 >= 1) { rect(100,650-25*1,20,20); }
if (a2 >= 2) { rect(100,650-25*2,20,20); }
if (a2 >= 3) { rect(100,650-25*3,20,20); }
if (a2 >= 4) { rect(100,650-25*4,20,20); }
if (a2 >= 5) { rect(100,650-25*5,20,20); }
if (a2 >= 6) { rect(130,650-25*1,20,20); }
if (a2 >= 7) { rect(130,650-25*2,20,20); }
if (a2 >= 8) { rect(130,650-25*3,20,20); }
if (a2 >= 9) { rect(130,650-25*4,20,20); }
if (a2 >= 10) { rect(130,650-25*5,20,20); }
}
if (a2 < 0) {
fill(255,0,0);
if (a2 <= -1) { rect(100,650-25*1,20,20); }
if (a2 <= -2) { rect(100,650-25*2,20,20); }
if (a2 <= -3) { rect(100,650-25*3,20,20); }
if (a2 <= -4) { rect(100,650-25*4,20,20); }
if (a2 <= -5) { rect(100,650-25*5,20,20); }
if (a2 <= -6) { rect(130,650-25*1,20,20); }
if (a2 <= -7) { rect(130,650-25*2,20,20); }
if (a2 <= -8) { rect(130,650-25*3,20,20); }
if (a2 <= -9) { rect(130,650-25*4,20,20); }
if (a2 <= -10) { rect(130,650-25*5,20,20); }
}
if (c2 > 0) {
fill(255,0,0);
if (c2 >= 1) { rect(170,650-25*1,20,20); }
if (c2 >= 2) { rect(170,650-25*2,20,20); }
if (c2 >= 3) { rect(170,650-25*3,20,20); }
if (c2 >= 4) { rect(170,650-25*4,20,20); }
if (c2 >= 5) { rect(170,650-25*5,20,20); }
if (c2 >= 6) { rect(200,650-25*1,20,20); }
if (c2 >= 7) { rect(200,650-25*2,20,20); }
if (c2 >= 8) { rect(200,650-25*3,20,20); }
if (c2 >= 9) { rect(200,650-25*4,20,20); }
if (c2 >= 10) { rect(200,650-25*5,20,20); }
}
if (c2 < 0) {
fill(0,0,255);
if (c2 <= -1) { rect(170,650-25*1,20,20); }
if (c2 <= -2) { rect(170,650-25*2,20,20); }
if (c2 <= -3) { rect(170,650-25*3,20,20); }
if (c2 <= -4) { rect(170,650-25*4,20,20); }
if (c2 <= -5) { rect(170,650-25*5,20,20); }
if (c2 <= -6) { rect(200,650-25*1,20,20); }
if (c2 <= -7) { rect(200,650-25*2,20,20); }
if (c2 <= -8) { rect(200,650-25*3,20,20); }
if (c2 <= -9) { rect(200,650-25*4,20,20); }
if (c2 <= -10) { rect(200,650-25*5,20,20); }
}
if (c2 > 0) {
fill(0,0,255);
if (c2 >= 1) { rect(310,650-25*1,20,20); }
if (c2 >= 2) { rect(310,650-25*2,20,20); }
if (c2 >= 3) { rect(310,650-25*3,20,20); }
if (c2 >= 4) { rect(310,650-25*4,20,20); }
if (c2 >= 5) { rect(310,650-25*5,20,20); }
if (c2 >= 6) { rect(340,650-25*1,20,20); }
if (c2 >= 7) { rect(340,650-25*2,20,20); }
if (c2 >= 8) { rect(340,650-25*3,20,20); }
if (c2 >= 9) { rect(340,650-25*4,20,20); }
if (c2 >= 10) { rect(340,650-25*5,20,20); }
}
if (c2 < 0) {
fill(255,0,0);
if (c2 <= -1) { rect(310,650-25*1,20,20); }
if (c2 <= -2) { rect(310,650-25*2,20,20); }
if (c2 <= -3) { rect(310,650-25*3,20,20); }
if (c2 <= -4) { rect(310,650-25*4,20,20); }
if (c2 <= -5) { rect(310,650-25*5,20,20); }
if (c2 <= -6) { rect(340,650-25*1,20,20); }
if (c2 <= -7) { rect(340,650-25*2,20,20); }
if (c2 <= -8) { rect(340,650-25*3,20,20); }
if (c2 <= -9) { rect(340,650-25*4,20,20); }
if (c2 <= -10) { rect(340,650-25*5,20,20); }
}
if (c2 > 0) {
fill(255,0,0);
if (c2 >= 1) { rect(370,650-25*1,20,20); }
if (c2 >= 2) { rect(370,650-25*2,20,20); }
if (c2 >= 3) { rect(370,650-25*3,20,20); }
if (c2 >= 4) { rect(370,650-25*4,20,20); }
if (c2 >= 5) { rect(370,650-25*5,20,20); }
if (c2 >= 6) { rect(400,650-25*1,20,20); }
if (c2 >= 7) { rect(400,650-25*2,20,20); }
if (c2 >= 8) { rect(400,650-25*3,20,20); }
if (c2 >= 9) { rect(400,650-25*4,20,20); }
if (c2 >= 10) { rect(400,650-25*5,20,20); }
}
if (c2 < 0) {
fill(0,0,255);
if (c2 <= -1) { rect(370,650-25*1,20,20); }
if (c2 <= -2) { rect(370,650-25*2,20,20); }
if (c2 <= -3) { rect(370,650-25*3,20,20); }
if (c2 <= -4) { rect(370,650-25*4,20,20); }
if (c2 <= -5) { rect(370,650-25*5,20,20); }
if (c2 <= -6) { rect(400,650-25*1,20,20); }
if (c2 <= -7) { rect(400,650-25*2,20,20); }
if (c2 <= -8) { rect(400,650-25*3,20,20); }
if (c2 <= -9) { rect(400,650-25*4,20,20); }
if (c2 <= -10) { rect(400,650-25*5,20,20); }
}
if (d2-b2 > 0) {
fill(0,255,0);
if ((d2-b2) >= 1) { rect(440,650-25*1,20,20); }
if ((d2-b2) >= 2) { rect(440,650-25*2,20,20); }
if ((d2-b2) >= 3) { rect(440,650-25*3,20,20); }
if ((d2-b2) >= 4) { rect(440,650-25*4,20,20); }
if ((d2-b2) >= 5) { rect(440,650-25*5,20,20); }
if ((d2-b2) >= 6) { rect(470,650-25*1,20,20); }
if ((d2-b2) >= 7) { rect(470,650-25*2,20,20); }
if ((d2-b2) >= 8) { rect(470,650-25*3,20,20); }
if ((d2-b2) >= 9) { rect(470,650-25*4,20,20); }
if ((d2-b2) >= 10) { rect(470,650-25*5,20,20); }
if ((d2-b2) >= 11) { rect(500,650-25*1,20,20); }
if ((d2-b2) >= 12) { rect(500,650-25*2,20,20); }
if ((d2-b2) >= 13) { rect(500,650-25*3,20,20); }
if ((d2-b2) >= 14) { rect(500,650-25*4,20,20); }
if ((d2-b2) >= 15) { rect(500,650-25*5,20,20); }
if ((d2-b2) >= 16) { rect(530,650-25*1,20,20); }
if ((d2-b2) >= 17) { rect(530,650-25*2,20,20); }
if ((d2-b2) >= 18) { rect(530,650-25*3,20,20); }
if ((d2-b2) >= 19) { rect(530,650-25*4,20,20); }
if ((d2-b2) >= 20) { rect(530,650-25*5,20,20); }
}
if (d2-b2 < 0) {
fill(255,255,0);
if ((d2-b2) <= -1) { rect(440,650-25*1,20,20); }
if ((d2-b2) <= -2) { rect(440,650-25*2,20,20); }
if ((d2-b2) <= -3) { rect(440,650-25*3,20,20); }
if ((d2-b2) <= -4) { rect(440,650-25*4,20,20); }
if ((d2-b2) <= -5) { rect(440,650-25*5,20,20); }
if ((d2-b2) <= -6) { rect(470,650-25*1,20,20); }
if ((d2-b2) <= -7) { rect(470,650-25*2,20,20); }
if ((d2-b2) <= -8) { rect(470,650-25*3,20,20); }
if ((d2-b2) <= -9) { rect(470,650-25*4,20,20); }
if ((d2-b2) <= -10) { rect(470,650-25*5,20,20); }
if ((d2-b2) <= -11) { rect(500,650-25*1,20,20); }
if ((d2-b2) <= -12) { rect(500,650-25*2,20,20); }
if ((d2-b2) <= -13) { rect(500,650-25*3,20,20); }
if ((d2-b2) <= -14) { rect(500,650-25*4,20,20); }
if ((d2-b2) <= -15) { rect(500,650-25*5,20,20); }
if ((d2-b2) <= -16) { rect(530,650-25*1,20,20); }
if ((d2-b2) <= -17) { rect(530,650-25*2,20,20); }
if ((d2-b2) <= -18) { rect(530,650-25*3,20,20); }
if ((d2-b2) <= -19) { rect(530,650-25*4,20,20); }
if ((d2-b2) <= -20) { rect(530,650-25*5,20,20); }
}
}
if (e2 == 6) {
if ((a2-c2) > 0) {
fill(0,0,255);
if ((a2-c2) >= 1) { rect(100,650-25*1,20,20); }
if ((a2-c2) >= 2) { rect(100,650-25*2,20,20); }
if ((a2-c2) >= 3) { rect(100,650-25*3,20,20); }
if ((a2-c2) >= 4) { rect(100,650-25*4,20,20); }
if ((a2-c2) >= 5) { rect(100,650-25*5,20,20); }
if ((a2-c2) >= 6) { rect(130,650-25*1,20,20); }
if ((a2-c2) >= 7) { rect(130,650-25*2,20,20); }
if ((a2-c2) >= 8) { rect(130,650-25*3,20,20); }
if ((a2-c2) >= 9) { rect(130,650-25*4,20,20); }
if ((a2-2) >= 10) { rect(130,650-25*5,20,20); }
if ((a2-c2) >= 11) { rect(160,650-25*1,20,20); }
if ((a2-c2) >= 12) { rect(160,650-25*2,20,20); }
if ((a2-c2) >= 13) { rect(160,650-25*3,20,20); }
if ((a2-c2) >= 14) { rect(160,650-25*4,20,20); }
if ((a2-c2) >= 15) { rect(160,650-25*5,20,20); }
if ((a2-c2) >= 16) { rect(190,650-25*1,20,20); }
if ((a2-c2) >= 17) { rect(190,650-25*2,20,20); }
if ((a2-c2) >= 18) { rect(190,650-25*3,20,20); }
if ((a2-c2) >= 19) { rect(190,650-25*4,20,20); }
if ((a2-2) >= 20) { rect(190,650-25*5,20,20); }
}
if ((a2-c2) < 0) {
fill(255,0,0);
if ((a2-c2) <= -1) { rect(100,650-25*1,20,20); }
if ((a2-c2) <= -2) { rect(100,650-25*2,20,20); }
if ((a2-c2) <= -3) { rect(100,650-25*3,20,20); }
if ((a2-c2) <= -4) { rect(100,650-25*4,20,20); }
if ((a2-c2) <= -5) { rect(100,650-25*5,20,20); }
if ((a2-c2) <= -6) { rect(130,650-25*1,20,20); }
if ((a2-c2) <= -7) { rect(130,650-25*2,20,20); }
if ((a2-c2) <= -8) { rect(130,650-25*3,20,20); }
if ((a2-c2) <= -9) { rect(130,650-25*4,20,20); }
if ((a2-c2) <= -10) { rect(130,650-25*5,20,20); }
if ((a2-c2) <= -11) { rect(160,650-25*1,20,20); }
if ((a2-c2) <= -12) { rect(160,650-25*2,20,20); }
if ((a2-c2) <= -13) { rect(160,650-25*3,20,20); }
if ((a2-c2) <= -14) { rect(160,650-25*4,20,20); }
if ((a2-c2) <= -15) { rect(160,650-25*5,20,20); }
if ((a2-c2) <= -16) { rect(190,650-25*1,20,20); }
if ((a2-c2) <= -17) { rect(190,650-25*2,20,20); }
if ((a2-c2) <= -18) { rect(190,650-25*3,20,20); }
if ((a2-c2) <= -19) { rect(190,650-25*4,20,20); }
if ((a2-c2) <= -20) { rect(190,650-25*5,20,20); }
}
if (d2-b2 > 0) {
fill(0,255,0);
if ((d2-b2) >= 1) { rect(440,650-25*1,20,20); }
if ((d2-b2) >= 2) { rect(440,650-25*2,20,20); }
if ((d2-b2) >= 3) { rect(440,650-25*3,20,20); }
if ((d2-b2) >= 4) { rect(440,650-25*4,20,20); }
if ((d2-b2) >= 5) { rect(440,650-25*5,20,20); }
if ((d2-b2) >= 6) { rect(470,650-25*1,20,20); }
if ((d2-b2) >= 7) { rect(470,650-25*2,20,20); }
if ((d2-b2) >= 8) { rect(470,650-25*3,20,20); }
if ((d2-b2) >= 9) { rect(470,650-25*4,20,20); }
if ((d2-b2) >= 10) { rect(470,650-25*5,20,20); }
if ((d2-b2) >= 11) { rect(500,650-25*1,20,20); }
if ((d2-b2) >= 12) { rect(500,650-25*2,20,20); }
if ((d2-b2) >= 13) { rect(500,650-25*3,20,20); }
if ((d2-b2) >= 14) { rect(500,650-25*4,20,20); }
if ((d2-b2) >= 15) { rect(500,650-25*5,20,20); }
if ((d2-b2) >= 16) { rect(530,650-25*1,20,20); }
if ((d2-b2) >= 17) { rect(530,650-25*2,20,20); }
if ((d2-b2) >= 18) { rect(530,650-25*3,20,20); }
if ((d2-b2) >= 19) { rect(530,650-25*4,20,20); }
if ((d2-b2) >= 20) { rect(530,650-25*5,20,20); }
}
if (d2-b2 < 0) {
fill(255,255,0);
if ((d2-b2) <= -1) { rect(440,650-25*1,20,20); }
if ((d2-b2) <= -2) { rect(440,650-25*2,20,20); }
if ((d2-b2) <= -3) { rect(440,650-25*3,20,20); }
if ((d2-b2) <= -4) { rect(440,650-25*4,20,20); }
if ((d2-b2) <= -5) { rect(440,650-25*5,20,20); }
if ((d2-b2) <= -6) { rect(470,650-25*1,20,20); }
if ((d2-b2) <= -7) { rect(470,650-25*2,20,20); }
if ((d2-b2) <= -8) { rect(470,650-25*3,20,20); }
if ((d2-b2) <= -9) { rect(470,650-25*4,20,20); }
if ((d2-b2) <= -10) { rect(470,650-25*5,20,20); }
if ((d2-b2) <= -11) { rect(500,650-25*1,20,20); }
if ((d2-b2) <= -12) { rect(500,650-25*2,20,20); }
if ((d2-b2) <= -13) { rect(500,650-25*3,20,20); }
if ((d2-b2) <= -14) { rect(500,650-25*4,20,20); }
if ((d2-b2) <= -15) { rect(500,650-25*5,20,20); }
if ((d2-b2) <= -16) { rect(530,650-25*1,20,20); }
if ((d2-b2) <= -17) { rect(530,650-25*2,20,20); }
if ((d2-b2) <= -18) { rect(530,650-25*3,20,20); }
if ((d2-b2) <= -19) { rect(530,650-25*4,20,20); }
if ((d2-b2) <= -20) { rect(530,650-25*5,20,20); }
}
}
if (e2 == 7) {
fill(0,0,255);
rect(100,650-25*1,20,20);
float xx = round(10*(d2-b2)/(a2-c2))/10.0;
if (xx >= 1) {
if (xx > 100) {
if (a2 != c2) {
fill(0,255,0);
rect(400,450,180,180);
textSize(100);
fill(0);
text("\u221E",440,570);
}
}
if (xx < 100) {
fill(0,255,0);
if (xx >= 1) { rect(440,650-25*1,20,20); if ((xx > 1) && (xx < 2)) { rect(440,670-25*2,20,-20*(xx-1)); } }
if (xx >= 2) { rect(440,650-25*2,20,20); if ((xx > 2) && (xx < 3)) { rect(440,670-25*3,20,-20*(xx-2)); } }
if (xx >= 3) { rect(440,650-25*3,20,20); if ((xx > 3) && (xx < 4)) { rect(440,670-25*4,20,-20*(xx-3)); }}
if (xx >= 4) { rect(440,650-25*4,20,20); if ((xx > 4) && (xx < 5)) { rect(440,670-25*5,20,-20*(xx-4)); }}
if (xx >= 5) { rect(440,650-25*5,20,20); if ((xx > 5) && (xx < 6)) { rect(470,670-25*1,20,-20*(xx-5)); }}
if (xx >= 6) { rect(470,650-25*1,20,20); if ((xx > 6) && (xx < 7)) { rect(470,670-25*2,20,-20*(xx-6)); }}
if (xx >= 7) { rect(470,650-25*2,20,20); if ((xx > 7) && (xx < 8)) { rect(470,670-25*3,20,-20*(xx-7)); }}
if (xx >= 8) { rect(470,650-25*3,20,20); if ((xx > 8) && (xx < 9)) { rect(470,670-25*4,20,-20*(xx-8)); }}
if (xx >= 9) { rect(470,650-25*4,20,20); if ((xx > 9) && (xx < 10)) { rect(470,670-25*5,20,-20*(xx-9)); }}
if (xx >= 10) { rect(470,650-25*5,20,20); if ((xx > 10) && (xx < 11)) { rect(500,670-25*1,20,-20*(xx-10)); }}
if (xx >= 11) { rect(500,650-25*1,20,20); if ((xx > 11) && (xx < 12)) { rect(500,670-25*2,20,-20*(xx-11)); }}
if (xx >= 12) { rect(500,650-25*2,20,20); if ((xx > 12) && (xx < 13)) { rect(500,670-25*3,20,-20*(xx-12)); }}
if (xx >= 13) { rect(500,650-25*3,20,20); if ((xx > 13) && (xx < 14)) { rect(500,670-25*4,20,-20*(xx-13)); }}
if (xx >= 14) { rect(500,650-25*4,20,20); if ((xx > 14) && (xx < 15)) { rect(500,670-25*5,20,-20*(xx-14)); } }
if (xx >= 15) { rect(500,650-25*5,20,20); if ((xx > 15) && (xx < 16)) { rect(530,670-25*1,20,-20*(xx-15)); } }
if (xx >= 16) { rect(530,650-25*1,20,20); if ((xx > 16) && (xx < 17)) { rect(530,670-25*2,20,-20*(xx-16)); }}
if (xx >= 17) { rect(530,650-25*2,20,20); if ((xx > 17) && (xx < 18)) { rect(530,670-25*3,20,-20*(xx-17)); } }
if (xx >= 18) { rect(530,650-25*3,20,20); if ((xx > 18) && (xx < 19)) { rect(530,670-25*4,20,-20*(xx-18)); } }
if (xx >= 19) { rect(530,650-25*4,20,20); if ((xx > 19) && (xx < 20)) { rect(530,670-25*5,20,-20*(xx-19)); } }
if (xx >= 20) { rect(530,650-25*5,20,20); if ((xx > 20) && (xx < 21)) { rect(530,670-25*1,20,-20*(xx-20)); }}
}
}
if (xx <= -1) {
if (xx < -100) {
if (a2 != c2) {
fill(255,255,0);
rect(400,450,180,180);
textSize(100);
fill(0);
text("-\u221E",410,570);
}
}
if (xx > -100) {
fill(255,255,0);
if (xx <= -1) { rect(440,650-25*1,20,20); if ((xx < -1) && (xx > -2)) { rect(440,670-25*2,20,20*(xx+1)); } }
if (xx <= -2) { rect(440,650-25*2,20,20); if ((xx < -2) && (xx > -3)) { rect(440,670-25*3,20,20*(xx+2)); } }
if (xx <= -3) { rect(440,650-25*3,20,20); if ((xx < -3) && (xx > -4)) { rect(440,670-25*4,20,20*(xx+3)); } }
if (xx <= -4) { rect(440,650-25*4,20,20); if ((xx < -4) && (xx > -5)) { rect(440,670-25*5,20,20*(xx+4)); } }
if (xx <= -5) { rect(440,650-25*5,20,20); if ((xx < -5) && (xx > -6)) { rect(470,670-25*1,20,20*(xx+5)); } }
if (xx <= -6) { rect(470,650-25*1,20,20); if ((xx < -6) && (xx > -7)) { rect(470,670-25*2,20,20*(xx+6)); } }
if (xx <= -7) { rect(470,650-25*2,20,20); if ((xx < -7) && (xx > -8)) { rect(470,670-25*3,20,20*(xx+7)); }}
if (xx <= -8) { rect(470,650-25*3,20,20); if ((xx < -8) && (xx > -9)) { rect(470,670-25*4,20,20*(xx+8)); } }
if (xx <= -9) { rect(470,650-25*4,20,20); if ((xx < -9) && (xx > -10)) { rect(470,670-25*5,20,20*(xx+9)); }}
if (xx <= -10) { rect(470,650-25*5,20,20); if ((xx < -10) && (xx > -11)) { rect(500,670-25*1,20,20*(xx+10)); }}
if (xx <= -11) { rect(500,650-25*1,20,20); if ((xx < -11) && (xx > -12)) { rect(500,670-25*2,20,20*(xx+11)); } }
if (xx <= -12) { rect(500,650-25*2,20,20); if ((xx < -12) && (xx > -13)) { rect(500,670-25*3,20,20*(xx+12)); }}
if (xx <= -13) { rect(500,650-25*3,20,20); if ((xx < -13) && (xx > -14)) { rect(500,670-25*4,20,20*(xx+13)); }}
if (xx <= -14) { rect(500,650-25*4,20,20); if ((xx < -14) && (xx > -15)) { rect(500,670-25*5,20,20*(xx+14)); }}
if (xx <= -15) { rect(500,650-25*5,20,20); if ((xx < -15) && (xx > -16)) { rect(530,670-25*1,20,20*(xx+15)); }}
if (xx <= -16) { rect(530,650-25*1,20,20); if ((xx < -16) && (xx > -17)) { rect(530,670-25*2,20,20*(xx+16)); }}
if (xx <= -17) { rect(530,650-25*2,20,20); if ((xx < -17) && (xx > -18)) { rect(530,670-25*3,20,20*(xx+17)); }}
if (xx <= -18) { rect(530,650-25*3,20,20); if ((xx < -18) && (xx > -19)) { rect(530,670-25*4,20,20*(xx+18)); }}
if (xx <= -19) { rect(530,650-25*4,20,20); if ((xx < -19) && (xx > -20)) { rect(530,670-25*5,20,20*(xx+19)); }}
if (xx <= -20) { rect(530,650-25*5,20,20); if ((xx < -20) && (xx > -21)) { rect(530,670-25*6,20,20*(xx+20)); }}
}
}
if ((xx <1) && (xx > 0)) {
fill(0,255,0);
rect(440,670-25*1,20,20*(-xx));
}
if ((xx >-1) && (xx < 0)) {
fill(255,255,0);
rect(440,670-25*1,20,20*xx);
}
}
fill(0);
textSize(20);
text(""+round(a2),a+4,25);
text(""+round(b2),b+4,55);
text(""+round(c2),c+4,85);
text(""+round(d2),d+4,115);
text(""+round(e2),e+4,145);
}