Skip to content

watchduck/full_octahedral_group

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Full octahedral group

This repo contains Python code used to create images for the Wikiversity article Full octahedral group.
Each image represents one of the 48 permutations in the full octahedral group as a permutation of the cube.

Raytracing is done with POV-Ray. Templating is done with Bottle.

SVG Raytracing plain Raytracing subgroup

Use

  • Clone the repo: clone https://github.com/watchduck/full_octahedral_group.git
  • Install a virtual environment in it: virtualenv env
  • Turn it on: source env/bin/activate
  • Install the dependencies: pip install -r requirements.txt
  • Run python app.py in each of the project folders
  • Files will be created in subfolders called FILES.

Bottle templates

The lines in the .tpl files starting with % (or between <% and %>) are Python.
So are parts between {{ and }} in a line. ({{! is a variant of {{.)

Templating is not just used to create SVG files, but also to create Povray scene description files (.pov). E.g. in app.py the template plain.tpl is used with t = template('plain', context). The variable transformations from app.py is included in the template with {{!transformations}}. The Povray scene description file generated from the template is delete_me_after_use.pov. This is rendered as an image with a name like Cube permutation 0 0 JF.png (see image in the middle above).

JF compound

A side of the three-dimensional JF compound representing a cube permutation is also shown in each of the SVG files. The six sides are included (if JF_side ==...) and permuted ({{manipulation}}) in JF_perm.tpl. The permutations used for that were generated here and copied to constants.py (JF_sides_and_manipulations).

JF_cube_sides manipulations

Representations

There are different ways to represent the elements of the full octahedral group:

  • Pairs
  • S4 based identifiers (n' or n+24 for n∘inversion)
  • 3×3 signed permutation matrices
  • permutations of 8 elements (namely cube vertices)

A bijection between pairs and 3×3 matrices is found here (lin_transform_matrices).

Bijections between pairs and S4 based identifiers (pairs_to_num_bidict) as well as pairs and permutations of 8 elements (pairs_to_perm_bidict) can be found here. This file also contains a dictionary of all subgroups.