From 492419f0ae1b32c1d4bc60997ca8eb7daba22182 Mon Sep 17 00:00:00 2001 From: Jaron Kent-Dobias Date: Sat, 29 Jun 2019 23:54:37 -0400 Subject: more fixes, and updating the interface --- src/animate.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/animate.cpp') diff --git a/src/animate.cpp b/src/animate.cpp index 532bd70..b1031dc 100644 --- a/src/animate.cpp +++ b/src/animate.cpp @@ -89,18 +89,23 @@ 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 draw = true; } 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; } @@ -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) { -- cgit v1.2.3-70-g09d2