summaryrefslogtreecommitdiff
path: root/src/animate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/animate.cpp')
-rw-r--r--src/animate.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/animate.cpp b/src/animate.cpp
index 532bd70..b1031dc 100644
--- a/src/animate.cpp
+++ b/src/animate.cpp
@@ -89,12 +89,14 @@ void animate::bond_broken(const network& n, const current_info& cur, unsigned i)
*/
bool weird = false;
+ unsigned nw = 0;
for (unsigned j = 0; j < n.G.edges.size(); j++) {
bool draw = false;
if (cur.currents[j] < 1e-9 && !n.backbone[j]) {
glColor3f(1.0f, 0.0f, 0.0f); // Blue
weird = true;
+ nw++;
draw = true;
} else if (n.backbone[j] && !n.fuses[j] && j != i) {
glColor3f(0.8f, 0.8f, 0.8f); // Blue
@@ -102,6 +104,9 @@ void animate::bond_broken(const network& n, const current_info& cur, unsigned i)
} else if (!n.fuses[j]) {
glColor3f(0.0f, 0.0f, 0.0f); // Blue
draw = true;
+ } else if (i == j) {
+ glColor3f(0.0f, 1.0f, 0.0f); // Blue
+ draw = true;
}
if (draw) {
@@ -130,7 +135,7 @@ void animate::bond_broken(const network& n, const current_info& cur, unsigned i)
}
glEnd();
glFlush();
- if (weird) {std::cout << "\n"; getchar();}
+ if (nw > 2) {std::cout << "\n"; getchar();}
}
void animate::post_fracture(network &n) {