POLYHEDRA - 2.0

This is a complete re-write of my previous polyhedra web app, as a showcase for my latest web framework and shape generation tools, and to make available a range of new features and import/export options. Like the previous version, it lets you select from a wide range of known polyhedra, with several new ones added, and then interactively apply sequences of mathematical operations on them to create more complex higher-order polyhedra. These include all the standard Conway and Hart operators as well as several new extended modifiers that I have developed over time.

Screenshot of new polyhedra app
Figure 1: A screenshot of the new Polyhedra app running in a web browser.
Launch app in new tab...

Overview

This app is the latest iteration of my previous polyhedra generator app. I have spent the last few years head-down developing a new web framework to support my ongoing BIM research work, and part of that has been some new shape generation tools. Shape manipulation is at the core of almost everything I do, and I particularly love working with manifold polyhedra.

Like so many of my tools, this started out as a test suite for visually checking that my ongoing changes don’t break my shape modifiers and render functions, and that everything still works as intended. As I added more features, it slowly morphed into a playful tool that I find really useful, and hopefully other people interested in shape generation will too.

Like the previous version, this one lets you select from a wide range of common polyhedra and then apply mathematical operations on them to create some interesting sculptural and architectural forms. This includes the standard Conway polyhedron notation modifiers – borrowing heavily from Anselm Levskaya’s polyHédronisme and George Hart’s original VRML implementation – as well as a range of additional modifiers of my own.

Figure 2: Some examples of different operations on the same polyhedra.

What Changed

The following is a summary of what is new or has changed in the new version:

  • Additional base polyhedra have been added - such as Catalan solids, prisms, anti-prisms, pyramids, bipyramids, cupola and rotunda, as well as Geodesic and Fibonacci domes. You can also choose to apply various alignments and specific sizes to the base shape prior to modification.

  • You can now choose to display the base shape as a transparent overlay on top of the modified shape as a way of visually relating the two and better understanding morphology changes. I found that overlaying the base shape and just applying a single modifier at a time gave me a much improved understanding of exactly how each one worked. My favourite demonstration is to display the overlay and apply just the f (frame) modifier, and then cycle through the various polyhedra to highlight their edges.

  • The Conway notation input is now parsed from left-to-right rather than the more traditional right-to-left. This was the most complained about part of the previous app, and led to a lot of confusion in those just starting out. There also seemed to be no real justification in the sources for parsing right-to-left, apart from just coding expediency. I know this change may lead to another round of complaints from those used to the original way, but even I find left-to-right a far more logical way of building up operations and predicting what they will do.

  • The notation parser now supports shape specifiers at the start of the input string. Shape specifiers are the letters and optional number(s) you see alongside the Base Polyhedron Type names in the selector. Thus, if you enter the string T:f, it will show a framed Tetrahedron and set the appropriate selectors. Similarly, if you enter L4:f, it will show a framed Triakis Octahedron. The aim of this is to allow you to share shapes by simply copy/pasting a notation string and to have the app use the correct base shape.

  • You can now edit the base shape to anything you like, either manually in the Edit Base Shape Geometry dialog box, or by importing or copy/pasting geometry from a range of different file formats, including David McCooey's excellent coordinate format. I find this format particularly useful as it uses variables to set the axial components of each vertex and, as many polyhedra are symmetrical in some degree, you can do some amazing things with just a few edits.

  • Support for exporting the final shape to a range of geometry file formats has been added, including .GLTF, .GLB, .USDZ, .3MF and .3DM, as well as the standard .OBJ, .STL and .PLY formats.

  • Support for the File System API has been added, meaning that you can work directly with files on your local device or a network shared file system. Thus, in browsers that support it, you can use the Open File... menu item to load in a settings file stored on your machine, and then automatically update the same file by selecting the Save Changes menu item. In browsers that do not support it (Safari/Firefox), it will fallback to the standard upload/download process. Of course you can still use the Load Session... and Save Session... options in all browsers to save settings data to local storage.

  • You can now automatically apply a range of post-processing operations to the final shape. These include normal smoothing or setting face colours, applying transformations and even adding a cutting plane. See the Result panel for details.

  • The app uses my new web framework based on the very latest versions of Bootstrap and ThreeJS , which provides the UI components, interactive model canvas, view settings, model management, shadow generation and sky simulation features. This offers significantly more flexibility in the rendering and display of shape data.

Getting Started

To use the app, first select any base polyhedron using the selectors in the SELECT BASE SHAPE panel on the left-hand side of the application window, then either enter a notation command string directly in the CONWAY NOTATION input box or build one up by adding and editing components in the STACK panel immediately below it. You can also select one of the example shapes in the POLY menu within the main menu bar, or one of the example notions from the menu associated with the notation input box.

As notation strings can sometimes get quite complex, especially when using bracketed arguments, I have tried to make things a bit easier by adding a stack as well as a list of available modifiers. The stack provides a dynamic list of editable modifiers that you can drag to reorder, or click on to access editors for each of the parameters that the different operations use. You can open/close any modifier by simply clicking or tapping on its title. You can also click, hold and drag any modifier up/down to reorder them within the list. To display a slider for any numeric value, click on the menu button immediately to its right, as shown in Figure 3.

Figure 3: Click or tap a parameter to enter values manually.

The notation string itself is always the fundamental ‘source of truth’ in terms of shape modification, so you can switch back and forth between the modifier list and editable stack at any time to make working with it a bit easier. When you edit the modifier stack, it will update the notation input string. However, if you modify the notation input string, it will rebuild the modifier stack.

Conway Polyhedra Notation

As with the previous tools, you don’t need to know anything at all about Conway polyhedron notation in order to use and have fun with this app. You can just experiment by trying out different modifiers one by one to see what they do and what effect their parameters have. Alternatively, simply choose one of the example polyhedra from the Examples menu and then start enabling/disabling individual modifiers or interactively editing their parameters in order to see what they do.

If you do want to know more, then the best sources are the Wikipedia page linked to above and George Hart's own explanations .

Some Caveats

The following are some tips for using this app:

  • Whilst this app will handle higher-order polyhedra with several hundred thousand vertices and a similar number of faces, anything above about 250k will start to test your patience when editing it. As a result, it is best to edit a simplified base and then add smoothing expansions only when you want to export or visualise. You can also use the / (forward-slash) character to toggle ignoring modifiers that come after it if you want to keep modifiers in the string but not apply them. If you use a single forward-slash in your notation, everything after it will be ignored. If you use two, then everything between them will be ignored.

  • Some of the modifiers used by Levskaya and Hart assume that the base shape closely approximates a sphere of unit radius centered at the origin, and modifies vertices accordingly. To make this work, a lot of their modifiers rescale the shape to a unit radius on each step. Doing this makes it almost impossible for the modified shape to maintain progressive dimensionality, and adds a lot of computational overhead. As a result, I have removed these assumptions from most of the modifiers (in some it’s kind of fundamental to how they work) and added a U modifier to rescale the shape to a unit radius that you can add as you need. I have also added a V modifier that rescales the shape to exactly fit within a 1x1x1 box based on its extents.

  • I have tried to provide a range of different facet colouring options based on relative area, number of edges, face orientation, and a combination of all three to create a signature for like faces. Different types of polyhedra will look good with some and not others, so you will need to experiment for best results.


Change Log

2.0.0 2025年08月10日

  • Update release.

AltStyle によって変換されたページ (->オリジナル) /