**Figure 1**- A screenshot of the Polyhedra Generator app running in a web browser.

## Overview

This app generates a range of common polyhedra and lets you apply mathematical operations on them to create some interesting sculptural and architectural forms. I have included the standard operators used in Conway polyhedron notation – borrowing heavily from Anselm Levskaya’s polyHédronisme and George Hart’s original VRML implementation – as well as some additional ‘extended’ operations of my own that allow better spherical inflation and the application of random jitter and Perlin noise.

### Getting Started

To use the app, first select any base polyhedron using the selectors in the **BASE POLYHEDRON** panel on the left-hand side of the main window, then either enter a notation command string directly in the **OPERATIONS** input box or build one up by adding and editing components in the **OPERATOR STACK** panel immediately below. When entering a notation string, it will ignore any polyhedron identifier at the end in favour of the chosen base polyhedron.

As notation strings can sometimes get quite complex, especially when using bracketed arguments, I have tried to make the operator stack a bit more approachable by including all the available paramaters as interactive sliders. Operators that use their default parameter values will be initially closed within the stack, whereas any with non-default parameters will be open. You can open/close any operator by simply clicking or tapping on its title.

To enter any parameter value using the keyboard rather than your pointer or finger, simply click the slider instead of dragging it to display an input editor with a small keypad. Alternatively, you can manually edit the appropriate argument for the given operator within the notation text itself and it will update automatically in the operator stack.

### Conway Polyhedra Notation

Importantly, 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 operators 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 operators or interactively editing their paramaters 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.

## Background

I have always wanted to do a WebGL version of the polyhedron viewer I wrote in Processing some years ago, but it was just a folly and there were always higher priorities. However, I recently needed to include some basic polyhedra in my Tree Generator app, so had to convert some of the old code anyway. At the same time I was trying to develop a pretty bullet-proof closed-shell geometry class for my BIM tools and, having seen and been inspired by polyHédronisme, I figured that might make an excellent visual test suite and provide just the excuse I needed.

## Interesting Features

The following are some of this app’s features and idiosyncrasies:

Don’t go too beserk, but this app will handle higher-order polyhedra with several hundred thousand vertices and a similar number of faces. However, anything above about 200k will start to test your patience when editing it - so best to edit a simplified base and then add smoothing expansions only when you want to export or visualise.

The final generated polyhedra always has a maximum radius of 1 metre. This may mean that some extrusions cause the apparent base polyhedron to shrink in size relative to the external projections, but this is intended behaviour.

I have tried to provide a range of different facet colouring options, based on relative area, number of edges, orientation or 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.

I have taken some egregious liberties by adding a couple of non-standard operations such as Jitter (J), Wrinkle (W) and Inflate (I).

## Change Log

### 0.0.1 2020-02-05

- Initial release.

Click here to comment on this page.