# megaminx_plotter: Plotting routine for megaminx sequences In permutations: The Symmetric Group: Permutations of a Finite Set

## Description

Plots a coloured diagram of a dodecahedron net representing a megaminx

## Usage

 `1` ```megaminx_plotter(megperm=id,offset=c(0,0),M=diag(2),setup=TRUE,...) ```

## Arguments

 `megperm` Permutation to be plotted `offset,M` Offset and transformation matrix, see details `setup` Boolean, with default `TRUE` meaning to set up the plot with a `plot()` statement, and `FALSE` meaning to plot the points on a pre-existing canvas `...` Further arguments passed to `polygon()`

## Details

Function `megaminx_plotter()` plots a coloured diagram of a dodecahedron net representing a megaminx. The argument may be specified as a sequence of turns that are applied to the megaminx from START.

The function uses rather complicated internal variables `pentagons`, `triangles`, and `quads` whose meaning and genesis is discussed in heavily-documented file `inst/guide.R`.

The diagram is centered so that the common vertex of triangles 28 and 82 is at (0,0).

## Author(s)

Robin K. S. Hankin

## Examples

 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22``` ```data("megaminx") megaminx_plotter() # START megaminx_plotter(W) # after turning the White face one click megaminx_plotter(superflip) size <- 0.95 o <- 290 ## Not run: pdf(file="fig1.pdf") megaminx_plotter(M=size*diag(2),offset=c(-o,0),setup=TRUE) megaminx_plotter(W,M=size*diag(2),offset=c(+o,0),setup=FALSE) dev.off() pdf(file="fig2.pdf") p <- permprod(sample(megaminx,100,replace=TRUE)) megaminx_plotter(p,M=size*diag(2),offset=c(-o,0),setup=TRUE) megaminx_plotter(superflip,M=size*diag(2),offset=c(+o,0),setup=FALSE) dev.off() ## End(Not run) ```

permutations documentation built on Nov. 13, 2020, 1:14 a.m.