meta data for this page
This is an old revision of the document!
Polyhedron
A three dimensional shape where connecting faces create a solid. Each face is a three dimensional polygon (a flat shape with straight sides).
Learn about polyhedrons at MathIsFun.com
Create a polyhedron from a list of 'points' and a list of 'faces'. The 'points' list all the vertexes of the shape, while the 'faces' define the 'points' used within each face.
Note: The order of the points must be consistent, defining 'inward' or 'outward' facing polygons.
let points = [ [10, 10, 0], [10, -10, 0], [-10, -10, 0], [-10, 10, 0], [0, 0, 10] ] let faces = [ [0, 1, 4], [1, 2, 4], [2, 3, 4], [3, 0, 4], [1, 0, 3], [2, 1, 3] ] let myshape = polyhedron({points, faces, orientation: 'inward'})