You can create any geometry from coordinate points.
You can specify them as constants or calculate them. Depending on your requirements.
simple from the Collection of examples from discourse.threejs.org
BufferGeometryNonIndexed
BufferGeometryIndexed
advanced
Round-edged box flat
Multi Form Geometry