View source: R/sl.plot.platon.init.R
sl.plot.platon.init | R Documentation |
Initialise a Platonian-type body plot. Currently possible are hexahedrons (cubes) and icosahedrons. The plot is composed of faces arranged in a net that can be crafted into a 3-dimensional platonian-type body. Returns a list that needs to be provided to any spheRlab plotting functions called afterwards, ended by a call of sl.plot.platon.end
.
sl.plot.platon.init(body.type = "hexahedron", width = 60, skip.faces = NULL, col.background = NULL, device = "pdf", do.init = TRUE, do.init.device = do.init, file.name = paste0("~/sl.plot.platon.",device), mar = rep(0,4))
body.type |
a character specifying the body type. Currently possible types are |
width |
a scalar specifying the width of the resulting figure. |
skip.faces |
an integer (vector) specifying the index (or indices) of faces to omit from the plot. Can be used e.g. for plotting a colourbar and/or other descriptive information onto one or more of the faces. If |
col.background |
a background colour. Default is |
device |
a character specifying which graphics device to use. Default is |
do.init |
a logical value indicating whether or not an initial call of |
do.init.device |
a logical value indicating whether or not initialise a device as specified by |
file.name |
a character specifying the output file. Only used if |
mar |
a numerical vector of the form |
This projection type is a nice gimmick of spheRlab - and in fact part of the reason why rather sophisticated procedures are applied in spheRlab at the plot domain boundaries. For example, at the plot domain boundaries the visible parts of lines and polygons are explicitly computed and then drawn instead of plotting them completely and masking the unintended parts afterwards. The latter 'trick' would be much easier, but fails when separate plot parts are drawn right next to each other, as is the case for the platonian-type body nets!
A list that must be provided to any spheRlab plotting functions called afterwards. In fact, the returned list contains N
standard spheRlab plot specifics lists as the first N
(unnamed) elements for the N
faces that will be generated for the platonian-type body plot, plus the following list elements thereafter:
projection |
the character |
body.type |
see the corresponding argument. |
deltaxy |
a scalar giving the length of the face edges in the projected x-y plane. |
If anyone wants to burn some spare time, how about adding the truncated icosahedron to the list of possible bodies? That would be so cool! :-)
Helge Goessling
sl.plot.init
, sl.plot.platon.end
## To be provided ...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.