This commit is contained in:
root 2025-04-26 04:15:57 +00:00
parent d0be92d50e
commit e51d5df1dc

View file

@ -263,14 +263,7 @@ function keyPressed() {
} else if (key == 'g') { } else if (key == 'g') {
polyhedron = !polyhedron; polyhedron = !polyhedron;
} else if (key >= '0' && key <= '9') { } else if (key >= '0' && key <= '9') {
make_charges(Math.pow(int(key), 2)); make_charges(int(key));
faces = []; faces = [];
} }
} }
// TODO draw faces
// algorithm: choose 3 vertices until 2-partition of other vertices has one empty set
// done when V - E + F = 2. V is known. count E and F while creating faces
// when the graph is finished: E = F * 3 / 2
// V - E + F = V - F * 3 / 2 + F = V - F / 2
// V * 2 - F = 4