import { Mat3, Vec3, Point, RandomNormal, Shape, ConvexHull } from './Geometry.js'; export function RandomPoints(n) { const points = []; for (let i=0; i threshold) { return true; } return false; } move() { const matrix = new Mat3().rotation(this.axis, this.speed * 0.01 * Math.PI); for (let i=0; i maxDot) { maxDot = d; index = i; } } if (index == -1) { console.error("no closest point", point); } points[index].push(point); } const plates = []; for (let p of points) { plates.push(new Plate(p)); } return plates; } update() { for (let plate of this.plates) { plate.move(); } } render(ct, view) { for (let plate of this.plates) { plate.render(ct, view); } } }