diff --git a/sketch.js b/sketch.js index fb861a2..238d16d 100644 --- a/sketch.js +++ b/sketch.js @@ -13,7 +13,7 @@ const SURFACE_EARTH = 2; let surface = SURFACE_CIRCLES; let physics = false; let skeleton = false; -let polyhedron = false; +let polytope = false; let aside_size; @@ -53,7 +53,7 @@ function draw() { draw_charges(sphere_radius); if (skeleton) draw_skeleton(sphere_radius); - if (polyhedron) { + if (polytope) { if (physics || faces.length === 0) find_faces(); draw_faces(sphere_radius); } @@ -70,7 +70,7 @@ function find_faces() { for (let i = 2; i < charges.length; i += 1) { for (let j = 1; j < i; j += 1) { for (let k = 0; k < j; k += 1) { - // Check if p1 p2 p3 form a face of the convex polyhedron + // Check if p1 p2 p3 form a face of the convex polytope // enclosing all vertices ... const p1 = charges[i].position; const p2 = charges[j].position; @@ -97,7 +97,7 @@ function find_faces() { // If L intersects the plane, q1 and q2 are on // opposite sides of the plane generated by p1 p2 p3, // so p1 p2 p3 can't be a face. If we want the - // polyhedron to be convex. Which we do. + // polytope to be convex. Which we do. // // A point k is on the plane generated by p1 p2 p3 iff // dot(k - p1, normal) = 0. Let n := normal. @@ -269,7 +269,7 @@ function keyPressed() { } else if (key == 'f') { skeleton = !skeleton; } else if (key == 'g') { - polyhedron = !polyhedron; + polytope = !polytope; } else if (key >= '0' && key <= '9') { make_charges(int(key)); faces = [];