+ PriorityQueue<Mesh.E> es = new PriorityQueue<Mesh.E>();
+ for(Mesh.T t : tile) {
+ float max = 5;
+ for(Mesh.E e : new Mesh.E[] { t.e1(), t.e2(), t.e3() }) {
+ if (e==null) continue;
+ if (e.stretchRatio() > max) es.add(e);
+ if (t.aspect() < 0.1 && e.length()>e.next.length() && e.length()>e.prev.length()) es.add(e);
+ }
+ }
+
+ for(int i=0; i<5; i++) {
+ Mesh.E e = es.poll();
+ if (e==null) break;
+ e.shatter();
+ }
+ tile.rebindPoints();
+