Polygonal tiling applet

Instructions

Disclaimer: Not designed for touchscreens. Not tested on touchscreens.

Tested on Firefox and Google Chrome.

Description

The applet allows testing tilings with one or several polygonal tiles that can be rotated into N possible orientations, and can also be flipped.

Magnet (snapping)

The vertices of the tiles are magnetized. You can change the range of the magnet with the appropriate field. If your tiles are big and refuse to snap it is a good idea to try and increas the magnet range.

More technically: the vertices of the already placed tiles are used to snap the current tile being placed: the closest vertex pair is determined then if their distance is below some threshold, the tile in hand is translated so that this pair matches. The threshold value can be adjusted in the corresponding input field.

Overlap is not prevented

There is no overlap checking implemented.

Controls

Basic ones More

Custom polygon

New shapes can be added to the tileset: any polygonal shape traced by a single closed polygonal line. For this, use the Add/Load shape button. The file should be a either a text file containing a list of the shape vertices in the form [[0,1.23],[3.1,13],[-3.14,2.505]] for instance, or a previously saved tileset, in which case all shapes in the loaded tileset will be added to the current tileset. Be careful that the rotation centre will be [0,0]. You can recentre the cursor to the barycenter of the tile with the "Recentre shape" button. Another format understood by the app is {"nbAngles":12,"shape":[[0,1.23],[3.1,13],[-3.14,2.505]]} where nbAngles denotes a recommended value of the number N of orientations. The least common multiple of the new N and the current N will replace the current N when you add the tile to the tileset.

SVG!

There is now a possibility to upload svg tiles. For this to work the svg must contain: And optionally: These mandatory and optionnal objects included in the svg can be invisible (by being fully transparent, or by having display="none"). They shall not be clones of other objects.

Saving/Loading

You can load/save palettes, tilesets, and tilings. Saving a tiling saves its tileset and the value of N in the same file, optionally the palette or magnet range. Saving a tileset saves the current value of N in the same file.